Specifications

©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 55
14 Sample Programs
14.1 SB600 Register Initialization on Power-Up
14.1.1 Initialization of PCI IRQ Routing Before Resource Allocation
The PCI IRQs are programmed using index/data format through registers C00h/C01h. Index 0
through 3, and 9 through 0Ch, are for PCI IRQ lines. Index 4 is for SCI interrupt generated for
ACPI, and Index 5 is for SMBus interrupt.
Sample Program
The following routine initializes all PCI interrupts to zeroes.
PciIrqInit proc near
push ax ; Save the registers used in the routine
push dx
mov ax,00h ; Start with index = 0, data = 0
ClearPciIrq0To5:
mov dx,0C00h ; PCI interrupt index port
out dx,al ; Set index
mov dx,0C01h ; PCI interrupt data port
xchg ah,al ; Get data in AL = 0
out dx,al
xchg ah,al ; AL = Index
inc al ; Point to next index
cmp al, 05h ; Max index in 0 to 5 series
jbe ClearPciIrq0To5
; Initialize for index 9 through 0Ch
mov ax,0009h ; To clear from index 09 to 0Ch
ClearPciIrq9ToC:
mov dx,0C00h ; PCI interrupt index port
out dx,al ; Set index
mov dx,0C01h ; PCI interrupt data port
xchg ah,al ; Get data in AL = 0
out dx,al
xchg ah,al ; AL = Index
inc al ; Point to next index