mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-20 11:38:25 -06: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:
parent
e429abec9f
commit
ef3f0bc1e5
11
app/main.c
11
app/main.c
@ -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)
|
||||
{
|
||||
// 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();
|
||||
|
||||
hwctrl_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();
|
||||
|
||||
cpuinfo_init();
|
||||
|
Loading…
Reference in New Issue
Block a user