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

📄 oempost.asm

📁 AMI 主板的BIOS源码
💻 ASM
📖 第 1 页 / 共 5 页
字号:

        ret
	public	pci_irq_avail_table
pci_irq_avail_table	label byte
if	MKF_ITE8661
	db	Q_IT8661F_COMB_PORT , 3
	db	Q_IT8661F_LPT_PORT , 7
	db	Q_IT8661F_COMA_PORT , 4
	db	Q_IT8661F_FLOPPY_CONTROLLER , 6
endif
if	MKF_WIN877
	db	Q_WIN877_COMB_PORT , 3
	db	Q_WIN877_LPT_PORT , 7
	db	Q_WIN877_COMA_PORT , 4
	db	Q_WIN877_FLOPPY_CONTROLLER , 6
endif
;-----------------------------------------------------------------------;
;                       GET_POST_INFO                                   ;
;-----------------------------------------------------------------------;
;  check point  : 25                                                    ;
;  check point  : 87                                                    ;
;  this routine returns information about POST.                         ;
;  input :                                                              ;
;       none                                                            ;
;  output:                                                              ;
;       ax      POST information                                        ;
;               bit-0 = 0 normal                                        ;
;                       1 clear password                                ;
;               bit-1 = 0 normal                                        ;
;                       1 clear CMOS                                    ;
;               bit-2 = 0 enable setup                                  ;
;                       1 disable setup                                 ;
;               bit15-3..reserved for future use                        ;
;  register usage : do not destroy any register except AX               ;
;-----------------------------------------------------------------------;
        public  get_post_info
get_post_info:
        xor     ax,ax
        ret
;-----------------------------------------------------------------------;
;                               C000_CONTROL_BEFORE                     ;
;-----------------------------------------------------------------------;
; check_point           : 2B                                            ;
; This routine is called for any work before C000 ROM control in RM.ASM.;
; If DIM is present, then this routine will be called only if DIM can not
; initialise the Video ROM i.e. if DIM can initialise video ROM, this   ;
; routine will NOT be called.                                           ;
; If DIM is present, this routine will not be called because DIM will   ;
; initialise the video ROM.                                             ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; output :                                                              ;
;       (ZF)    1 -> no further control to C000 ROM                     ;
;               0 -> C000 ROM will get control                          ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS      ;
; The following things can be done here:-                               ;
; 1.    You may want to bypass optional ROM control at C000:0..7FFF by  ;
;       setting (ZF) = 1.                                               ;
; 2.    You may have VIDEO ROM BIOS at  E000 segment, like most of the  ;
;       time Portable PC has this option and you do not want C000:0     ;
;       optional ROM control, you may give control to E000 segment      ;
;       at this point or in the next routine C000_CONTROL_AFTER.        ;
; 3.    You want to shadow C000 segment to E000 segment and give control;
;-----------------------------------------------------------------------;
        public  c000_control_before
c000_control_before:
        or      sp,sp                   ; (ZF) = 0, give control C000 ROM &
        ret                             ; C000_control_after else none.
;-----------------------------------------------------------------------;
;                               C000_CONTROL_AFTER                      ;
;-----------------------------------------------------------------------;
; check_point           : 2D                                            ;
; This routine is called for any special work after C000 ROM control in ;
; RM.ASM. this routine will always be called.                           ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS      ;
; The following things can be done here:-                               ;
; 1.    If you have E000 VIDEO ROM check for INT 10 vector, if any      ;
;       optional card already present or not, and depending on that you ;
;       may want to give coontrol to E000 VIDEO BIOS                    ;
;-----------------------------------------------------------------------;
        extrn   rt_cmos_byte:byte
        public  c000_control_after
c000_control_after:
	mov	ah,3eh
	call	read_bri_byte
	test	al,08h
	jnz	agp_present
	or	al,04h
	call	write_bri_byte
agp_present:
	mov	ah,70h
	call	read_sio_byte
	out	90h,al

	ret
;-----------------------------------------------------------------------;
;                         OEM_DO_MEMORY_SIZE                            ;
;-----------------------------------------------------------------------;
; 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

	
        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

⌨️ 快捷键说明

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