mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2026-08-14 06:55:14 -05:00
Call cpuid_init() before the first call to map_region().
map_region() uses the long mode flag, so that must be initialised first.
This commit is contained in:
+6
-5
@@ -197,15 +197,16 @@ static bool set_load_addr(uintptr_t *load_addr, size_t program_size, uintptr_t l
|
|||||||
|
|
||||||
static void global_init(void)
|
static void global_init(void)
|
||||||
{
|
{
|
||||||
// This is the first region we map, so is guaranteed not to fail.
|
|
||||||
boot_params_addr = map_region(boot_params_addr, sizeof(boot_params_t), true);
|
|
||||||
|
|
||||||
floppy_off();
|
floppy_off();
|
||||||
|
|
||||||
hwctrl_init();
|
|
||||||
|
|
||||||
cpuid_init();
|
cpuid_init();
|
||||||
|
|
||||||
|
// Nothing before this should access the boot parameters, in case they are located above 4GB.
|
||||||
|
// This is the first region we map, so it is guaranteed not to fail.
|
||||||
|
boot_params_addr = map_region(boot_params_addr, sizeof(boot_params_t), true);
|
||||||
|
|
||||||
|
hwctrl_init();
|
||||||
|
|
||||||
screen_init();
|
screen_init();
|
||||||
|
|
||||||
cpuinfo_init();
|
cpuinfo_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user