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

📄 oemiotbl.as_

📁 <BIOS研发技术剖析>书的源代码,包括完整的BIOS汇编语言源程序.
💻 AS_
📖 第 1 页 / 共 5 页
字号:
        page    ,132
        title   I/O Initialization, IRQ, DMA routing tables
;*****************************************************************;
;*****************************************************************;
;**                                                             **;
;**      (C)Copyright 1985-1997, American Megatrends, Inc.      **;
;**                                                             **;
;**                     All Rights Reserved.                    **;
;**                                                             **;
;**           6145-F Northbelt Pkwy, Norcross, GA 30071         **;
;**                                                             **;
;**                     Phone (770)-246-8600                    **;
;**                                                             **;
;*****************************************************************;
;*****************************************************************;

;---------------------------------------;
        include makeflag.equ
;---------------------------------------;
;---------------------------------------;
;       C O D E     S E G M E N T       ;
;---------------------------------------;
.386
cgroup  group   _text
_text segment word public USE16 'CODE'
         assume cs:CGROUP


;******************************************************************************;
;                                  BOOTBLOCK                                   ;
;******************************************************************************;

;---------------------------------------;
;       Register Initialization         ;
;---------------------------------------;
IFDEF   BOOTBLOCK
        public  BBlockIoDmaRoutingTable
        public  BBlockIoIrqDmaRoutingTable
IF MKF_ALI5123
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;              Device   Data/Reg
;             --------  --------
        db      000h
        dw              8024h           ;Set IRQ 8 active low
        
        db      007h
        dw              0171h           ;set IRQ 1
        db      007h
        dw              0C72h           ;set IRQ 12 for PS/2 mouse
        
        db      008h
        dw              08E4h           ;for KB soft reset ctrl
        db      008h
        dw              08E5h           ;for GA-20 enable
        db      008h
        dw              09EDh           ;for KeyLock
        db      008h
        dw              0130h           ;activate logical device 8
        
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 3

ENDIF
IF MKF_DSCH20
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      003h,   0F0h            ;Floppy
        db      016h,   0FCh            ;RTC
        db      018h,   0C0h            ;KBC
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_ITE8661
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;              Device   Data/Reg
;             --------  --------
        db      000h
        dw              0024h           ; Bit1 =0 Clock 24h
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 3

ENDIF

IF MKF_ITE8680 
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;              Device   Data/Reg
;             --------  --------
        db      005h
        dw              00F0h           ;for KB Special Configuration (such as
                                        ;Key Lock, KBC Clk)
        db      005h
        dw              0130h           ;activate logical device 5 (KBC)

        db      006h
        dw              0130h           ;activate logical device 6 (KBC Mouse)
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 3

ENDIF
IF MKF_NAT303
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      000h,     000h          ; CR 0 
        db      001h,     000h          ; CR 1
        db      002h,     008h          ; CR 2
        db      003h,     001h          ; CR 3
        db      004h,     002h          ; CR 4
        db      005h,     04Fh          ; CR 5 KB & RTC
        db      006h,     098h          ; CR 6
        db      007h,     000h          ; CR 7 
        db      009h,     0C0h          ; CR 9
        db      00Bh,     0CFh          ; CR B
        db      00Dh,     0CFh          ; CR D
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_NAT306
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      000h,     000h          ; CR 0
        db      001h,     000h          ; CR 1
        db      002h,     000h          ; CR 2
        db      003h,     001h          ; CR 3
        db      004h,     002h          ; CR 4
        db      005h,     00Fh          ; CR 5 KB & RTC
        db      006h,     000h          ; CR 6
        db      007h,     000h          ; CR 7
        db      009h,     0C0h          ; CR 9
        db      00Ah,     000h          ; CR A
        db      00Bh,     0CFh          ; CR B
        db      00Ch,     000h          ; CR C
        db      00Dh,     0CFh          ; CR D
        db      00Eh,     000h          ; CR E
        db      00Fh,     01Eh          ; CR F
        db      010h,     000h          ; CR 10
        db      011h,     000h          ; CR 11
        db      012h,     030h          ; CR 12
        db      018h,     000h          ; CR 18
        db      019h,     000h          ; CR 19
        db      01Bh,     030h          ; CR 1B
        db      01Ch,     000h          ; CR 1C
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_NAT336
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      002h,     000h          ; CR 2
        db      003h,     001h          ; CR 3
        db      006h,     000h          ; CR 6
        db      007h,     000h          ; CR 7
        db      009h,     0C0h          ; CR 9
        db      01Bh,     079h          ; CR 1B
        db      040h,     000h          ; CR 40
        db      041h,     006h          ; CR 41
        db      048h,     0FCh          ; CR 48
        db      049h,     000h          ; CR 49
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_NAT338
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      000h,     008h          ; CR 0
        db      002h,     000h          ; CR 2
        db      003h,     001h          ; CR 3
        db      006h,     000h          ; CR 6
        db      007h,     000h          ; CR 7
        db      009h,     0C0h          ; CR 9
        db      01Bh,     008h          ; CR 1B
        db      041h,     036h          ; CR 41
        db      048h,     0FCh          ; CR 48
        db      049h,     000h          ; CR 49
        db      051h,     000h          ; CR 51
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_SMC67X
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      022h,     001h  ;PWR ON FDC

;-----------------------------------------------------------------------------;
;;; Select one of the following:
;;; 12 Bit Address Qualification, for either standard or Serialized IRQ system
        db      024h,     004h  ; OSC is on, 12 Bit Address Qualification

;;; 16 Bit Address Qualification, for Serialized IRQ system only
;;;	db      024h,     044h  ; OSC is on, 16 Bit Address Qualification
;-----------------------------------------------------------------------------;

        db      007h,     007h  ; select logical device 7 (KBC)
        db      070h,     001h  ; set IRQ 1
        db      072h,     00Ch  ; set IRQ 12 for PS/2 mouse
        db      0F0h,     000h  ; KRST_GA20

        db      007h,     008h  ;Select logical device 8 (Aux I/O)
                                ;Pin Multiplexing Control
;-----------------------------------------------------------------------------;
;;; Select one of the following:
;;; For Serialized IRQ system
        db      0C0h,     006h  ;Serial IRQ, DMA 3

;;; For Normal IRQ system
;;;     db      0C0h,     002h  ;DMA 3
;-----------------------------------------------------------------------------;

        db      030h,     001h  ;Enable (Auxiliary I/O)
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_SMC68X
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      022h,     001h          ; PWR ON FDC
        db      024h,     084h          ; OSC is on

        db      007h,     000h          ; select logical device 0 (FDC)
        db      060h,     003h
        db      061h,     0f0h          ; set FDC port addr to 3F0h
        db      070h,     006h          ; set to IRQ 6

        db      007h,     007h          ; select logical device 7 (KBC)
        db      070h,     001h          ; set IRQ 1
        db      072h,     00Ch          ; set IRQ 12 for PS/2 mouse
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_SMC932
        public  BBLOCKREGINITCOUNT
        public  BBlockRegisterInitTableStart
        public  BBlockRegisterInitTableEnd
BBlockRegisterInitTableStart:
;                        Power
;             Register  On Value
;             --------  --------
        db      022h,     001h          ; PWR ON FDC
        db      024h,     0c4h          ; OSC is on

        db      007h,     000h          ; select logical device 0 (FDC)
        db      060h,     003h
        db      061h,     0f0h          ; set FDC port addr to 3F0h
        db      070h,     006h          ; set to IRQ 6
        db      074h,     002h          ; set to DMA 2

        db      007h,     006h          ; select logical device 6 (RTC)
        db      070h,     008h          ; set IRQ 8

        db      007h,     007h          ; select logical device 7 (KBC)
        db      070h,     001h          ; set IRQ 1
        db      072h,     00Ch          ; set IRQ 12 for PS/2 mouse
        db      007h,     008h          ; select logical device 8 (Aux I/O)
        db      0E8h,     012h          ; for KB soft reset ctrl
        db      0EDh,     008h          ; for GA-20 enable
BBlockRegisterInitTableEnd:

BBLOCKREGINITCOUNT = (BBlockRegisterInitTableEnd - BBlockRegisterInitTableStart) / 2

ENDIF
IF MKF_WIN977
        public  BBLOCKREGINITCOUNT
	public	BBLOCKFDCREGINITCOUNT
	public	BBLOCKKBCREGINITCOUNT

⌨️ 快捷键说明

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