diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-04-16 10:05:57 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-04-16 10:05:57 +0100 |
commit | 28baa78877ebda840603774d6a1e3e9da9546a6e (patch) | |
tree | 7f3e7943f2838769040a19258e95fa79b8c105bf /extras/mini-os/arch | |
parent | f464d312c7b7185b7174434b61d00903949d3a76 (diff) | |
download | xen-28baa78877ebda840603774d6a1e3e9da9546a6e.tar.gz xen-28baa78877ebda840603774d6a1e3e9da9546a6e.tar.bz2 xen-28baa78877ebda840603774d6a1e3e9da9546a6e.zip |
stubdom: sparse application's BSS by linking it separately first, put
markers at its beginning and end, and then link with mini-os.
That permits to stick a bit more to upstream qemu.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/arch')
-rw-r--r-- | extras/mini-os/arch/ia64/minios-ia64.lds | 5 | ||||
-rw-r--r-- | extras/mini-os/arch/x86/minios-x86_32.lds | 1 | ||||
-rw-r--r-- | extras/mini-os/arch/x86/minios-x86_64.lds | 1 | ||||
-rw-r--r-- | extras/mini-os/arch/x86/mm.c | 7 |
4 files changed, 7 insertions, 7 deletions
diff --git a/extras/mini-os/arch/ia64/minios-ia64.lds b/extras/mini-os/arch/ia64/minios-ia64.lds index 96911aa3fd..0b38a34e8e 100644 --- a/extras/mini-os/arch/ia64/minios-ia64.lds +++ b/extras/mini-os/arch/ia64/minios-ia64.lds @@ -59,7 +59,10 @@ SECTIONS { *(.IA_64.unwind) } .bss : AT(ADDR(.bss) - (((5<<(61))+0x100000000) - (1 << 20))) - { *(.bss) } + { + *(.bss) + *(.app.bss) + } _end = .; diff --git a/extras/mini-os/arch/x86/minios-x86_32.lds b/extras/mini-os/arch/x86/minios-x86_32.lds index df5301944f..9bd0b77691 100644 --- a/extras/mini-os/arch/x86/minios-x86_32.lds +++ b/extras/mini-os/arch/x86/minios-x86_32.lds @@ -38,6 +38,7 @@ SECTIONS __bss_start = .; /* BSS */ .bss : { *(.bss) + *(.app.bss) } _end = . ; diff --git a/extras/mini-os/arch/x86/minios-x86_64.lds b/extras/mini-os/arch/x86/minios-x86_64.lds index f93800236b..361b264c5e 100644 --- a/extras/mini-os/arch/x86/minios-x86_64.lds +++ b/extras/mini-os/arch/x86/minios-x86_64.lds @@ -38,6 +38,7 @@ SECTIONS __bss_start = .; /* BSS */ .bss : { *(.bss) + *(.app.bss) } _end = . ; diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c index dd556e4741..8bc90eddea 100644 --- a/extras/mini-os/arch/x86/mm.c +++ b/extras/mini-os/arch/x86/mm.c @@ -556,7 +556,6 @@ void *map_frames_ex(unsigned long *f, unsigned long n, unsigned long stride, static void clear_bootstrap(void) { - struct xen_memory_reservation reservation; xen_pfn_t mfns[] = { virt_to_mfn(&shared_info) }; int n = sizeof(mfns)/sizeof(*mfns); pte_t nullpte = { }; @@ -567,11 +566,7 @@ static void clear_bootstrap(void) if (HYPERVISOR_update_va_mapping((unsigned long) &_text, nullpte, UVMF_INVLPG)) printk("Unable to unmap first page\n"); - set_xen_guest_handle(reservation.extent_start, mfns); - reservation.nr_extents = n; - reservation.extent_order = 0; - reservation.domid = DOMID_SELF; - if (HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation) != n) + if (free_physical_pages(mfns, n) != n) printk("Unable to free bootstrap pages\n"); } |