📄 runfb.asm
字号:
; ;
; Output: ;BL = Asymetric flag ;
; ; 00h = Normal (symetric memory) ;
; ; 01h = Asymetric memory ;
; BL = MA table delection
; DL = Number of column address lines in asymetric memory (value is ;
; not used if BL=00h) ;
; DH = Number of row address lines in asymetric memory (value is ;
; not used if BL=00h) ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetAsymMemInfo proc near
push ax
push bx
mov ah,060h
call read_pci_byte
and ax,0fh ; it is dram type
shl ax,1
mov bx,offset cgroup:sdram_CASRAS_translate_table
add bx,ax
mov dx,cs:[bx]
shr ax,1
pop bx
mov bl,al
pop ax
ret
FrameBufGetAsymMemInfo endp
sdram_CASRAS_translate_table label byte
dw 0c08h ; 12*8
dw 0e08h ; 14*8
dw 0e08h ; 14*8
dw 0f08h ; 15*8
dw 0c09h ; 12*9
dw 0e09h ; 14*9
dw 0e09h ; 14*9
dw 0f09h ; 15*9
dw 0c0ah ; 12*10
dw 0e0ah ; 14*10
dw 0e0ah ; 14*10
dw 0f0ah ; 15*10
dw 0d08h ; 13*8
sdram_CASRAS_translate_table_end label byte
;;===================================================
;******************************************************************************;
; ;
; Chipset Hooks Needed by VUMA Only ;
; ;
;******************************************************************************;
if MKF_VUMA_SUPPORT
;---------------------------------------;
; FrameBufGetAllBanks ;
;---------------------------------------;--------------------------------------;
; This function returns a bitmap indicating which memory banks the chipset ;
; supports. This bitmap does not depend on which banks are currently ;
; populated or empty. ;
; ;
; NOTE: This function only needs to be implemeted for VUMA support. SMBA ;
; support does not use this function. ;
; ;
; Input: Nothing ;
; ;
; Output: AX = Bitmap of banks supported by chipset ;
; Bit 0: If set, bank 0 is supported by chipset ;
; Bit 1: If set, bank 1 is supported by chipset ;
; ... ;
; Bit 15: If set, bank 15 is supported by chipset ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetAllBanks proc near
ret
FrameBufGetAllBanks endp
;---------------------------------------;
; FrameBufGetCurBanks ;
;---------------------------------------;--------------------------------------;
; This function returns a bitmap indicating which memory bank(s) are currently ;
; is use by the frame buffer. ;
; ;
; NOTE: This function only needs to be implemeted for VUMA support. SMBA ;
; support does not use this function. ;
; ;
; Input: Nothing ;
; ;
; Output: CX = Bitmap of banks currently used by frame buffer ;
; Bit 0: If set, bank 0 is in use by the frame buffer ;
; Bit 1: If set, bank 1 is in use by the frame buffer ;
; ... ;
; Bit 15: If set, bank 15 is in use by the frame buffer ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetCurBanks proc near
mov cx,01h ; Bank 0
ret
FrameBufGetCurBanks endp
;---------------------------------------;
; FrameBufGetVisibility ;
;---------------------------------------;--------------------------------------;
; This function returns a flag indicating whether or not the frame buffer is ;
; currently visible to the CPU. ;
; ;
; NOTE: This function only needs to be implemeted for VUMA support. SMBA ;
; support does not use this function. ;
; ;
; Input: Nothing ;
; ;
; Output: BH = 00h if frame buffer memory is currently not visible to the CPU ;
; 01h if frame buffer memory is currently visible to the CPU ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetVisibility proc near
xor bh,bh
ret
FrameBufGetVisibility endp
;---------------------------------------;
; FrameBufGetChipsetInfo ;
;---------------------------------------;--------------------------------------;
; This function return miscellaneous flags and information about the chipset's ;
; capabilities. ;
; ;
; NOTE: This function only needs to be implemeted for VUMA support. SMBA ;
; support does not use this function. ;
; ;
; Input: Nothing ;
; ;
; Output: DL = Flags ;
; Bit 0: Set if chipset supports non-cachable regions ;
; Bit 1: Set if chipset supports write-thru cache regions ;
; Bit 2: Set if chipset supports enable/disable cache at runtime ;
; Bit 3: Set if chipset supports enable/disable write-thru cache ;
; at runtime ;
; Bit 4: Set if chipset supports snooping (this bit is relevant ;
; only if synchronous DRAM is installed) ;
; Bit 5-7: Reserved ;
; SI = Chipset's non-cache region granularity in units of 64K ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetChipsetInfo proc near
ret
FrameBufGetChipsetInfo endp
;---------------------------------------;
; FrameBufGetMemCtrlSpeed ;
;---------------------------------------;--------------------------------------;
; This function returns the speed of the system's memory controller in ;
; nanoseconds. ;
; ;
; NOTE: This function only needs to be implemeted for VUMA support. SMBA ;
; support does not use this function. ;
; ;
; Input: Nothing ;
; ;
; Output: DH = Speed of the system's memory controller in nanoseconds ;
; (return 00h if unknown) ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetMemCtrlSpeed proc near
mov dh, 0
ret
FrameBufGetMemCtrlSpeed endp
;---------------------------------------;
; FrameBufGetBankVoltage ;
;---------------------------------------;--------------------------------------;
; This function returns the supply voltage of the memory installed in the given;
; memory bank as well as a flag indicating the presence of external buffers on ;
; the given DRAM 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: AL = Memory voltage in tenths of a volt (i.e. 50d = 5 volts) ;
; Return 00h if memory voltage is unknown ;
; AH = External buffering of DRAM bank ;
; 00h = Unknown ;
; 01h = Bank has external buffer ;
; 02h = Bank does not have external buffer ;
; 03h = Reserved ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
FrameBufGetBankVoltage proc near
xor ax,ax
ret
FrameBufGetBankVoltage endp
;---------------------------------------;
; FrameBufGetBankTimingInfo ;
;---------------------------------------;--------------------------------------;
; This function returns various timing parameters for the given bank. If the ;
; system supports only one set of global timing values for all banks of memory,;
; then ignore the bank number input and always return the global values. ;
; ;
; 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: AL = Memory timing information ;
; Bit 7-5: Reserved ;
; Bit 4: Burst order ;
; 0 = Interleave burst order ;
; 1 = Sequential burst order ;
; Bit 3-2: Burst size ;
; 00 = 1 Byte ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -