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

📄 oempost.asm

📁 AMI 主板的BIOS源码
💻 ASM
📖 第 1 页 / 共 5 页
字号:
;       EOI has not yet been issued to Interrupt Controller             ;
; output:                                                               ;
;       NC      display change successful                               ;
;       CY      display change not successful                           ;
; register usage : Do not destroy any register                          ;
;                                                                       ;
;                       IMPLEMENTATION NOTE                             ;
; 1. This routine will be called whenever display needs to changed to   ;
; OEM display mode.                                                     ;
; 2. Uncompress the OEM logo module, save the segment where the OEM logo;
; module is uncompressed, give control to OEM logo module to display the;
; OEM logo.                                                             ;
; 3. The OEM Logo Module ID is 0Eh.                                     ;
; 5. The OEM Logo Module can be incorporated into the system ROM image  ;
; by AMIMM utility.                                                     ;
; 6. If you need to have separate module for OEM Logo Code and Data,    ;
; use Module ID 0Eh for Code and any user defined module ID for Data.   ;
; 7. The necessary data areas in DIMDATASEG is                          ;
;       OemSegment      DW      ; contain the segment where the         ;
;                               ; OEM logo module is uncompressed       ;
;                                                                       ;
;                       IMPLEMENTATION ALGORITHM                        ;
; Step-0: Check whether OEM logo module is already uncompressed in      ;
; OemSegment. If already uncompressed, go to Setp-4.                    ;
; Step-1: Uncompress the OEM logo module.                               ;
; Step-2: If uncompress is not successful, Set Carry flag (CY), Exit.   ;
; Step-3: Save the segment where OEM logo module is uncompressed in     ;
;         OemSegment data area in DIMDATASEG.                           ;
; Step-4: Give control to OEM logo module.                              ;
; Step-5: Reset carry flag (NC), Exit.                                  ;
;                                                                       ;
;                       OEM LOGO MODULE FORMAT                          ;
; Note that this format is a suggesstion only (the code given here is   ;
; written based on this format). Any format is allowed in which case    ;
; the code in this routine needs to be modified accordingly.            ;
;                                                                       ;
; Offset-0: Word having the signature 55AA.                             ;
; Offset-2: Byte having the module size in 512Bytes unit.               ;
; Offset-3: The entry point of OEM logo display module.                 ;
;                                                                       ;
;-----------------------------------------------------------------------;
        extrn   uncom_segment:word
        extrn   scratch_segment:word
        extrn   uncompress_general_module:near
        public  change_display_to_oem
change_display_to_oem:
        push    es
        push    ds
        pushad
        push    DIMDATASEG
        pop     ds
        mov     ds,ds:word ptr OemSegment
        cmp     ds:word ptr [0000h],0aa55h
        jz      short cdto_01           ; OEM module already uncompressed
;---------------------------------------;
; uncompress OEM code
        cli
        mov     ax,cgroup:uncom_segment
        mov     ds:word ptr OemSegment,ax
        mov     es,ax
        mov     ds,cgroup:scratch_segment
        mov     bl,graphic_logo_code_id
        call    uncompress_general_module; uncompress OEM module
        stc                             ; display change not successful
        jnz     short cdto_00           ; no OEM module present
;---------------------------------------;
;; for 256 color Logo
	mov	es,cgroup:uncom_segment
	mov	ds,cgroup:scratch_segment
	mov	bl,33h;graphic_logo_data_id
	call	uncompress_general_module; uncompress OEM module
	stc				; display change not successful
	jnz	short cdto_00		; no OEM module present
;	push	ds
;        push    DIMDATASEG
;        pop     ds
;        mov     ax,cgroup:uncom_segment
;	shr	cx,4
;	add	ax,cx
;        mov     ds:word ptr OemSegment,ax
;        mov     es,ax
;        mov     ds,cgroup:scratch_segment
;        mov     bl,graphic_logo_data_id 
;        call    uncompress_general_module; uncompress OEM module
;        stc                             ; display change not successful
;	pop	ds
;        jnz     short cdto_00           ; no OEM module present
;---------------------------------------;
cdto_01:
        sti
        push    cs
        push    offset cgroup:cdto_ret
        push    ds
        push    0003h                   ; OEM routine offset is at 0003h
        retf
