source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc@ 114

Last change on this file since 114 was 99, checked in by Tomi Tilli, 14 years ago

Changes to XTIDE Universal BIOS:

  • Even more initialization code inlining.
File size: 3.0 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Defines for DPT structs containing custom
3; Disk Parameter Table used by this BIOS.
4%ifndef CUSTOMDPT_INC
5%define CUSTOMDPT_INC
6
7
8; Base Disk Parameter Table for all hard disk drives.
9; DPT might have extensions for specific functions.
10struc DPT
11 ; General Disk Parameter Table related
12 .bSize resb 1 ; Size of DPT (with extensions) in bytes
13 .wDrvNumAndFlags:
14 .bDrvNum resb 1 ; Drive number
15 .bFlags resb 1 ; DPT and Drive related flags
16 .bReset resb 1 ; Drive reset status (for debugging)
17 .bIdeOff resb 1 ; Offset to IDEVARS for this drive
18
19 ; Lookup values for L-CHS to P-CHS and L-CHS to LBA28 conversions
20 .bShLtoP resb 1 ; Bit shift count for L-CHS to P-CHS conversion
21 .wLHeads resb 2 ; Number of L-CHS Heads (1...256)
22
23 ; IDE related
24 .wPCyls resb 2 ; Number of P-CHS (IDE) Cylinders (1...16383)
25 .wHeadsAndSectors:
26 .bPHeads resb 1 ; Number of P-CHS (IDE) Heads (1...16)
27 .bPSect resb 1 ; Number of P-CHS (IDE) Sectors per Track (1...63)
28 .bDrvSel resb 1 ; Drive Selection byte for Device/Head Register
29 .bDrvCtrl resb 1 ; Drive Control byte for Device Control Register
30
31 ; Related to Block Mode transfers.
32 ; Block size is specified in sectors (1, 2, 4, 8, 16, 32, 64 or 128).
33 .wSetAndMaxBlock:
34 .bSetBlock resb 1 ; Currect block size (at least 1)
35 .bMaxBlock resb 1 ; Maximum block size, 0 = block mode not supported
36endstruc
37
38; Bit definitions for DPT.bFlags
39MASK_DPT_ADDR EQU 110b ; Bits 1..2, Addressing Mode
40FLG_DPT_EBIOS EQU (1<<0) ; EBIOS functions supported for this drive
41FLG_DPT_FIRSTPART EQU (1<<3) ; First BIOS Partition of the drive (drive reset allowed)
42FLG_DPT_PARTITION EQU (1<<4) ; BIOS Partition
43FLG_DPT_USERCHS EQU (1<<5) ; User has specified P-CHS parameters
44
45; Values for different addressing modes (MASK_DPT_ADDR for DPT.bFlags)
46ADDR_DPT_LCHS EQU 0 ; L-CHS Addressing Mode (NORMAL in many other BIOSes)
47ADDR_DPT_PCHS EQU 1 ; P-CHS Addressing Mode (LARGE in many other BIOSes)
48ADDR_DPT_LBA28 EQU 2 ; 28-bit LBA Addressing Mode
49ADDR_DPT_LBA48 EQU 3 ; 48-bit LBA Addressing Mode
50
51; Bit definitions for DPT.bReset (inverted)
52FLG_RESET_nDRDY EQU (1<<0) ; Drive ready to accept commands
53FLG_RESET_nINITPRMS EQU (1<<1) ; Initialize Device Parameters successfull
54FLG_RESET_nRECALIBRATE EQU (1<<2) ; Recalibrate successfull
55FLG_RESET_nSETBLOCK EQU (1<<3) ; Initialize Block Mode successfull
56MASK_RESET_ALL EQU (FLG_RESET_nDRDY | FLG_RESET_nINITPRMS | FLG_RESET_nRECALIBRATE | FLG_RESET_nSETBLOCK)
57
58
59; Extended DPT for XTIDE Universal BIOS partitioned drive.
60; This struct cannot exist with EDPT (EBIOS support).
61struc PART_DPT
62 .dpt resb DPT_size
63 .dwStartLBA:
64 .twStartLBA resb 6 ; Starting 28- or 48-bit LBA for BIOS partition
65endstruc
66
67
68; Extended DPT for EBIOS support.
69; This struct cannot exist with PDPT (XTIDE Universal BIOS partitioned drive).
70struc EBDPT
71 .dpt resb DPT_size
72 .dwCapacity:
73 .twCapacity resb 6 ; Total drive capacity in sectors
74endstruc
75
76
77%endif ; CUSTOMDPT_INC
Note: See TracBrowser for help on using the repository browser.