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

📄 mbiosequ.equ

📁 dos下的USB源码(包括UHCI
💻 EQU
📖 第 1 页 / 共 3 页
字号:
;<AMI_SHDR_START>
;----------------------------------------------------------------------------
; Name:		e820_info_struc
;
; Fields:	 Name		Type		Description
;		------------------------------------------------------------
;		start_addr	DWORD		32-bit start address
;		size_bytes	DWORD		size in bytes
;		mem_type	byte		memory type
;
; Description:	Structure used to define E820 information by the BIOS as well
;		as emodules.
;
;		different available memory types are
;		"!!!! only Following types are reported to OS !!!!"
;		ram_os(01h)	-	 memory type available to OS
;		ram_res(02h)	-	 memory type reserved by system and
;					 must not be used by OS
;		ram_acpi_data(03h)-	 ACPI Reclaim data area
;		ram_acpi_nvs(04h)-	 ACPI NVS area
;
;		"!!!! FOR BIOS INTERNAL PURPOSE ONLY !!!!"
;		ram_dummy(0FFh)		 Dummy entry for BIOS internal use.
; 		"!!!! Addition for memory above 4GB !!!!"
;		ram_os_1M(081h)	-	 memory type available to OS the upper
;					 bit means he granularity is 1MB.
;					 While reporting we have to convert
;					 memory in no of bytes and reset the
;					 upper bit for memory type.
;
;
;
;----------------------------------------------------------------------------
;<AMI_SHDR_END>

e820_info_struc	struc
	start_addr	dd	?	; 32-bit start address
	size_bytes	dd	?	; size in bytes
	mem_type	db	?	; memory type
e820_info_struc	ends

ram_os			equ	01h	; memory type available to OS
ram_res			equ	02h	; memory type reserved by system and
					; must not be used by OS
ram_acpi_data		equ	03h	; ACPI Reclaim data area
ram_acpi_nvs		equ	04h	; ACPI NVS area
ram_dummy		equ	0FFh	; Dummy entry for BIOS internal use.

; Addition for memory above 4GB "!!!! FOR INTERNAL PURPOSE ONLY !!!!"
ram_os_1M		equ	081h	; memory type available to OS
					; the upper bit means he granularity
					; is 1MB.
					; While reporting we have to convert
					; memory in no of bytes and reset the
					; upper bit for memory type.
										;

;---------------------------------------;
;  FDD/HDD Access Control Equates	;
;  in 40:EA (OEM_SUPPORT_BYTE)		;
;---------------------------------------;
password_used_bit	equ	00000001b; Bit-0 = 0..No Password or Supervisor Password used
					;	   1..User Password used
fdd_remove_bit		equ	00000010b; Bit-1 = 0..FDD is present
					;	   1..FDD is removed
fdd_access_control_bit	equ	00000100b; Bit-2 = 0..FDD R/W
					;	   1..FDD R/O
hdd_access_control_bit	equ	00001000b; Bit-3 = 0..HDD R/W
					;	   1..HDD R/O
					; Bit7-4 = Not Used
;---------------------------------------;
;	ARMD Device Emulation Type	;
;---------------------------------------;
armd_fdd_emulation	equ	00h	; 00 -> ARMD to be emulated as Floppy
armd_hdd_emulation	equ	01h	; 01 -> ARMD to be emulated as Hard Disk
;------------- BIOS_SCRATCH ------------;
bios_f_shadow_bit		equ	00000001b; F000 shadow information
					;	0 = Disabled
					;	1 = Enabled
bios_e_shadow_bit		equ	00000010b; E000 shadow information
					;	0 = Disabled
					;	1 = Enabled
				; Bit3-2........NOT USED
floppy_error_bit		equ	00010000b; POST Floppy Error Status
					;	0 = FDD ok
					;	1 = FDD error
acpi_aware_os_bit		equ	00100000b; ACPI Aware OS Information
					;	0 = Not an ACPI Aware OS
					;	1 = ACPI Aware OS
bios_post_complete_bit		equ	01000000b; BIOS POST information
					;	0 = POST not complete
					;	1 = POST complete
int19_display_bit		equ	10000000b; Active display during INT19
					;	0 = BIOS display
					;	1 = OEM display

;------------- RT_CMOS_BYTE ------------;
rt_cmos_os2_bit		equ	10000000b; bit-7 = OS2 compatibilty mode
rt_cmos_ps2_bit		equ	01000000b; bit-6 = PS2 Mouse support
rt_cmos_virus_bit	equ	00100000b; bit-5 = virus protection
rt_cmos_password_bit	equ	00010000b; bit-4 = password check
rt_cmos_parity_bit	equ	00001000b; bit-3 = parity check
rt_cmos_6064_bit	equ	00000100b; bit-2 = 60/64 emulation
					 ; bit1-0..not used

;-----------------------------------------------------------------------;
;			CONTROLLER_DETAILS_STRUC			;
;-----------------------------------------------------------------------;
CHANNEL_DETAILS_STRUC	struc
  wBasePortAddress		dw	?	; Base Port Address
  wControlPortAddress		dw	?	; Control Port Address
  wBusMasterPortAddress		dw	?	; Bus Master Port Address
  wPtrISR			dw	?	; ptr to IRQ ISR
  bIRQ				db	?	; IRQ Value
  wBusDeviceFunction		dw	?	; Bus#, Device#, Function#
CHANNEL_DETAILS_STRUC	ends

;-----------------------------------------------------------------------;
;			bMiscInfo Details				;
;-----------------------------------------------------------------------;
; following information is built from setup question
i13_virus_protection_bit	equ	00000001b; bit-0 = virus protection information
						 ;	   0 = disabled, 1 = enabled
; following information is built from IDE_PARAM_VALIDATE_BIT in _MISC_INFO byte
i13_ata_parameter_validate_bit	equ	00000010b; bit-1 = ATA parameter validate information
						 ;	   0 = do not vaildate user selection
						 ;	   1 = validate user selection
i13_fdd_setup_bit		equ	00000100b; bit-2 = FDD init information
						 ;	   0 = do not execute FDD setup
						 ;	   1 = execute FDD setup
i13_display_smart_status_bit	equ	00001000b; bit-3 = Display SMART staus information
						 ;	   0 = do not display SMART status
						 ;	   1 = display SMART status
i13_display_dma_status_bit	equ	00010000b; bit-4 = Display DMA staus information
						 ;	   0 = do not display DMA status
i13_activate_INT13_ISR_bit		equ	00100000b; bit-5 = 1 to

;						 ; Bit7-5= not used

;-----------------------------------------------------------------------;
;		ATA(PI) INFORMATION USED BY SETUP SERVER		;
;-----------------------------------------------------------------------;
SETUP_ATA_INFO_STRUC	struc
	bType		db	?	; device type 0/1/2/3 for None/HDD/CDROM/ARMD
	wInfo		dw	?	; bit-mapped information (bit definitions, see below)
	wCylinder	dw	?	; #of cylinders (1-based)
	bHead		db	?	; #of heads (1-based)
	bSPT		db	?	; #of sectors per track
	dNoOfSectors	dd	?	; total #of sectors
	bPIOMode	db	?	; PIO Mode
	bADMAMode	db	?	; Async DMA Mode (single/multi word depends on the INFO Word)
	bUDMAMode	db	?	; Sync (Ultra) DMA Mode
	bMultiSector	db	?	; #of sectors that can be xferred in one interrupt
	bSizeString	db     8 dup (?); ASCIIZ Size string
	bVendorString	db    41 dup (?); ASCIIZ Vendor string
SETUP_ATA_INFO_STRUC	ends

;-----------------------------------------------------------------------;
;	INFO WORD DETAILS in SETUP_ATA_INFO_STRUC			;
;-----------------------------------------------------------------------;
chs_bit			equ	00000001b; bit-0 = 1..CHS information valid
pio_bit			equ	00000010b; bit-1 = 1..PIO supported
block_bit		equ	00000100b; bit-2 = 1..block xfer supported
lba_bit			equ	00001000b; bit-3 = 1..LBA translation supported
smart_bit		equ	00010000b; bit-4 = 1..SMART supported
async_sw_dma_bit	equ	00100000b; bit-5 = 1..Async SingleWord DMA supported
async_mw_dma_bit	equ	01000000b; bit-6 = 1..Async MultiWord DMA supported
sync_dma_bit		equ	10000000b; bit-7 = 1..Sync DMA supported

;-----------------------------------------------------------------------;
;			BOOT_BLOCK_FLAG					;
; these bits define the different programming options based on the keys	;
; pressed during power-on.						;
;-----------------------------------------------------------------------;
; NOTE: the HALT_AFTER_PRGRAM_BIT is build during BIOS building, all other
; bits are set/reset properly in recovery code according to the forced
; recovery condition (e.g. key-strokes pressed) during power-on.
halt_after_program_bit	equ	00000001b; bit-0 = 0..reset after programming
					 ;	   1..halt after programming
destroy_cmos_bit	equ	00000010b; bit-1 = 0..do not destroy cmos
					 ;	   1..destroy cmos
destroy_nvram_bit	equ	00000100b; bit-2 = 0..do not destroy NVRAM
					 ;	   1..destroy NVRAM
recovery_request_bit	equ	00001000b; bit-3 = 0..Do not force FLASH recovery
					 ;         1..Force FLASH recovery
recovery_result_bit	equ	00010000b; bit-4 = 0..FLASH recovery success
					 ;         1..FLASH recovery failed
					 ; bit-5.....reserved for future use
rom_checksum_bit	equ	01000000b; bit-6 = 0..existing ROM checksum good
					 ;	   1..existing ROM checksum bad
flash_program_bit	equ	10000000b; bit-7 = 0..do not program Flash part
					 ;	   1..program Flash part

;-----------------------------------------------------------------------;
;		ATAPI DEVICE SUPPORT IN BOOT BLOCK RECOVERY		;
;-----------------------------------------------------------------------;
;			ATAPI_HARDWARE_ENTRY				;
;-----------------------------------------------------------------------;
ATAPI_HARDWARE_ENTRY_STRUC	struc
	wBasePort		dw	?	; Base Port Address
	wControlPort		dw	?	; Control Port Address
	bDriveSelection		db	?	; Drive Selection Parameter
	bIRQ			db	?	; IRQ used
ATAPI_HARDWARE_ENTRY_STRUC	ends

;-----------------------------------------------------------------------;
;			ATAPI_HARDWARE_INFO				;
;-----------------------------------------------------------------------;
ATAPI_HARDWARE_INFO_STRUC	struc
	wNoEntry		dw	?	; #of entries present
ATAPI_HARDWARE_INFO_STRUC	ends


;-----------------------------------------------------------------------;
;		WFM LOCKOUT CAPABILITIES BIT MAP DEFINITION		;
;-----------------------------------------------------------------------;
;				     1         0
;				5432109876543210
wfm_hard_onoff_bit	equ	0000000000000001b; bit-0, Reserved (No longer used)
wfm_soft_onoff_bit	equ	0000000000000010b; bit-1, Soft On/Off
wfm_reset_switch_bit	equ	0000000000000100b; bit-2, Reset Button
wfm_mouse_bit		equ	0000000000001000b; bit-3, Mouse
wfm_ctrl_alt_del_bit	equ	0000000000010000b; bit-4, Ctrl-Alt-Del
wfm_all_key_ecad_bit	equ	0000000000100000b; bit-5, All Keyboard Activity except Ctrl-Alt-Del

wfm_not_used_bits	equ	1111111111000000b; bit15-6..Not used


;-----------------------------------------------------------------------;
;	INFORMATION ABOUT THE MEMORY SIZING MODULE OUTSIDE BOOTBLOCK	;
;-----------------------------------------------------------------------;
;		MEMORY SIZING MODULE INFO STRUCTURE			;
; this information will be present at the start of memory sizing code.	;
;-----------------------------------------------------------------------;
MEMORY_SIZING_INFO_STRUC	struc
	dEntryOffset	dd	1 dup (?)	; entry offset of memory sizing code
	wEntrySelector	dw	1 dup (?)	; entry selector of memory sizing code
	wOffsetGDTLabel	dw	1 dup (?)	; pointer to GDT Label having GDT table address and length
	wOffsetGDTTable	dw	1 dup (?)	; pointer to GDT Table
MEMORY_SIZING_INFO_STRUC	ends

;-----------------------------------------------------------------------;
;	 	GDT LABEL STRUCTURE IN MEMORY SIZING MODULE		;
; the GDT Label contains information about the length and the physical	;
; address of the GDT table.						;
;-----------------------------------------------------------------------;
MEMORY_SIZING_GDT_LABEL_STRUC	struc
  wLength		dw	1 dup (?)	; length (0-based) of GDT table
  dGDTTableAddress	dd	1 dup (?)	; 32Bit physical address of GDT table
MEMORY_SIZING_GDT_LABEL_STRUC	ends

;-----------------------------------------------------------------------;
;	 	GDT TABLE STRUCTURE IN MEMORY SIZING MODULE		;
; the GDT Table information which is present in memory sizing module.	;
;-----------------------------------------------------------------------;
MEMORY_SIZING_GDT_TABLE_STRUC	struc
  bDummyDescriptor		db	8 dup (?)	; dummy descriptor
  bMemorySizeCodeDescriptor	db	8 dup (?)	; memory sizing code descriptor
  bMemorySizeDataDescriptor	db	8 dup (?)	; memory sizing data descriptor
  b4GBCodeDescriptor		db	8 dup (?)	; Flat mode code descriptor
  b4GBDataDescriptor		db	8 dup (?)	; Flat mode data descriptor
  bF000CodeDescriptor		db	8 dup (?)	; F000 code descriptor
  bF000DataDescriptor		db	8 dup (?)	; F000 data descriptor
MEMORY_SIZING_GDT_TABLE_STRUC	ends

;-----------------------------------------------------------------------;
ss_value_for_cs		equ	offset MEMORY_SIZING_GDT_TABLE_STRUC.bMemorySizeDataDescriptor
ss_value_for_f000	equ	offset MEMORY_SIZING_GDT_TABLE_STRUC.bF000DataDescriptor
flat_ds_value		equ	offset MEMORY_SIZING_GDT_TABLE_STRUC.b4GBDataDescriptor
;-----------------------------------------------------------------------;


;-----------------------------------------------------------------------;
CDROM_BUF_LENGTH	equ	80h
;-----------------------------------------------------------------------;


;============================================================================
; For eKernel [Start]
;============================================================================
ASCII_CHAR_CR			EQU	0Dh
ASCII_CHAR_LF			EQU	0Ah
TRUE				EQU	0FFh
FALSE				EQU	00


;----------------------------------------------------------------------------
;		Structure used in TDB
;----------------------------------------------------------------------------

stTblEntryNEAR STRUCT
	EntryPtr	DW	0000h
stTblEntryNEAR ENDS


stIDAndTblEntryNEAR STRUCT
	EntryID		DW	0000h
	EntryPtr	DW	0000h
stIDAndTblEntryNEAR ENDS


stTblEntryFAR STRUCT
	EntryPtr	DD	0000h
stTblEntryFAR ENDS


stIDAndTblEntryFAR STRUCT
	EntryID		DW	0000h
	EntryPtr	DD	0000h
stIDAndTblEntryFAR ENDS


;============================================================================
; B I T 	E Q U A T E S
;============================================================================
BIT_0				EQU	01h
BIT_1				EQU	02h
BIT_2				EQU	04h
BIT_3				EQU	008h
BIT_4				EQU	010h
BIT_5				EQU	020h
BIT_6				EQU	040h
BIT_7				EQU	080h
BIT_8				EQU	0100h
BIT_9				EQU	0200h
BIT_10				EQU	0400h
BIT_11				EQU	0800h
BIT_12				EQU	01000h
BIT_13				EQU	02000h
BIT_14				EQU	04000h
BIT_15				EQU	08000h
BIT_16				EQU     010000h
BIT_17				EQU	020000h
BIT_18				EQU	040000h
BIT_19				EQU	080000h
BIT_20				EQU	0100000h
BIT_21				EQU	0200000h
BIT_22				EQU	0400000h
BIT_23				EQU	0800000h
BIT_24				EQU	01000000h
BIT_25				EQU	02000000h
BIT_26				EQU	04000000h
BIT_27				EQU	08000000h
BIT_28				EQU	010000000h
BIT_29				EQU	020000000h
BIT_30				EQU	040000000h

⌨️ 快捷键说明

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