cdto_ret:
        clc                             ; display change successful
cdto_00:
        sti
        popad
        pop     ds
        pop     es
        ret
;-----------------------------------------------------------------------;
ENDIF
;-----------------------------------------------------------------------;
;			GET_ONBOARD_DEVICE_INFO				;
; this routine returns the information of concerned onboard device.	;
; input :								;
;	DS:SI	ptr to concerned onboard device data structure		;
;		(See Note-1 for device type details)			;
; output:								;
;	CY	error (e.g. routine is not implemented)			;
;		(in this case, device will be assumed to be disabled)	;
;	NC	successful						;
;		AL	00, onboard device is disabled			;
;			01, onboard device is enabled			;
;  register usage : do not destroy any register except AL		;
; NOTE:									;
; 1. The input DS:SI points to the start of the concerned onboard device;
; device information structure. The bit6-0 of the byte at offset-4 of	;
; the structure contains the device type information as follows:	;
;	device type	device						;
;		00	Undefined					;
;		01	Other						;
;		02	Unknown						;
;		03	Video						;
;		04	SCSI Controller					;
;		05	Ethernet					;
;		06	Token Ring					;
;		07	Sound						;
;		08-7F	Undefined					;
; 2. If the device type is Undefined, return with AL = 00, disabled	;
;-----------------------------------------------------------------------;
	public	get_onboard_device_info
get_onboard_device_info:
	stc
	ret
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
;               INITIALIZATION TABLES USED IN CP_INIT                   ;
;  Put all the tables which are used in CP_INIT hook in POST.ASM        ;
;  and may be different for different OEMs.                             ;
;-----------------------------------------------------------------------;
        db      '$$CT'
        db      01h
        db      'SIS530 PCI Init', 0
        dw      offset cgroup:PCI_init_end
        db      00h
        db      'Register',0
        db      'Data',0
	public	pci_init_begin
	public	pci_init_end
PCI_init_begin        label   byte
	db	084h,060h		;
	db	085h,000h		;
	db	086h,003h		;
	db	088h,000h		;
	db	089h,010h		;
	db	08ah,07bh		;
	db	08ch,048h		;
	db	097h,001h		;
	db	0a0h,040h		;
	db	0a1h,040h		;
	db	0a2h,080h		;
	db	0a3h,000h		;

PCI_init_end          label   byte

;;----------------------------------------------------------------------;
        db      '$$CT'
        db      01h
        db      'SIS5595 PCI-ISA Init', 0
        dw      offset cgroup:PISAC_init_end
        db      00h
        db      'Register',0
        db      'Data',0
	public	PISAC_init_begin
	public	PISAC_init_end
PISAC_init_begin        label   byte
        db      041h,080h          ; INTA# Remapping Control
        db      042h,080h          ; INTB# Remapping Control
        db      043h,080h          ; INTC# Remapping Control
        db      044h,080h          ; INTD# Remapping Control

        db	046h,090h	   ; 16 bit & 8bit IO recovery time
;        db	047h,042h	   ;
        db	047h,040h	   ; 11/04/98
        db      049h,0ffh          ; ISA Master/DMA Memory Control
        db      04ah,010h          ; memory hole 16M top
        db      04bh,00fh          ; memory hole 15M bottem
	db	065h,0c0h	   ; PHOLDL# timer
	db	066h,040h	   ; Priority timer
	db	067h,004h	   ; Extended DACK#/Subtractive Decode
	db	06ah,080h	   ; SCI router
PISAC_init_end          label   byte

;;----------------------------------------------------------------------;

        db      '$$CT'
        db      01h
        db      'SIS5595 PMU Init', 0
        dw      offset cgroup:PMU_init_end
        db      00h
        db      'Register',0
        db      'Data',0
	public	PMU_init_begin
	public	PMU_init_end
