Subversion Repositories Kolibri OS

Rev

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

Rev 3526 Rev 3531
Line 156... Line 156...
156
 
156
 
Line 157... Line 157...
157
.pcie_cfg_mapped:
157
.pcie_cfg_mapped:
158
 
158
 
159
create_mmio_pte:
159
create_mmio_pte:
160
	mov	ecx, mmio_pte                           ; physical address
160
	mov	ecx, mmio_pte				; physical address
161
	or	ecx, (PG_NOCACHE + PG_SHARED)  
161
	or	ecx, (PG_NOCACHE + PG_SHARED + PG_SW)
162
	mov	ebx, FUSION_MMIO			; linear address
162
	mov	ebx, FUSION_MMIO			; linear address
163
	shr	ebx, 20
163
	shr	ebx, 20
Line 164... Line 164...
164
	add	ebx, (sys_pgdir - OS_BASE)		; PgDir entry @
164
	add	ebx, (sys_pgdir - OS_BASE)		; PgDir entry @
165
        mov     dword[ebx], ecx                         ; Fusion MMIO tables
165
	mov	dword[ebx], ecx 			; Fusion MMIO tables
166
 
166
 
167
; ---- short page mapping  ----
167
; ---- short page mapping  ----
168
.map_apic_mmio:
168
.map_apic_mmio:
169
        mov     ecx, 0x01B      ; APIC BAR
169
	mov	ecx, 0x01B	; APIC BAR
170
        rdmsr
170
	rdmsr
Line 171... Line 171...
171
        and     eax, 0xFFFFF000                         ; physical address
171
	and	eax, 0xFFFFF000 			; physical address
Line 172... Line 172...
172
	or	eax, (PG_NOCACHE + PG_SHARED)   
172
	or	eax, (PG_NOCACHE + PG_SHARED + PG_SW)
Line 296... Line 296...
296
	rdmsr
296
	rdmsr
297
	mov	[esp+16], edx
297
	mov	[esp+16], edx
298
	pop	edx ecx
298
	pop	edx ecx
299
	ret
299
	ret
Line -... Line 300...
-
 
300
 
-
 
301
apic_timer_reset:
-
 
302
	xor	eax, eax
-
 
303
	mov	[apic_data+0], eax
-
 
304
	mov	ebx, LAPIC_BAR+ 0x320
-
 
305
	mov	eax, [ebx]
-
 
306
	and	eax, 0xFFFEFF00
-
 
307
	or	eax, 0x0000003F       ; int vector + norestart
-
 
308
	mov	[ebx], eax
-
 
309
	mov	dword[apic_data + 8], 100000000
-
 
310
	ret
-
 
311
 
-
 
312
 
-
 
313
apic_timer_int:
-
 
314
	push	eax
-
 
315
	inc	dword [apic_data + 0]
-
 
316
	mov	eax,  [apic_data + 8]
-
 
317
	mov	dword [LAPIC_BAR + 0x380], eax	      ; load APICTIC
-
 
318
	mov	dword [LAPIC_BAR + 0x0B0], 0	    ; end of interrupt
-
 
319
;        mov     dword [LAPIC_BAR + 0x420], 0x3F     ; end of interrupt
-
 
320
	pop	eax
-
 
321
	iretd