📄 oempdim.asm
字号:
page ,132
title OEM POST HOOKS FOR DIM
;-----------------------------------------------------------------------;
; This file is derived from POSTDIM.ASM and NPOSTDIM.ASM files. ;
; ======================== NOTE === NOTE === NOTE ===================== ;
; If the routine name in this file starts with "OEM_", then this routine;
; is called from the corresponding generic chipset hook (in POSTDIM.ASM ;
; or NPOSTDIM.ASM file). ;
; ======================== NOTE === NOTE === NOTE ===================== ;
; If the routine name in this file does not start with "OEM_", then this;
; routine is called directly from Core file. ;
;-----------------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends, Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F Northbelt Pkwy, Norcross, GA 30071 **;
;** **;
;** Phone (770)-246-8600 **;
;** **;
;*****************************************************************;
;*****************************************************************;
;****************************************************************************;
; $Header: /BIOS/OEM/GENERIC/630/Intel/440BX/Desktop CR/OEMPORT/OEMPDIM.ASM 1 9/15/97 5:56p Juand $
;
; $Revision: 1 $
;
; $Date: 9/15/97 5:56p $
;****************************************************************************;
;****************************************************************************;
; Revision History
; ----------------
; $Log: /BIOS/OEM/GENERIC/630/Intel/440BX/Desktop CR/OEMPORT/OEMPDIM.ASM $
;
; 1 9/15/97 5:56p Juand
;
; 1 9/11/97 6:41p Juand
;
; 1 6/05/97 12:43p Debkumar
;
; 1 1/31/97 1:15p Debkumar
; New files for 62700.
;
; 1 1/13/97 2:22p Debkumar
; New file for 6.27.00.
;
;****************************************************************************;
;---------------------------------------;
include dim.equ
include devnode.equ
include rt.equ
include escd.equ
include pci.equ
include pnp.equ
include setupequ.ext
include sis530.equ
include makeflag.equ
include P6access.mac
include P6.equ
;---------------------------------------;
extrn dih_scratch_data: byte
extrn dih_manual_ide_id: byte
extrn SysStatus: dword
extrn IsaStatus: dword
extrn EisaStatus: dword
extrn PnPStatus: dword
extrn PciStatus: dword
extrn OwnerWork: byte
extrn FindDevID: dword
extrn FindDevSerial: dword
extrn FindDevLogID: dword
extrn FindDevType: dword
extrn FindDevTypeMask: dword
extrn FindDevInitAll: byte
extrn FindDevInitAllBoot: byte
extrn PnPFoundDevCSN: byte
extrn PnPFoundDevID: dword
extrn PnPFoundDevSer: dword
extrn PnPFoundDevLID: dword
extrn FindDevIncDev: byte
extrn FindDevIncBus: byte
extrn PCICommandValue: word
extrn PCIFoundDevID: dword
extrn PCIFoundDevFunc: dword
extrn PCIFoundDevBus: dword
extrn EscdFuncNum: byte
extrn EscdSlotNum: byte
extrn PCIROMMinBase: dword
extrn PCIROMMaxBase: dword
extrn MaxPCIBusNumber:byte
extrn ResMapStart: word
extrn ResMapEnd: word
;---------------------------------------;
cgroup group _text
_text segment word public 'CODE'
assume cs:cgroup
.386
;---------------------------------------;
;==============================================================================;
; ;
; Plug and Play ISA Device Initializer Hooks ;
; ;
;==============================================================================;
ifdef PNP
;---------------------------------------;
; dih_pnp_func_5 (General Device Init) ;
;---------------------------------------;--------------------------------------;
; This function is called by the Plug & Play Device Initializer (DI-PNP.ASM) ;
; during function 5 (General Device Init). ;
; ;
; This function should be used to implement the following setup question: ;
; Boot to PnP operating system: Yes/No ;
; ;
; This question is needed because PnP operating systems (Windows 95) prefer ;
; that the BIOS initialize only the PnP cards that are needed for booting the ;
; machine (VGA, SCSI, etc). The OS will configure all other PnP cards. If ;
; the user is booting to a non-PnP OS (NetWare / Unix), then all PnP cards ;
; must be enabled. The variable FindDevInitAllBoot controls this feature, ;
; when set to 00h all PnP cards will be configured. When FindDevInitAllBoot ;
; is set to non-zero, then only PnP cards needed for boot will be configured. ;
; ;
; Input: SI = Offset of the NVRam workspace (in _dimdata seg) ;
; DS = ES = _dimdata Segment ;
; ;
; Output: CF = Set if error, cleared otherwise ;
; ;
; Preserves: DS, ES, BP (all other registers are destroyed) ;
;------------------------------------------------------------------------------;
extrn check_cmos_data_far:near
public dih_pnp_func_5
dih_pnp_func_5 proc near
;---------------------------------------;
IF MKF_BAD_PNP_CARD
; James 042496: <CORE>--------------->>>;
; Don't init these two cards if found ;
; For ECP PnP & Other PnP card Bug. ;
;---------------------------------------;
pushad
mov si, offset cgroup:dih_check_pnp_device_func_5_table
mov cx, (offset cgroup:dih_check_pnp_device_func_5_table_end - offset cgroup:dih_check_pnp_device_func_5_table)/4
dpf5_0:
lods cs: dword ptr [si] ;Get PnP card ID from table
cmp eax, PnPFoundDevID ;Match with PnP card ID as found by BIOS ?
loopnz dpf5_0
popad
jz dpf5_1 ;Incompatible PnP card found, force PnP OS to yes
;<<<------------------------------------;
ENDIF
;---------------------------------------;
mov FindDevInitAllBoot, 000h;Init all PnP ISA device by default
;; Added by Abel Wu at 03/26/98 for aLI ALS100 Plus PnP Sound Card
cmp PnPFoundDevID, 10019305h
jz dihirim_01
mov al, Q_PNP_AWARE_OS ;"Plug and Play Aware O/S" question
call check_cmos_data_far
jz dihirim_01 ;Br if no PnP aware O/S
dpf5_1:
mov FindDevInitAllBoot, 0FFh;Init only boot PnP ISA devices
dihirim_01:
clc
ret
dih_pnp_func_5 endp
;---------------------------------------;
; dih_check_pnp_device_func_5_table ;
;---------------------------------------;--------------------------------------;
; This table is used by the Plug & Play Device Initializer (DI-PNP.ASM) ;
; during function 5 (General Device Init) from DIH_PNP_FUNC_5 hook. ;
; ;
; There are some PnP cards which can NOT be initialized (????). If these cards ;
; are found, set PnP aware OS to yes so that BIOS does not initialize these ;
; cards, OS will initialize these cards. ;
; ;
;------------------------------------------------------------------------------;
IF MKF_BAD_PNP_CARD
public dih_check_pnp_device_func_5_table
public dih_check_pnp_device_func_5_table_end
dih_check_pnp_device_func_5_table label byte
dd 2409143Eh ; OPTI924 PnP Sound card
dd 2509143Eh ; OPTI925 PnP Sound card
dd 1013B04Eh ; SuperExpress PnP Modem card
dd 68187316h ; ESS 1868 Sound card
dih_check_pnp_device_func_5_table_end label byte
ENDIF
;------------------------------------------------------------------------------;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -