paddr_t start, end;
int i;
- enum { region_s3, region_text, region_bss, nr_regions };
+ enum { region_s3, region_ro, region_rw, nr_regions };
static struct {
paddr_t s, e;
} xen_regions[nr_regions] __hwdom_initdata;
/* S3 resume code (and other real mode trampoline code) */
xen_regions[region_s3].s = bootsym_phys(trampoline_start);
xen_regions[region_s3].e = bootsym_phys(trampoline_end);
- /* hypervisor code + data */
- xen_regions[region_text].s =__pa(&_stext);
- xen_regions[region_text].e = __pa(&__init_begin);
- /* bss */
- xen_regions[region_bss].s = __pa(&__bss_start);
- xen_regions[region_bss].e = __pa(&__bss_end);
+ /* hypervisor .text + .rodata */
+ xen_regions[region_ro].s = __pa(&_stext);
+ xen_regions[region_ro].e = __pa(&__2M_rodata_end);
+ /* hypervisor .data + .bss */
+ xen_regions[region_rw].s = __pa(&__2M_rwdata_start);
+ xen_regions[region_rw].e = __pa(&__2M_rwdata_end);
}
start = (paddr_t)mfn << PAGE_SHIFT;
#include <asm/processor.h>
#include <asm/e820.h>
#include <asm/tboot.h>
+#include <asm/setup.h>
#include <crypto/vmac.h>
/* tboot=<physical address of shared page> */
g_tboot_shared->mac_regions[0].start = bootsym_phys(trampoline_start);
g_tboot_shared->mac_regions[0].size = bootsym_phys(trampoline_end) -
bootsym_phys(trampoline_start);
- /* hypervisor code + data */
+ /* hypervisor .text + .rodata */
g_tboot_shared->mac_regions[1].start = (uint64_t)__pa(&_stext);
- g_tboot_shared->mac_regions[1].size = __pa(&__init_begin) -
+ g_tboot_shared->mac_regions[1].size = __pa(&__2M_rodata_end) -
__pa(&_stext);
- /* bss */
- g_tboot_shared->mac_regions[2].start = (uint64_t)__pa(&__bss_start);
- g_tboot_shared->mac_regions[2].size = __pa(&__bss_end) - __pa(&__bss_start);
+ /* hypervisor .data + .bss */
+ g_tboot_shared->mac_regions[2].start = (uint64_t)__pa(&__2M_rwdata_start);
+ g_tboot_shared->mac_regions[2].size = __pa(&__2M_rwdata_end) -
+ __pa(&__2M_rwdata_start);
/*
* MAC domains and other Xen memory