fix r8111: Map acpi_apic_base page before access.

git-svn-id: svn://kolibrios.org@8119 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2020-10-27 19:32:57 +00:00
parent ddd545e037
commit 1919b8efdc
2 changed files with 10 additions and 1 deletions

View File

@ -229,6 +229,11 @@ check_acpi:
mov ecx, [eax+ACPI_MADT.Local_IC_Addr] mov ecx, [eax+ACPI_MADT.Local_IC_Addr]
mov [acpi_lapic_base], ecx 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 edi, smpt
mov ebx, [ecx+APIC_ID] mov ebx, [ecx+APIC_ID]

View File

@ -646,9 +646,13 @@ endg
mov edi, OS_BASE + 8000h mov edi, OS_BASE + 8000h
mov ecx, (ap_init16_size + 3) / 4 mov ecx, (ap_init16_size + 3) / 4
rep movsd 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 stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR
mov [LAPIC_BASE], eax mov [LAPIC_BASE], eax
lea edi, [eax+300h] @@:
lea edi, [eax+APIC_ICRL]
mov esi, smpt+4 mov esi, smpt+4
dec ebx dec ebx
.wake_cpus_loop: .wake_cpus_loop: