diff options
author | Keir Fraser <keir@xen.org> | 2010-11-09 11:49:49 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-11-09 11:49:49 +0000 |
commit | 5a771800114c437fb857b44b3ed74f60e87979c2 (patch) | |
tree | a9a1089b753cdfb65757b08c6406d1721d989ad3 /xen/xsm/xsm_policy.c | |
parent | e04aea7477c379e904e7520bdfa2f42284427a97 (diff) | |
download | xen-5a771800114c437fb857b44b3ed74f60e87979c2.tar.gz xen-5a771800114c437fb857b44b3ed74f60e87979c2.tar.bz2 xen-5a771800114c437fb857b44b3ed74f60e87979c2.zip |
x86: do away with the boot time low-memory 1:1 mapping
By doing so, we're no longer restricted to be able to place all boot
loader modules into the low 1Gb/4Gb (32-/64-bit) of memory, nor is
there a dependency anymore on where the boot loader places the
modules.
We're also no longer restricted to copy the modules into a place below
4Gb, nor to put them all together into a single piece of memory.
Further it allows even the 32-bit Dom0 kernel to be loaded anywhere in
physical memory (except if it doesn't support PAE-above-4G).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/xsm/xsm_policy.c')
-rw-r--r-- | xen/xsm/xsm_policy.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c index 2919c1a699..4336afdef6 100644 --- a/xen/xsm/xsm_policy.c +++ b/xen/xsm/xsm_policy.c @@ -22,11 +22,11 @@ #include <xsm/xsm.h> #include <xen/multiboot.h> -char *policy_buffer = NULL; -u32 policy_size = 0; +char *__initdata policy_buffer = NULL; +u32 __initdata policy_size = 0; int xsm_policy_init(unsigned int *initrdidx, const multiboot_info_t *mbi, - unsigned long initial_images_start) + void *(*bootstrap_map)(const module_t *)) { int i; module_t *mod = (module_t *)__va(mbi->mods_addr); @@ -40,15 +40,8 @@ int xsm_policy_init(unsigned int *initrdidx, const multiboot_info_t *mbi, */ for ( i = mbi->mods_count-1; i >= 1; i-- ) { - start = initial_images_start + (mod[i].mod_start-mod[0].mod_start); -#if defined(__i386__) - _policy_start = (u32 *)start; -#elif defined(__x86_64__) - _policy_start = maddr_to_virt(start); -#else - _policy_start = NULL; -#endif - _policy_len = mod[i].mod_end - mod[i].mod_start; + _policy_start = bootstrap_map(mod + i); + _policy_len = mod[i].mod_end; if ( (xsm_magic_t)(*_policy_start) == XSM_MAGIC ) { @@ -63,6 +56,8 @@ int xsm_policy_init(unsigned int *initrdidx, const multiboot_info_t *mbi, break; } + + bootstrap_map(NULL); } return rc; |