source: xtideuniversalbios/tags/XTIDE_Universal_BIOS_v1.1.5/Inc/CustomDPT.inc@ 493

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