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

📄 tblacpi.equ

📁 dos下的USB源码(包括UHCI
💻 EQU
📖 第 1 页 / 共 2 页
字号:
;Inclusion guard
ifndef _acpi_equ_
_acpi_equ_  equ     1
;*****************************************************************;
;*****************************************************************;
;*****************************************************************;
;**                                                             **;
;**      (C)Copyright 1985-2002, American Megatrends, Inc.      **;
;**                                                             **;
;**                     All Rights Reserved.                    **;
;**                                                             **;
;**           6145-F Northbelt Pkwy, Norcross, GA 30071         **;
;**                                                             **;
;**                     Phone (770)-246-8600                    **;
;**                                                             **;
;*****************************************************************;
;*****************************************************************;
; $Header: /BIOS/Projects/800/AMD/Rhapsody/CORE/EM/ACPI/TBLACPI.EQU 1     1/02/03 6:55p Krishnab $
;
; $Revision: 1 $
;
; $Date: 1/02/03 6:55p $
;**********************************************************************;
;**********************************************************************;
; Revision History
; ----------------
; $Log: /BIOS/Projects/800/AMD/Rhapsody/CORE/EM/ACPI/TBLACPI.EQU $
; 
; 1     1/02/03 6:55p Krishnab
; Initial Check-In.
; 
; 3     10/01/02 10:13p Krishnab
; Made changes for latest label.
; 
; 19    9/26/02 6:16p Alexp
; Fix a bug in definition of PCI_CFG_CNTXT_OFFSET equate. Need to add
; MEM_TYPE4_OFFSET to calculate the beginning of save PCI config area in
; Type 4.
; 
; 18    8/27/02 12:14p Alexp
; Make use of SDL defined constants for Type3 & 4 memory size. Use SDL
; defined equate to allocate  System context storrage area after all ACPI
; tables in Type4.

;**********************************************************************;
;;; Example of location of ACPI Tables
;**********************************************************************;
MEM_TYPE3_START			equ		0
;IF MKF_A_S2 OR MKF_A_S3
;**********************************************************************;
;;;!!!!! ACPI TABLES + ACPI NVS TAKE 2 Segments !!!!
;;;!!!!! IF S3 IS SUPPORTED RESERVE 640k + 64k FOR TYPE4 (CPU MODULE REQUIREMENT)
;**********************************************************************;
;MEM_TYPE3_SIZE			=	010000h		; Max size 64k
;MEM_TYPE4_SIZE			=	0B0000h 	; Max Size 720k = 640k + 64k
;ELSE
;**********************************************************************;
;;; !!!!! ACPI TABLES + ACPI NVS TAKE 1 Segment !!!!
;**********************************************************************;
;MEM_TYPE3_SIZE			=	MKF_MEM_TYPE3_SIZE; 0F000h	; Max size = 60k or F000h
;MEM_TYPE4_SIZE			=	MKF_MEM_TYPE4_SIZE; 01000h  	; Min Size =  4k or 1000h
;ENDIF
;**********************************************************************;
;;; !!!!! ACPI TABLES + ACPI NVS TAKE 1 Segment !!!!
;**********************************************************************;
;MEM_TYPE3_SIZE          	=	8000h
;MEM_TYPE4_SIZE          	=	8000h  ; Min Size = 32k or 8000h
;**********************************************************************;

MEM_TYPE3_SIZE			equ	MKF_MEM_TYPE3_SIZE	; Equates are defined in coreacpi.sdl
MEM_TYPE4_SIZE			equ	MKF_MEM_TYPE4_SIZE	; Max size will change depend on A_S3 support flag setting in acpi.sdl


;;;;;;;; Type 3 fixed memory offsets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
RSDT_TBL_OFFSET			equ	MEM_TYPE3_START		; 0000 100h - 16 max size
XSDT_TBL_OFFSET			equ	MEM_TYPE3_START+0100h	; 100h 100h max size
FACP_TBL_OFFSET			equ	MEM_TYPE3_START+0200h	; 200h 100h max size
								; ACPI 1.0 FACP size 116 bytes
								; ACPI 1.0b FACP size 129 bytes
								; ACPI 2.0 FACP size 244 bytes
;;;;;;;; Type 4 fixed memory offsets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Fixed location. Type 4 memory starts immediately after Type 3
MEM_TYPE4_START			equ	MEM_TYPE3_START + MEM_TYPE3_SIZE
FACS_TBL_OFFSET			equ	MEM_TYPE4_START		; 0000
FACS_TABLE_SIZE			equ	64
;offset can be calculated 
;OEMB_AML_BUFFER_OFFSET		equ	FACS_TBL_OFFSET + FACS_TABLE_SIZE  ; 64, 4K - 64 bytes
; ........Reserve some space for external ACPI tables ..........
; Below equates are used only if S2 / S3 sleep supported
;pACPITbls4End_ptr = MEM_TYPE4_START + FACS_TABLE_SIZE + size AMLDATA + size genhdr
PCI_CFG_CNTXT_OFFSET		=	MEM_TYPE4_START + FACS_TABLE_SIZE + size AMLDATA + size genhdr
IFDEF MKF_ACPI_SB_ID
 IFDEF MKF_ACPI_BOARD_ID
  IF MKF_ACPI_SB_ID GE 4 OR MKF_ACPI_BOARD_ID GE 4
PCI_CFG_CNTXT_OFFSET		=	0					; Offset is calculated with respect to pACPITbls4End_ptr pointer
  ENDIF
 ENDIF
ENDIF
										; 2000, 1K Max
SIO_CFG_CNTXT_OFFSET		equ	PCI_CFG_CNTXT_OFFSET+01000h	; 3000, 4K Max
IO_CFG_CNTXT_OFFSET		equ	SIO_CFG_CNTXT_OFFSET+01000h	; 4000..FFFF
OEM_CFG_CNTXT_OFFSET		equ	IO_CFG_CNTXT_OFFSET+01000h	; 5000..FFFF

SAVE_SCRATCH_OFFSET		equ	MEM_TYPE4_START+10000h	; 10000
SAVE_64k_OFFSET			equ	SAVE_SCRATCH_OFFSET	; 10000 ; remains for backward compatibilty with older labels
;;;;;;;;;;;;;end Type 4 memory;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


; GENERIC ACPI FLAGS
DUAL_PIC			equ	00000000b	; Not used in ACPI rev 2.0 and higher
MULTIPLE_APIC			equ	00000001b	; Not used in ACPI rev 2.0 and higher
IF MKF_ACPI_APIC_TBL
DEFAULT_LOCAL_APIC_ADDRESS_X	equ	0FEE00000h
equ_int_model			equ	MULTIPLE_APIC
ELSE
equ_int_model			equ	DUAL_PIC
ENDIF
PCAT_COMPAT	  	  	equ	00000001b 	; System has PC AT compatible Dual 8259 Setup
if MKF_ACPI_S4BIOS
EQU_FACS_FLAGS			equ	00000001h
else
EQU_FACS_FLAGS			equ	00000000h
endif

;----------------------------------------------------------------------
; ACPI Tables generic structures
;----------------------------------------------------------------------
;<AMI_THDR_START>
;----------------------------------------------------------------------
;
; Name:	      	genhdr 
;
; Type:		Data Array
;
; Description:	ACPI table generic header structure.
;
; Referrals:	RSDT, FACP, APIC, DBGP, SPCR, BOOT, DSDT, SBST, SSDT, OEMB
;
; Notes:	Used as a header for all ACPI tables(with exception to RSDP & FACS).
;----------------------------------------------------------------------------
;<AMI_THDR_END>
genhdr    struct
        table_signature         db      4 dup(?)        ; 4 bytes
        table_length            dd      ?
        table_rev               db      1               ; Generic Table Revision. Each table can override this #
        table_checksum          db      ?               ; Updated in TBLACPI.ASM
        oem_id                  db      6 dup (0)	; OEM ID (6 bytes)	[TBLACPI.DAT]
        table_oem_id            db      8 dup (?)       ; OEM TABLE ID (8 bytes)[TBLACPI.DAT]
        table_oem_rev           dd      TBL_OEM_REV     ; OEM Supplied Revision	[OEMTACPI.EQU]
        table_creator_id        db      'MSFT'          ; Table Creator ID (4 bytes)
        table_creator_rev       dd      TBL_CREATOR_REV ; Table Creator Revision[TBLACPI.DAT]
genhdr    ends

;-----------------------------------------------------------------------;
;<AMI_THDR_START>
;----------------------------------------------------------------------------
;
; Name:	      	gas_str 
;
; Type:		Data Array
;
; Description:	Generic Address Structure(GAS). In order to expand ACPI addressing capabilities, 
;		a Generic Address Structure (GAS) is defined that enables access to registers in 
;		ACPI-defined address spaces. This 12-byte structure, described below, is used to 
;		express register addresses within the new tables defined by ACPI 2.0.;
;
; Referrals:	FACP, DBGP, SPCR
;
; Notes:	ACPI 2.0 introduced structure	
;----------------------------------------------------------------------------
;<AMI_THDR_END>
gas_str    struct
        gas_addr_space_id   db     ?      ; Address space ID: 0 - System Mem., 1- System I/O, 2-PCI config., 3-EC, ,4-SMBus, 0x7f-Functional Dixed Hardware
        gas_rg_bit_width    db     ?      ; size in bits of the register. When addressing a data structure, field must be 0.
        gas_rg_bit_offs     db     ?      ; bit offset the register at the given address. --//--//--
        gas_reserv          db     0      ; reserved, must be 0
        gas_address0        dd     ?      ; low  dword of 64-bit address is for the data structure or register in the given address space.
        gas_address1        dd     ?      ; high dword of 64-bit addr --//--

gas_str    ends

IF MKF_ACPI_APIC_TBL

;-----------------------------------------------------------------------;
;<AMI_THDR_START>
;----------------------------------------------------------------------------
;
; Name:	      	Lapic_proc 
;
; Type:		Data Array
;
; Description:	Processor Local APIC generic structure. Used within MAPIC table
;
; Referrals:	APIC
;
;----------------------------------------------------------------------------
;<AMI_THDR_END>
Lapic_proc struct

	proc_struc_type		db  0
	proc_proc_length	db  8	; always 8
	proc_id			db  0	; Should match ProcessorID in ASL scope
	proc_apic_id		db  0	; The physical ID of the APIC
	proc_flags		dd  0	; Not usable(0)/Usable(1) - updated in TBLACPI.ASM

Lapic_proc ends

;-----------------------------------------------------------------------;
;<AMI_THDR_START>
;----------------------------------------------------------------------------
;
; Name:	      	apic_ioapic 
;
; Type:		Data Array
;
; Description:	IO APIC Structure. Used within MAPIC table
;
; Referrals:	APIC
;
;----------------------------------------------------------------------------
;<AMI_THDR_END>
apic_ioapic struct

	ioapic_struc_type	db  1
	ioapic_length		db  12	; always 12
	ioapic_id		db  0	; The physical ID of the APIC, updated
	ioapic_resv		db  0	; Reserved
	ioapic_addr		dd  0	; Physical Address, updated
	ioapic_sys_vect		dd  0	; The system interrupt vector index where this IO APIC's INTI lines start. The number of INTI lines is determined by the IO APIC's Max Redir Entry register.

apic_ioapic ends

;<AMI_THDR_START>
;----------------------------------------------------------------------------
;
; Name:	      	apic_intover 
;
; Type:		Data Array
;
; Description:	Interrupt source override generic structure. Used within MAPIC table
;
; Referrals:	APIC
;
;----------------------------------------------------------------------------
;<AMI_THDR_END>
apic_intover struct

	intover_struc_type	db  2

⌨️ 快捷键说明

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