PMU_init_begin        label   byte
;	db	05eh,0b2h		
;	db	05fh,000h
;	db	04dh,000h
	db	05ch,0b2h		; Set B2 I/O Trap for S/W SMI.
	db	05dh,000h

        db      060h,000h	   ; disable PMU SMI ENABLE bit
        db      061h,000h	   ;
        db      062h,000h	   ;
        db      063h,000h	   ;
        db      079h,000h	   ; clear Timer 0~2 count
        db      07ah,000h	   ;
        db      07bh,000h	   ;

PMU_init_end          label   byte


reg_struc               struc
        setup_Q         db      (?)
        reg_index       db      (?)
        mask_value      db      (?)    
	sis_dev_func_number dw  (?)
reg_struc               ends

	public	program_ws_table_start
	public	program_ws_table_end
program_ws_table_start          label   byte

reg_struc <Q_NA                      ,50h,080h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_NA_L2_HIT		     ,50h,020h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_NA_IO_CYCYE             ,50h,010h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
;reg_struc <Q_SINGLE_READ             ,52h,040h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
;reg_struc <Q_BRDY_L2_HIT             ,51h,040h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_DRAM_SYNCHRONOUS        ,52h,080h,S530_BUS_NUM + S530_DEV_FUNC_NUM> 
reg_struc <Q_GRAPWIN_ADD_DECODE      ,52h,020h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_SYNCHRONOUS_CPU_DRAM    ,52h,010h,S530_BUS_NUM + S530_DEV_FUNC_NUM>


reg_struc <Q_RAS_PULSE_WIDTH         ,56h,0C0h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_REFRESH_DEPTH           ,56h,030h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_REFRESH_TIME            ,56h,00ch,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_REFRESH_ENABLE          ,56h,002h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

reg_struc <Q_SDRAM_WR_RETIRE         ,5dh,010h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

reg_struc <Q_SDRAM_ROWHIT	     ,5eh,040h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

reg_struc <Q_DMA_REQ_CNT	     ,81h,010h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_TIME_WRITE_L2	     ,81h,008h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

reg_struc <Q_CONCURRENCY_MODE        ,82h,080h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_TRDY_ASSERT_TIME        ,82h,040h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_READ_PREFETCH	     ,82h,010h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_ADD_DECODE_TIME	     ,82h,001h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

reg_struc <Q_MEM_BURST_CNT	     ,83h,002h,S530_BUS_NUM + S530_DEV_FUNC_NUM>
reg_struc <Q_MEM_POST_WRITE          ,83h,001h,S530_BUS_NUM + S530_DEV_FUNC_NUM>

;;SIS 5595 
reg_struc <Q_16BIT_IO_CYCLE 	     ,46h,0c0h,S5595_PCI2ISA_DEV_FUNC_NUM shl 8 + S5595_BUS_NUM>
reg_struc <Q_8BIT_IO_CYCLE 	     ,46h,030h,S5595_PCI2ISA_DEV_FUNC_NUM shl 8 + S5595_BUS_NUM>
reg_struc <Q_16BIT_DMA_CYCLE 	     ,47h,030h,S5595_PCI2ISA_DEV_FUNC_NUM shl 8 + S5595_BUS_NUM>
reg_struc <Q_8BIT_DMA_CYCLE 	     ,47h,00ch,S5595_PCI2ISA_DEV_FUNC_NUM shl 8 + S5595_BUS_NUM>
reg_struc <Q_ISA_BUS_CLOCK 	     ,45h,0c0h,S5595_PCI2ISA_DEV_FUNC_NUM shl 8 + S5595_BUS_NUM>
;;SIS 5595 
					       
program_ws_table_end            label   byte

;*****************************************************************;
;*****************************************************************;
;**                                                             **;
;**     (C)Copyright 1985-1996, American Megatrends Inc.        **;
;**                                                             **;
;**                     All Rights Reserved.                    **;
;**                                                             **;
;**             6145-F, Northbelt Parkway, Norcross,            **;
;**                                                           

⌨️ 快捷键说明

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