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

📄 runfb.asm

📁 AMI 主板的BIOS源码。
💻 ASM
📖 第 1 页 / 共 4 页
字号:
;             Bit 7-1: Reserved                                                ;
;        DX = Size of shared frame buffer memory in units of 64k               ;
;                                                                              ;
; Output: Nothing                                                              ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufSetCmosData	proc near
;  DX may be converted to a small number representing one of the values
;     that the chipset supports
;  CH bit 0 needs to be saved in CMOS for SMBA only (it is always 0
;     under VUMA)
	ret
FrameBufSetCmosData	endp


;---------------------------------------;
; FrameBufGetCmosData                   ;
;---------------------------------------;--------------------------------------;
; This function reads the current VUMA/SMBA frame buffer size and flags from   ;
; CMOS.  For VUMA and SMBA there should be a setup question that looks like    ;
; the one below (add more size options if the chipset supports them).  Use     ;
; the get_cmos_item function to read from CMOS.                                ;
;                                                                              ;
;       Question (Q_FRAME_BUF_SIZE)                                            ;
;               Text    = "Frame Buffer Size"                                  ;
;               Options = "Disabled",                                          ;
;                         "1MB":DEFAULT:POWERON,                               ;
;                         "2MB"                                                ;
;       EndQuestion                                                            ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input: Nothing                                                               ;
;                                                                              ;
; Output: DX = Size of shared frame buffer memory in units of 64k              ;
;         CH = Flags                                                           ;
;              Bit 0: If set, frame buffer overlaps memory hole                ;
;                     If clear, frame buffer does not overlap memory hole      ;
;              Bit 6-1: Reserved                                               ;
;              Bit 7: If set, BIOS supports VUMA calls                         ;
;                     If clear, BIOS supports SMBA calls                       ;
;                     Both VUMA and SMBA may be supported in one BIOS, but one ;
;                     interface must be the primary interface at any given time;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetCmosData	proc near

;  DX comes from CMOS but not all 16 bits need to be stored because the
;     chipset probably supports only a limited number of possible sizes
;  CH bit 0 comes from CMOS for SMBA only (it can always be returned as
;     0 under VUMA)
;  CH bit 7 can always be returned as 1 for VUMA or 0 for SMBA
	xor	dx, dx
	xor	ch, ch
	ret
FrameBufGetCmosData	endp


;---------------------------------------;
; FrameBufMakeVisible                   ;
;---------------------------------------;--------------------------------------;
; This function should make the VUMA/SMBA shared frame buffer memory visible   ;
; to the CPU.                                                                  ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input: Nothing                                                               ;
;                                                                              ;
; Output: Nothing                                                              ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufMakeVisible	proc near
	ret
FrameBufMakeVisible	endp


;---------------------------------------;
; FrameBufMakeInvisible                 ;
;---------------------------------------;--------------------------------------;
; This function should make the VUMA/SMBA shared frame buffer memory invisible ;
; to the CPU.                                                                  ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input: Nothing                                                               ;
;                                                                              ;
; Output: Nothing                                                              ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufMakeInvisible	proc near
	ret
FrameBufMakeInvisible	endp


;---------------------------------------;
; FrameBufGetFbBanks                    ;
;---------------------------------------;--------------------------------------;
; This function returns which memory banks can be used by a VUMA/SMBA device.  ;
; The return value may depend on which banks are populated with memory.        ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input: Nothing                                                               ;
;                                                                              ;
; Output: AX = Bitmap of memory banks that can support a VUMA/SMBA device.     ;
;              Set this value to 0000h to force VUMA/SMBA support to disabled. ;
;              Otherwise: Bit 0: If set, bank 0 can be used by VUMA/SMBA       ;
;                         Bit 1: If set, bank 1 can be used by VUMA/SMBA       ;
;                         ...                                                  ;
;                         Bit 15: If set, bank 15 can be used by VUMA/SMBA     ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetFbBanks	proc near
	xor	ax, ax
	ret
FrameBufGetFbBanks	endp


;---------------------------------------;
; FrameBufGetMinMaxSize                 ;
;---------------------------------------;--------------------------------------;
; This function returns the minimum and maximum VUMA/SMBA frame buffer size,   ;
; as well as its granularity.                                                  ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input: Nothing                                                               ;
;                                                                              ;
; Output: BX = Minimum amount of memory that can be allocated to frame         ;
;              buffer in units of 64K                                          ;
;         CX = Maximum amount of memory that can be allocated to frame         ;
;              buffer in units of 64K                                          ;
;         DI = Granularity of memory that can be allocated to frame            ;
;              buffer in units of 64K                                          ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetMinMaxSize	proc near
	xor	bx, bx			;Assume min mem size is 0
	xor	cx, cx			;Assume max mem size is 0
	xor	di, di			;SMB granularity in 64kb
	ret
FrameBufGetMinMaxSize	endp


;---------------------------------------;
; FrameBufGetBankMemSize                ;
;---------------------------------------;--------------------------------------;
; This function returns the amount of memory installed in the given bank.      ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input:  CL = Memory bank number in the range 00h - 0Fh                       ;
;                                                                              ;
; Output: AX = Amount of memory installed in bank in units of 64K              ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetBankMemSize	proc near
	xor	al,al	        ; SiS always using RAS0
	call	get_bank_size   ;; only return ond side size
	shl	ax,4h		; ax in 64k
	ret
FrameBufGetBankMemSize	endp


;---------------------------------------;
; FrameBufGetBankMemSpeed               ;
;---------------------------------------;--------------------------------------;
; This function returns the speed of memory installed in the given bank.  If   ;
; this system supports just one global memory speed setting for all banks (i.e.;
; one setup question for 70ns/60ns), then just ignore the bank number input    ;
; and return the global value.                                                 ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input:  CL = Memory bank number in the range 00h - 0Fh                       ;
;                                                                              ;
; Output: AL = Speed of memory in nanoseconds                                  ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetBankMemSpeed	proc near
	mov	al, 70d			;70ns
	ret
FrameBufGetBankMemSpeed	endp


;---------------------------------------;
; FrameBufGetBankMemType                ;
;---------------------------------------;--------------------------------------;
; This function returns the type of memory that is installed in a given bank.  ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input:  CL = Memory bank number in the range 00h - 0Fh                       ;
;                                                                              ;
; Output: AL = Memory type                                                     ;
;                0 = Empty                                                     ;
;                1 = Fast page mode                                            ;
;                2 = EDO                                                       ;
;                3 = SDRAM                                                     ;
;                4 = PN EDO (Burst EDO)                                        ;
;                5-F = Reserved                                                ;
;                                                                              ;
; Destroys: Nothing                                                            ;
;------------------------------------------------------------------------------;
FrameBufGetBankMemType	proc near
	mov	al,03h		; always SDRAM
	ret
FrameBufGetBankMemType	endp


;---------------------------------------;
; FrameBufGetAsymMemInfo                ;
;---------------------------------------;--------------------------------------;
; This function returns a flag that indicates if the given bank is populated   ;
; with asymetrical memory and the geometry of that memory.                     ;
;                                                                              ;
; NOTE: This function is needed in both VUMA and SMBA.                         ;
;                                                                              ;
; Input:  CL = Memory bank number in the range 00h - 0Fh                       ;

⌨️ 快捷键说明

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