xen: add hook for AP bootstrap memory reservation
This hook will only be implemented for bare metal, Xen doesn't require any bootstrap code since APs are started in long mode with paging enabled. Approved by: gibbs Sponsored by: Citrix Systems R&D amd64/amd64/machdep.c: - Set mp_bootaddress hook for bare metal. x86/include/init.h: - Define mp_bootaddress in init_ops.
This commit is contained in:
parent
3d80242f23
commit
5a036d7e02
@ -178,6 +178,9 @@ struct init_ops init_ops = {
|
||||
.early_clock_source_init = i8254_init,
|
||||
.early_delay = i8254_delay,
|
||||
.parse_memmap = native_parse_memmap,
|
||||
#ifdef SMP
|
||||
.mp_bootaddress = mp_bootaddress,
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1490,10 +1493,14 @@ getmemsize(caddr_t kmdp, u_int64_t first)
|
||||
if (basemem == 0)
|
||||
panic("BIOS smap did not include a basemem segment!");
|
||||
|
||||
#ifdef SMP
|
||||
/* make hole for AP bootstrap code */
|
||||
physmap[1] = mp_bootaddress(physmap[1] / 1024);
|
||||
#endif
|
||||
/*
|
||||
* Make hole for "AP -> long mode" bootstrap code. The
|
||||
* mp_bootaddress vector is only available when the kernel
|
||||
* is configured to support APs and APs for the system start
|
||||
* in 32bit mode (e.g. SMP bare metal).
|
||||
*/
|
||||
if (init_ops.mp_bootaddress)
|
||||
physmap[1] = init_ops.mp_bootaddress(physmap[1] / 1024);
|
||||
|
||||
/*
|
||||
* Maxmem isn't the "maximum memory", it's one larger than the
|
||||
|
@ -39,6 +39,7 @@ struct init_ops {
|
||||
void (*early_clock_source_init)(void);
|
||||
void (*early_delay)(int);
|
||||
void (*parse_memmap)(caddr_t, vm_paddr_t *, int *);
|
||||
u_int (*mp_bootaddress)(u_int);
|
||||
};
|
||||
|
||||
extern struct init_ops init_ops;
|
||||
|
Loading…
x
Reference in New Issue
Block a user