1) gfx reverted to stable version 1710
2) Phenom and Fusion CPUs supported 3) RDMSR syscall added git-svn-id: svn://kolibrios.org@1928 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4830da3065
commit
7413c9cd9d
@ -136,12 +136,16 @@ rs7xx_pcie_init:
|
||||
call rs7xx_nbconfig_flush_pci
|
||||
mov eax, ebx
|
||||
and eax, 0xFFE00000 ; valid bits [31..21]
|
||||
jz $ ; NB BAR3 may be invisible!
|
||||
jz $ ; invalid map!
|
||||
.addr_found:
|
||||
mov dword[mmio_pcie_cfg_addr-OS_BASE], eax ; physical address (lower 32 bits)
|
||||
add dword[mmio_pcie_cfg_lim-OS_BASE], eax
|
||||
|
||||
or eax, (PG_NOCACHE + PG_SHARED + PG_LARGE + PG_UW) ; by the way, UW is unsafe!
|
||||
; ---- common mapping procedure ----
|
||||
; (eax = phys. address of PCIe conf.space)
|
||||
;
|
||||
map_pcie_pages:
|
||||
or eax, (PG_NOCACHE + PG_SHARED + PG_LARGE + PG_UW) ; UW is unsafe, fix it!
|
||||
mov ecx, PCIe_CONFIG_SPACE ; linear address
|
||||
mov ebx, ecx
|
||||
shr ebx, 20
|
||||
@ -167,6 +171,32 @@ rs7xx_pcie_init:
|
||||
.pcie_cfg_mapped:
|
||||
ret ; <<< OK >>>
|
||||
|
||||
; ---- stepping 10h CPUs and Fusion APUs: the configspace is stored in MSR_C001_0058 ----
|
||||
align 4
|
||||
fusion_pcie_init:
|
||||
mov ecx, 0xC0010058
|
||||
rdmsr
|
||||
or edx, edx
|
||||
jnz $ ; PCIe is in the upper memory. Stop.
|
||||
xchg dl, al
|
||||
mov dword[mmio_pcie_cfg_addr-OS_BASE], eax ; store the physical address
|
||||
mov ecx, edx
|
||||
and dl, 1
|
||||
jz $ ; bit[0] = 1 means no PCIe mapping allowed. Stop.
|
||||
shr cl, 2 ; ecx = log2(number of buses)
|
||||
mov word[PCIe_bus_range-OS_BASE], cx
|
||||
sub cl, 2
|
||||
jae @f
|
||||
xor cl, cl
|
||||
@@:
|
||||
shl edx, cl ; edx = number of 4M pages to map
|
||||
mov word[mmio_pcie_cfg_pdes-OS_BASE], dx
|
||||
shl edx, 22
|
||||
dec edx
|
||||
add edx, eax ; the upper configspace limit
|
||||
mov dword[mmio_pcie_cfg_lim-OS_BASE], edx
|
||||
|
||||
jmp map_pcie_pages
|
||||
|
||||
; ================================================================================
|
||||
|
||||
@ -278,6 +308,19 @@ rs780_write_htiu:
|
||||
pop edx
|
||||
ret
|
||||
|
||||
;------------------------------------------------
|
||||
align 4
|
||||
sys_rdmsr:
|
||||
; in: [esp+8] = MSR#
|
||||
; out: [esp+8] = MSR[63:32]
|
||||
; [eax] = MSR[31: 0]
|
||||
;------------------------------------------------
|
||||
push ecx edx
|
||||
mov ecx, [esp+16]
|
||||
rdmsr
|
||||
mov [esp+16], edx
|
||||
pop edx ecx
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
|
||||
dpl0 equ 10010000b ; data read dpl0
|
||||
drw0 equ 10010010b ; data read/write dpl0
|
||||
|
@ -17,7 +17,7 @@ cross_order:
|
||||
mov edx, esi
|
||||
mov esi, edi
|
||||
movzx edi, byte[esp+28 + 4]
|
||||
sub edi, 53 ; all zeroes before
|
||||
sub edi, 53 ; all zeroes before
|
||||
call dword [servetable+edi*4]
|
||||
ret
|
||||
|
||||
@ -44,28 +44,10 @@ i40:
|
||||
|
||||
align 32
|
||||
syscall_entry:
|
||||
push ecx
|
||||
; sti
|
||||
; and eax, 3
|
||||
; call dword [servetable3 + eax * 4]
|
||||
|
||||
mov edi, [esp+4]
|
||||
mov ecx, [esp+8]
|
||||
mov edx, [esp+12]
|
||||
mov ebx, [esp+16]
|
||||
and al, 1
|
||||
jz .hline
|
||||
mov eax, [esp+20]
|
||||
sti
|
||||
call vline
|
||||
jmp .done
|
||||
.hline:
|
||||
mov eax, [esp+20]
|
||||
sti
|
||||
call hline
|
||||
.done:
|
||||
|
||||
|
||||
push ecx
|
||||
and eax, 3
|
||||
call dword [servetable3 + eax * 4]
|
||||
pop ecx
|
||||
sysret
|
||||
|
||||
@ -85,7 +67,7 @@ iglobal
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0 ; 62-PCI functions
|
||||
dd 0 ; 62-PCI functions
|
||||
dd sys_msg_board ; 63-System message board
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -118,7 +100,7 @@ iglobal
|
||||
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
|
||||
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
||||
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
||||
dd undefined_syscall ; syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
||||
dd undefined_syscall ; syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
||||
dd undefined_syscall ; 25-reserved
|
||||
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
||||
dd undefined_syscall ; 27-reserved
|
||||
@ -173,8 +155,8 @@ iglobal
|
||||
align 4
|
||||
servetable3: ; Kolibri-A special service
|
||||
|
||||
dd hline ; 0
|
||||
dd vline ; 1
|
||||
dd sys_rdmsr ; 0
|
||||
dd paleholder ; 1
|
||||
dd paleholder ; 2
|
||||
dd sys_end ; last
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
|
||||
keymap:
|
||||
|
||||
db '6',27
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
|
||||
; check mouse
|
||||
;
|
||||
|
@ -55,7 +55,7 @@
|
||||
;; on all copies.
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
include 'macros.inc'
|
||||
|
||||
$Revision$
|
||||
@ -219,7 +219,8 @@ diff16 "32-bit code start ",0,$
|
||||
call init_BIOS32 ; (init.inc - to be removed later)
|
||||
|
||||
; PCIe extended config space access
|
||||
call rs7xx_pcie_init ; (bus/HT.inc)
|
||||
; call rs7xx_pcie_init ; (bus/HT.inc)
|
||||
call fusion_pcie_init ; (bus/HT.inc)
|
||||
|
||||
; MEMORY MODEL
|
||||
call init_mem ; (init.inc)
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
$Revision$
|
||||
|
||||
|
||||
|
||||
|
||||
struc POINT {
|
||||
.x dd ?
|
||||
|
1064
kernel/branches/Kolibri-A/trunk/video/vesa20.inc
Normal file
1064
kernel/branches/Kolibri-A/trunk/video/vesa20.inc
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user