📄 oempost.asm
字号:
;-----------------------------------------------------------------------;
; check_point : 57 ;
; This routine is called at the end of DO_MEMORY_SIZE in POST.ASM (i.e. ;
; any adjustment regarding base memory and extended memory is already ;
; done) and can be used to do any OEM specific stuff. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
;-----------------------------------------------------------------------;
oem_do_memory_size proc near
ret
oem_do_memory_size endp
;-----------------------------------------------------------------------;
; BEFORE_SETUP ;
;-----------------------------------------------------------------------;
; check_point : 86 ;
; This routie can be used for any programming before cmos setup in ;
; GS1.ASM. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
; NOTE: difference between INIT_BUFFER_BEFORE_SETUP and BEFORE_SETUP ;
; is in input values of DS, ES ;
;-----------------------------------------------------------------------;
extrn open_extend_cmos:near
extrn close_extend_cmos:near
public before_setup
before_setup:
; (CORE0218+)>
if (MKF_EVENT_LOG)
include event.equ
extrn dummy_ret:near
extern init_event_log_buffer(dummy_ret):near
mov ax,LOG_BUFFER_SEG
call init_event_log_buffer
endif; if (MKF_EVENT_LOG)
; <(CORE0218+)
sub dx,dx
mov ah,1
int 17h
mov dx,MKF_LM78_BASE_ADDRESS
mov al,40h
out dx,al
jmp short $+2
inc dx
in al,dx
jmp short $+2
jmp short $+2
cmp al,01h
mov al,01h
jz lm78_present
mov al,3
lm78_present:
mov byte ptr cs:[0f6c6h], al; Hardware Monitor Disabled
;; PaiLin debug {
; pushf
; call open_extend_cmos
; mov cx,6
;write_password_cmos:
; mov al,8fh
; add al,cl
; call cmos_data_in_x
; mov ah,al
; mov al,97h
; add al,cl
; call cmos_data_out_x
; loop write_password_cmos
; call close_extend_cmos
; popf
;; } PaiLin debug
;; PaiLin debug {
;;; PaiLin { 13:26:57 Tue 06-01-1999
;;; f000 cacheable for setup cursor move speed
; mov ah,76h
; call read_pci_byte
; or al,40h
; call write_pci_byte
;;; } PaiLin
;; } PaiLin debug
ret ; Keyboard Password Enable
;-----------------------------------------------------------------------;
; OEM_PROGRAM_PARAMETERS_AFTER_SETUP ;
;-----------------------------------------------------------------------;
; check_point : 8C ;
; This routine is called at the end of PROGRAM_PARAMETERS_AFTER_SETUP in;
; POST.ASM and can be used to do any OEM specific programming (also OEM ;
; specific setup programmign) even if cmos setup is not executed. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
;-----------------------------------------------------------------------;
extrn open_apc_cmos:near
extrn close_apc_cmos:near
extrn read_apc_cmos:near
oem_program_parameters_after_setup proc near
mov ah,08h
call read_sio_byte
cmp al,01h
jbe short ps2_mouse_present
;; Next revision will be solve this bug.
mov bh,05h
call read_apc_cmos
test bl,40h
jnz short ps2_mouse_present
test byte ptr cgroup:rt_cmos_byte,40h ; Check PS/2 mouse present?
jnz short ps2_mouse_present
mov ah,70h
call read_sio_byte
and al, not 4
call write_sio_byte
ps2_mouse_present:
ret
oem_program_parameters_after_setup endp
;-----------------------------------------------------------------------;
; C800_CONTROL_BEFORE ;
;-----------------------------------------------------------------------;
; check_point : 96 ;
; this routine is called for ADAPTER ROM shadow before C800 ROM control ;
; in GS1.ASM.
; if DIM is present, this routine will be called only if DIM can not ;
; initialise the optional ROMs. this routine will not be called if DIM ;
; is present. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; output: ;
; (ZF) 1 -> no further control to C800 ROM ;
; 0 -> C800 ROM will get control ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
;-----------------------------------------------------------------------;
public c800_control_before
c800_control_before:
or sp,sp ; (ZF) = 0, give control to C800
ret ; else no control to C800_control_after
;-----------------------------------------------------------------------;
; C800_CONTROL_AFTER ;
;-----------------------------------------------------------------------;
; check_point : 98 ;
; this routine is always called from GS1.ASM after ADD-ON ROMs are ;
; initialized. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
;-----------------------------------------------------------------------;
extrn init_gpc_apm:near
extrn check_cmos_data:near
; extrn disable_l1_cache:near
; extrn enable_l1_cache:near
extrn enable_l2_cache:near
public c800_control_after
c800_control_after:
; initialise SMRAM for greenpc power management..
call init_gpc_apm ; initialise SMRAM for green PC
; enable/disable cache according to setup selection..
and ds:byte ptr [0016h],11101111b; indicate cache disabled
mov al,q_internal_cache
call check_cmos_data
jnz ct_7 ; disable internal cache
call disable_l1_cache
jmp short ct_8
ct_7:
call enable_l1_cache
mov al,q_external_cache
call check_cmos_data
jz ct_8 ; disable ext cache
call enable_l2_cache ; enable ext cache
or ds:byte ptr [0016h],00010000b; indicate cache enabled
ct_8:
ret
;-----------------------------------------------------------------------;
; OEM_PROGRAM_WS ;
;-----------------------------------------------------------------------;
; check point : A4 ;
; This routine is used to do any OEM specific time dependent programming;
; e.g. wait state and called from PROGRAM_WS_SHADOW_CACHEABLE routine in;
; POST.ASM. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
;-----------------------------------------------------------------------;
oem_program_ws proc near
and byte ptr ds:[15h],0bfh ; Clear SWAP flag for INT-40 routine
if MKF_ITE8661
mov ax,Q_FLOPPY_SWAP
call get_cmos_item ;AL = 0/1 for drive swap disable/enable
jz drive_not_swap
mov ah,04h
drive_not_swap:
mov al,q_fdd_access_control
call get_cmos_item ;AL = 0/1 for drive protect disable/enable
jz drive_protect
or ah,1
drive_protect:
mov bl,0
mov al,0f0h
extrn IT8661FWriteIO:near
call IT8661FWriteIO
endif
if MKF_WIN877
mov al,Q_FLOPPY_SWAP
call get_cmos_item
jz no_swap
and byte ptr ds:[15h],0bfh ; Clear SWAP flag for INT-40 routine
mov ax,8001h
extrn Win877WriteIO:near
call Win877WriteIO
no_swap:
mov al,q_fdd_access_control
call get_cmos_item
jz fdd_rw
mov ax,3008h
call Win877WriteIO
fdd_rw:
endif
ret
oem_program_ws endp
;-----------------------------------------------------------------------;
; E000_CONTROL_BEFORE ;
;-----------------------------------------------------------------------;
; check point : A7 ;
; this routine is called for OPTIONAL ROM shadow before E000 ROM control;
; in GS1.ASM. ;
; input : ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; output: ;
; (ZF) 1 -> no further control to E000 ROM. ;
; 0 -> E000 ROM will get control ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
; NOTE: ;
; 1. Disable E000 shadow. ;
; 2. Disable E000 ROM CS. ;
; Purpose: if any ISA ROM is present at E000, this routine will enable ;
; ISA ROM access. ;
;-----------------------------------------------------------------------;
public e000_control_before
e000_control_before:
; Disable E000 Shadow
mov ax,7400h
call write_pci_byte
mov ah,75h
call write_pci_byte
; Disable E000 ROM CS
mov ah,040h
call read_sio_byte
and al,0fch
call write_sio_byte
or sp,sp ; (ZF) = 0, give control to E000
ret ; else no control to e000_control_after
;-----------------------------------------------------------------------;
; E000_CONTROL_AFTER ;
;-----------------------------------------------------------------------;
; check point : A9 ;
; this routine is called for ADAPTER ROM shadow after E000 ROM control ;
; in GS1.ASM. ;
; input : ;
; CX = 0000H, no ISA ROM found at E000 segment ;
; <>0000H, some ISA ROM found at E000 segment ;
; SS 0030H ;
; DS 0040H ;
; ES 0000H ;
; stack available ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS ;
; NOTE: ;
; 1. If no ISA ROM found at E000, simply ret. ;
; 2. If ISA ROM found at E000 and if E000 shadow is enabled in ;
; Setup (there is no Setup Question for this, you need to implement
; it), enable E000 shadow and copy E000 ISA ROM to E000 shadow. ;
;-----------------------------------------------------------------------;
public e000_control_after
e000_control_after:
jcxz eca_00 ; no ROM found at E000 segment
; ROM found at E000 segment, write code here to enable E000 shadow and
; copy E000 ROM to shadow.............................................
eca_00:
ret
;-----------------------------------------------------------------------;
; OEM_SPECIAL_CONFIG_DISPLAY ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -