⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 runfb.asm

📁 AMI 主板的BIOS源码。
💻 ASM
📖 第 1 页 / 共 4 页
字号:
;                          01 = 2 Bytes                                        ;
;                          10 = 4 Bytes                                        ;
;                          11 = Unknown                                        ;
;               Bit 1-0: CAS latency in CPU clocks                             ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetBankTimingInfo	proc near
	push	bx
	mov	ah,5dh
	call	read_pci_byte
	and	al,08h
	shr	al,3
	mov	bl,al			; cas latency

	or 	bl,08h			; Burst = 4 bytes

	mov	ah,51h
	call	read_pci_byte
	and	al,04h
	shl	al,2
	xor	al,00010000b		;
	or	bl,al			; linear/toggle= 0/1

	mov	al,bl
	pop	bx
	ret
FrameBufGetBankTimingInfo	endp


;---------------------------------------;
; FrameBufGetBankAddress                ;
;---------------------------------------;--------------------------------------;
; This function returns the start address of the memory occupying the given    ;
; bank.                                                                        ;
;                                                                              ;
; NOTE: This function only needs to be implemeted for VUMA support.  SMBA      ;
;       support does not use this function.                                    ;
;                                                                              ;
; Input:  CL = Memory bank number in the range 00h - 0Fh                       ;
;                                                                              ;
; Output: EAX = Absolute 32 bit address of memory in bank CL                   ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetBankAddress	proc near
	ret
FrameBufGetBankAddress	endp


;---------------------------------------;
;       FIND_FREQUENCY                  ;
;---------------------------------------;-------------------------------------;
; Input:  None                                                                ;
; Output: AH = 0/1/2/3 for 66/75/83/100 Mhz                                   ;
; Register destroyed: AX                                                      ;
;-----------------------------------------------------------------------------;
	extrn	check_100mhz_cpu_bus:near
Find_frequency proc near
	call	check_100mhz_cpu_bus
	mov	ah,03			; 100Mhz
	jz	short @f
	mov	ah,0			; 66 Mhz
@@:
        ret
Find_frequency endp


;---------------------------------------;
;       DRAM CONTROLL CYCLE             ;
;---------------------------------------;-------------------------------------;
; Input:  None                                                                ;
; Output: AL(bit0) = 1 enabe one cycle read				      ;
;         AL(bit1) = 1 enabe one cycle write			              ;
; Register destroyed: AX                                                      ;
;-----------------------------------------------------------------------------;
dram_control_cycle proc near
if (MKF_CUSTOMER eq 7788)
	xor	ah,ah
	mov	al,Q_VGA_WRITE_CYCLE
	call	check_cmos_data_far	; AL = 00 disabled, 01 enabled
	shl	al,01h
	or	ah,al

	mov	al,Q_VGA_READ_CYCLE
	call	check_cmos_data_far	; AL = 00 disabled, 01 enabled
	xor	al,01h
	or 	ah,al
else
	mov	ah,63h
	call	read_pci_byte
	and	al,7
	cmp	al,7
	jz	disable_read_write_cycle
	mov	ah,02h
	jmp	short @f
disable_read_write_cycle:
	mov	ah,01h
@@:
endif
        ret
dram_control_cycle endp

;---------------------------------------;
; check_cmos_data_far                   ;
;---------------------------------------;--------------------------------------;
; This function returns the value of the given setup item.                     ;
;                                                                              ;
; Input:  AL = setup question structure#                                       ;
;                                                                              ;
; Output: ZF = Set if it is disabled in CMOS setup                             ;
;              Clear if it is enabled in CMOS setup                            ;
;	  AL = right justified value of the given setup item                   ;
;                                                                              ;
; Destroys: AX                                                                 ;
;------------------------------------------------------------------------------;
	public	check_cmos_data_far
check_cmos_data_far	proc	near
	db	9ah			; CALL FAR F000:EED5
	dw	0eed5h
	dw	0f000h
	ret
check_cmos_data_far	endp

endif  ; MKF_VUMA_SUPPORT

;******************************************************************************;
;                                                                              ;
;                      Chipset Hooks Needed by SMBA Only                       ;
;                                                                              ;
;******************************************************************************;

if MKF_SMBA_SUPPORT

;---------------------------------------;
; FrameBufSetMemHoleOverlap             ;
;---------------------------------------;--------------------------------------;
; This function determines if the SMBA shared frame buffer overlaps the memory ;
; hole.  The new setting takes effect immediately.  This function does not     ;
; need to modify the overlap setting in CMOS (the caller will handle this).    ;
;                                                                              ;
; NOTE: This function only needs to be implemeted for SMBA support.  VUMA      ;
;       support does not use this function.                                    ;
;                                                                              ;
; Input:  BX = Bit 0: If set, frame buffer overlaps memory hole                ;
;                     If clear, frame buffer does not overlap memory hole      ;
;              Bit 1-15: Reserved                                              ;
;                                                                              ;
; Output: Nothing                                                              ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufSetMemHoleOverlap	proc near
	ret
FrameBufSetMemHoleOverlap	endp

;---------------------------------------;
; FrameBufGetMemHoleInfo                ;
;---------------------------------------;--------------------------------------;
; This function returns information about the current state of the memory hole.;
;                                                                              ;
; NOTE: This function only needs to be implemeted for SMBA support.  VUMA      ;
;       support does not use this function.                                    ;
;                                                                              ;
; Input:  Nothing                                                              ;
;                                                                              ;
; Output: DX = Memory hole information                                         ;
;              Bit 15: If set, memory hole overlaps frame buffer               ;
;              Bit 14-2: Reserved                                              ;
;              Bit 1-0: 00 = Memory hole is disabled                           ;
;                       01 = Reserved                                          ;
;                       10 = Memory hole is 1MB at 15MB                        ;
;                       11 = Memory hole is 2MB at 14MB                        ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetMemHoleInfo	proc near
	xor	dx, dx
	ret
FrameBufGetMemHoleInfo	endp

;---------------------------------------;
; FrameBufGetHostBusSpeed               ;
;---------------------------------------;--------------------------------------;
; This function returns the speed of the system's host bus (CPU bus).          ;
;                                                                              ;
; NOTE: This function only needs to be implemeted for SMBA support.  VUMA      ;
;       support does not use this function.                                    ;
;                                                                              ;
; Input:  Nothing                                                              ;
;                                                                              ;
; Output: AL =  Host bus clock frequency                                       ;
;                 00h = Host bus clock frequency unknown                       ;
;                 01h = 50 MHz                                                 ;
;                 02h = 60 MHz                                                 ;
;                 03h = 66 MHz                                                 ;
;                 04h - FFh = Reserved                                         ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetHostBusSpeed	proc near
	xor	al, al
	ret
FrameBufGetHostBusSpeed	endp

endif     ; MKF_SMBA_SUPPORT

;---------------------------------------;
;*****************************************************************;
;*****************************************************************;
;**                                                             **;
;**      (C)Copyright 1985-1995, American Megatrends, Inc.      **;
;**                                                             **;
;**                     All Rights Reserved.                    **;
;**                                                             **;
;**           6145-F Northbelt Pkwy, Norcross, GA 30071         **;
;**                                                             **;
;**                     Phone (770)-263-8181                    **;
;**                                                             **;
;*****************************************************************;
;*****************************************************************;
_text	ends
	end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -