Subversion Repositories Kolibri OS

Rev

Rev 2209 | Rev 2217 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2209 Rev 2212
Line 10... Line 10...
10
iglobal
10
iglobal
11
IRQ_COUNT	dd	24
11
IRQ_COUNT	dd	24
12
endg
12
endg
Line 13... Line 13...
13
 
13
 
14
uglobal
14
uglobal
15
APIC:		dd	0
15
APIC         rd  1
16
LAPIC_BASE:	dd	0
16
IOAPIC_base  rd  1
17
IOAPIC_base:	dd	0
17
LAPIC_BASE   rd  1
Line 18... Line 18...
18
endg
18
endg
19
 
19
 
20
APIC_ID		equ	0x20
20
APIC_ID		equ	0x20
Line 42... Line 42...
42
IOAPIC_ARB	equ	0x2
42
IOAPIC_ARB	equ	0x2
43
IOAPIC_REDTBL	equ	0x10
43
IOAPIC_REDTBL	equ	0x10
Line 44... Line 44...
44
 
44
 
45
APIC_init:
45
APIC_init:
-
 
46
	mov	dword[APIC], 0
46
	mov	dword[APIC], 0
47
 
47
	; jmp	.no_apic		; NO APIC
48
  mov eax, [acpi_ioapic_base]
48
;	bt	[cpu_caps], CAPS_APIC
49
  test eax, eax
49
;	jnc	.no_apic
-
 
50
	; Check for MP table
-
 
Line 51... Line 50...
51
	;.....
50
  jz .no_apic
Line 52... Line 51...
52
 
51
 
53
	call	IRQ_mask_all
-
 
54
 
52
	call	IRQ_mask_all
55
	; IOAPIC init
53
 
Line 56... Line 54...
56
	; 0xfec00000 - may be relocated, see chip reference... & MP table
54
	; IOAPIC init
57
	stdcall	map_io_mem, 0xfec00000, 0x20, PG_SW
55
  stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_SW
58
	mov	[IOAPIC_base], eax
56
	mov	[IOAPIC_base], eax
Line 133... Line 131...
133
align 4
131
align 4
134
LAPIC_init:
132
LAPIC_init:
135
	; Check MSR support
133
	; Check MSR support
136
	;....
134
	;....
137
	; Get LAPIC base address
135
	; Get LAPIC base address
138
	mov	ecx, 0x1b
136
; mov ecx, 0x1b
139
	rdmsr				; it may be replaced to
137
; rdmsr       ; it may be replaced to
140
	and	ax, 0xf000		; mov	eax, 0xfee00000
138
; and ax, 0xf000    ; mov eax, 0xfee00000
Line 141... Line 139...
141
 
139
 
142
	stdcall	map_io_mem, eax, 0x1000, PG_SW
140
  stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SW
143
	mov	[LAPIC_BASE], eax
141
	mov	[LAPIC_BASE], eax
Line 144... Line 142...
144
	mov	esi, eax
142
	mov	esi, eax
145
 
143