diff --git a/kernel/trunk/acpi/acpi.inc b/kernel/trunk/acpi/acpi.inc index da8681792..a91fa09b8 100644 --- a/kernel/trunk/acpi/acpi.inc +++ b/kernel/trunk/acpi/acpi.inc @@ -229,6 +229,11 @@ check_acpi: mov ecx, [eax+ACPI_MADT.Local_IC_Addr] mov [acpi_lapic_base], ecx + push eax + stdcall map_io_mem, ecx, 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR + mov [LAPIC_BASE], eax + mov ecx, eax + pop eax mov edi, smpt mov ebx, [ecx+APIC_ID] diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 8d9e96f61..140a16ff5 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -646,9 +646,13 @@ endg mov edi, OS_BASE + 8000h mov ecx, (ap_init16_size + 3) / 4 rep movsd + mov eax, [LAPIC_BASE] + test eax, eax + jnz @f stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR mov [LAPIC_BASE], eax - lea edi, [eax+300h] +@@: + lea edi, [eax+APIC_ICRL] mov esi, smpt+4 dec ebx .wake_cpus_loop: