Fix the memory scaling bug when basemem was converted to Kbytes from
bytes for AMD64. Otherwise the AP will be started at 640K which won't work. Bug found on a Xeon 64bit system.
This commit is contained in:
parent
927adfff57
commit
30b952654a
@ -198,7 +198,7 @@ mp_bootaddress(u_int basemem)
|
||||
|
||||
bootMP_size = mptramp_end - mptramp_start;
|
||||
boot_address = trunc_page(basemem * 1024); /* round down to 4k boundary */
|
||||
if ((basemem - boot_address) < bootMP_size)
|
||||
if (((basemem * 1024) - boot_address) < bootMP_size)
|
||||
boot_address -= PAGE_SIZE; /* not enough, lower by 4k */
|
||||
/* 3 levels of page table pages */
|
||||
mptramp_pagetables = boot_address - (PAGE_SIZE * 3);
|
||||
|
Loading…
Reference in New Issue
Block a user