Subversion Repositories Kolibri OS

Rev

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

Rev 3934 Rev 6877
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) 2010-13 KolibriOS team.  All rights reserved.  ;;
3
;; Copyright (C) 2010-17 KolibriOS team.  All rights reserved.  ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;  HT.inc                                                      ;;                                                    ;;
6
;;  HT.inc                                                      ;;                                                    ;;
7
;;                                                              ;;
7
;;                                                              ;;
8
;;  AMD HyperTransport bus control                              ;;
8
;;  AMD HyperTransport bus control                              ;;
Line 173... Line 173...
173
	mov	[ebx], eax
173
	mov	[ebx], eax
Line 174... Line 174...
174
 
174
 
175
; ---- map GPU MMRegs  ----
175
; ---- map GPU MMRegs  ----
176
.map_gpu_mmr:
176
.map_gpu_mmr:
177
	mov	eax, [mmio_pcie_cfg_addr-OS_BASE]	; PCIe space
177
	mov	eax, [mmio_pcie_cfg_addr-OS_BASE]	; PCIe space
-
 
178
;	add	eax, 0x08018				; b:0, d:1, f:0, reg=18 << fam.14h GPU BAR
178
	add	eax, 0x08018				; b:0, d:1, f:0, reg=18
179
	add	eax, 0x08024				; b:0, d:1, f:0, reg=24 << fam.16h GPU BAR
Line 179... Line 180...
179
	mov	eax, [eax]
180
	mov	eax, [eax]
180
 
181
 
181
	xor	al, al					; physical address
182
	xor	al, al					; physical address
Line 343... Line 344...
343
; ret
344
; ret
Line 344... Line 345...
344
 
345
 
345
init_hw_cursor:
346
init_hw_cursor:
346
	call	alloc_page			 ; eax = phys. addr
347
	call	alloc_page			 ; eax = phys. addr
347
	push	eax
348
	push	eax
348
	or	eax, (PG_NOCACHE + PG_SHARED + PG_UW)	 ; i like dirty hacks
349
	or	eax, (PG_NOCACHE + PG_SHARED + PG_UW)	 
349
	mov	[mmio_pte + OS_BASE + 15*4], eax ; mapped to the end of GPU MMRegs
350
	mov	[mmio_pte + OS_BASE + 15*4], eax ; mapped to the end of GPU MMRegs
350
	mov	edi, GPU_CURSOR 		 ; lin. addr
351
	mov	edi, GPU_CURSOR 		 ; lin. addr
351
	invlpg	[edi]
352
	invlpg	[edi]
352
	xor	ecx, ecx
353
	xor	ecx, ecx
Line 363... Line 364...
363
	cmp	bl, 64
364
	cmp	bl, 64
364
	jb	.check_pix
365
	jb	.check_pix
365
	inc	ecx
366
	inc	ecx
366
	cmp	ecx, 16
367
	cmp	ecx, 16
367
	je	@f
368
	je	@f
368
	add	edi, 64*4			; new line
369
;	add	edi, 64*4			; evergreen cursor is 64x64pix
-
 
370
	add	edi, 128*4			; si cursor is 128x128pix
369
	jmp	.fill64pix
371
	jmp	.fill64pix
370
@@:
372
@@:
371
	pop	eax
373
	pop	eax
372
	mov	dword[GPU_MMR + 0x0699C], eax	     ; cur_surface_addr
374
	mov	dword[GPU_MMR + 0x0699C], eax        ; cur_surface_addr
373
	mov	dword[GPU_MMR + 0x069A0], 0x000F000F ; cur_size    = 16x16
375
	mov	dword[GPU_MMR + 0x069A0], 0x000F000F ; cur_size    = 16x16