diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-25 16:25:26 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-25 16:25:26 +0000 |
commit | b7b544e7491ff7ccea15d360a082842b897904a6 (patch) | |
tree | 4a4ca0f314b89b661dff971202d7d69b2bdf452a /extras/mini-os/include/hypervisor.h | |
parent | 0c01ed49354e4f00fc5cb9994800309b8b0ac99c (diff) | |
download | xen-b7b544e7491ff7ccea15d360a082842b897904a6.tar.gz xen-b7b544e7491ff7ccea15d360a082842b897904a6.tar.bz2 xen-b7b544e7491ff7ccea15d360a082842b897904a6.zip |
Memory management fixes. Page tables are created, buddy allocator now
has ability to free memory (as well as allocate it).
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/include/hypervisor.h')
-rw-r--r-- | extras/mini-os/include/hypervisor.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/extras/mini-os/include/hypervisor.h b/extras/mini-os/include/hypervisor.h index f0467bb9e2..5375b45afb 100644 --- a/extras/mini-os/include/hypervisor.h +++ b/extras/mini-os/include/hypervisor.h @@ -80,17 +80,43 @@ static __inline__ int HYPERVISOR_set_trap_table(trap_info_t *table) static __inline__ int HYPERVISOR_mmu_update(mmu_update_t *req, int count, - int *success_count) + int *success_count, + domid_t domid) { int ret; + unsigned long ign1, ign2, ign3, ign4; + __asm__ __volatile__ ( TRAP_INSTR - : "=a" (ret) : "0" (__HYPERVISOR_mmu_update), - _a1 (req), _a2 (count), _a3 (success_count) : "memory" ); + : "=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4) + : "0" (__HYPERVISOR_mmu_update), "1" (req), "2" (count), + "3" (success_count), "4" (domid) + : "memory" ); return ret; } + +static __inline__ int HYPERVISOR_mmuext_op(struct mmuext_op *op, + int count, + int *success_count, + domid_t domid) +{ + int ret; + unsigned long ign1, ign2, ign3, ign4; + + __asm__ __volatile__ ( + TRAP_INSTR + : "=a" (ret), "=b" (ign1), "=c" (ign2), "=d" (ign3), "=S" (ign4) + : "0" (__HYPERVISOR_mmuext_op), "1" (op), "2" (count), + "3" (success_count), "4" (domid) + : "memory" ); + + return ret; +} + + + static __inline__ int HYPERVISOR_set_gdt(unsigned long *frame_list, int entries) { int ret; |