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 * fat16_ebpb.dev
11 *
12 * DESCRIPTION: FAT16 file system extended BIOS parameter block.
13 * 
14 */
15
16device fat16_ebpb msbfirst (addr b) "FAT16 Extended BIOS Parameter Block (EBPB)" {
17
18    register drv  rw addr(b,0x24) "Drive number" type(uint8);
19
20    // In [1], this is described as "current head". The same document says that
21    // because it is not used as such, Windows NT uses it as follows instead (lsbfirst):
22    //   - bit 0: need disk check
23    //   - bit 1: need surface scan
24    // [1] http://support.microsoft.com/kb/140418
25    register rsv  rw addr(b,0x25) "Reserved" type(uint8);
26
27    // Should be 0x29 to indicate this is an EBPB. 0x28 Also possible, in which
28    // only the serial number follows.
29    register ebs  rw addr(b,0x26) "Extended boot signature" type(uint8);
30
31    register vsn  rw addr(b,0x27) "Volume serial number" type(uint32);
32
33    regarray vlb  rw addr(b,0x2b) [11] "Volume label" type(uint8);
34
35    // Should be "FAT16   "
36    regarray fst  rw addr(b,0x36) [8] "File system type, informative" type(uint8);
37
38};
39