forked from KolibriOS/kolibrios
kernel: total globalization
git-svn-id: svn://kolibrios.org@5359 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
583e5570af
commit
2ce28a4047
@ -63,7 +63,7 @@ APIC_init:
|
|||||||
call IRQ_mask_all
|
call IRQ_mask_all
|
||||||
|
|
||||||
; IOAPIC init
|
; IOAPIC init
|
||||||
stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_SWR+PG_NOCACHE
|
stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_GLOBAL+PG_NOCACHE+PG_SWR
|
||||||
mov [IOAPIC_base], eax
|
mov [IOAPIC_base], eax
|
||||||
|
|
||||||
mov eax, IOAPIC_VER
|
mov eax, IOAPIC_VER
|
||||||
@ -127,7 +127,7 @@ LAPIC_init:
|
|||||||
cmp [LAPIC_BASE], 0
|
cmp [LAPIC_BASE], 0
|
||||||
jne .done
|
jne .done
|
||||||
|
|
||||||
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SWR+PG_NOCACHE
|
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR
|
||||||
mov [LAPIC_BASE], eax
|
mov [LAPIC_BASE], eax
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ proc kernel_alloc stdcall, size:dword
|
|||||||
jz .err
|
jz .err
|
||||||
|
|
||||||
mov ecx, ebx
|
mov ecx, ebx
|
||||||
or eax, PG_SWR
|
or eax, PG_GLOBAL+PG_SWR
|
||||||
mov ebx, [lin_addr]
|
mov ebx, [lin_addr]
|
||||||
call commit_pages
|
call commit_pages
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ proc kernel_alloc stdcall, size:dword
|
|||||||
test eax, eax
|
test eax, eax
|
||||||
jz .err
|
jz .err
|
||||||
|
|
||||||
stdcall map_page, edx, eax, dword PG_SWR
|
stdcall map_page, edx, eax, dword (PG_GLOBAL+PG_SWR)
|
||||||
add edx, 0x1000
|
add edx, 0x1000
|
||||||
dec ebx
|
dec ebx
|
||||||
jnz @B
|
jnz @B
|
||||||
|
@ -477,14 +477,14 @@ proc init_LFB
|
|||||||
|
|
||||||
mov eax, [LFBAddress]
|
mov eax, [LFBAddress]
|
||||||
mov edi, page_tabs + (LFB_BASE shr 10)
|
mov edi, page_tabs + (LFB_BASE shr 10)
|
||||||
or eax, PG_UWR
|
or eax, PG_GLOBAL+PG_UWR
|
||||||
|
and eax, [pte_valid_mask]
|
||||||
mov ecx, [pg_count]
|
mov ecx, [pg_count]
|
||||||
cld
|
cld
|
||||||
@@:
|
@@:
|
||||||
stosd
|
stosd
|
||||||
add eax, 0x1000
|
add eax, 0x1000
|
||||||
dec ecx
|
loop @B
|
||||||
jnz @B
|
|
||||||
|
|
||||||
mov dword [LFBAddress], LFB_BASE
|
mov dword [LFBAddress], LFB_BASE
|
||||||
mov eax, cr3 ;flush TLB
|
mov eax, cr3 ;flush TLB
|
||||||
|
@ -351,10 +351,12 @@ high_code:
|
|||||||
mov fs, cx
|
mov fs, cx
|
||||||
mov gs, bx
|
mov gs, bx
|
||||||
|
|
||||||
|
mov eax, PG_GLOBAL
|
||||||
bt [cpu_caps], CAPS_PGE
|
bt [cpu_caps], CAPS_PGE
|
||||||
jnc @F
|
jnc @F
|
||||||
|
|
||||||
or dword [sys_proc+PROC.pdt_0+(OS_BASE shr 20)], PG_GLOBAL
|
or [sys_proc+PROC.pdt_0+(OS_BASE shr 20)], eax
|
||||||
|
or [pte_valid_mask], eax
|
||||||
|
|
||||||
mov ebx, cr4
|
mov ebx, cr4
|
||||||
or ebx, CR4_PGE
|
or ebx, CR4_PGE
|
||||||
@ -754,7 +756,7 @@ 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
|
||||||
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SWR+PG_NOCACHE
|
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+300h]
|
||||||
mov esi, smpt+4
|
mov esi, smpt+4
|
||||||
|
Loading…
Reference in New Issue
Block a user