1/*
2 * Copyright (c) 2011, ETH Zurich. All rights reserved.
3 *
4 * This file is distributed under the terms in the attached LICENSE file.
5 * If you do not find this file, copies can be found by writing to:
6 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
7 */
8
9/*
10 * fat32_ebpb.dev
11 *
12 * DESCRIPTION: FAT32 file system extended BIOS parameter block.
13 * 
14 */
15
16device fat32_ebpb lsbfirst (addr b) "FAT32 Extended BIOS Parameter Block (EBPB)" {
17
18    register spf  rw addr(b,0x24) "Sectors per FAT" type(uint32);
19
20    register flgs rw addr(b,0x28) "Flags" {
21        afc  5 "Active FAT Copy";
22        _    1 rsvd;
23        fme  1 "FAT Mirror Enabled";
24        _    9 rsvd;
25    };
26
27    register vrsn rw addr(b,0x2a) "Version" type(uint16);
28
29    register rtst rw addr(b,0x2c) "Start cluster of root directory" type(uint32);
30
31    register fsis rw addr(b,0x30) "Sector of the File System Information Sector" type(uint16);
32
33    register bbss rw addr(b,0x32) "Sector of backup boot sector, 0 implies no backup" type(uint16);
34
35    // 0x34: rsvd, 12 bytes
36
37    // See fat16_ebpb bytes 0x24-0x26 for descriptions the following three bytes
38    register ldn  rw addr(b,0x40) "Logical Drive Number of partition" type(uint8);
39
40    register rsv  rw addr(b,0x41) "Reserved" type(uint8);
41
42    register ebs  rw addr(b,0x42) "Extended boot signature" type(uint8);
43
44    register vsn  rw addr(b,0x43) "Volume serial number" type(uint32);
45
46    regarray vlb  rw addr(b,0x47) [11] "Volume label" type(uint8);
47
48    // Should be "FAT32   ";
49    regarray fst  rw addr(b,0x52) [8] "File system type, informative" type(uint8);
50
51};
52