|
|
1.1 root 1: /*
2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved.
3:
1.1.1.5 ! root 4: Governed by the TrueCrypt License 2.7 the full text of which is contained
1.1 root 5: in the file License.txt included in TrueCrypt binary and source code
6: distribution packages.
7: */
8:
9: #ifndef TC_HEADER_Boot_BootCommon
10: #define TC_HEADER_Boot_BootCommon
11:
1.1.1.4 root 12: #include "Common/Password.h"
1.1 root 13: #include "BootDefs.h"
14:
15:
16: #define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * SECTOR_SIZE)
17:
18: #define TC_BOOT_VOLUME_HEADER_SECTOR (TC_BOOT_LOADER_AREA_SECTOR_COUNT - 1)
19: #define TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET (TC_BOOT_VOLUME_HEADER_SECTOR * SECTOR_SIZE)
20:
21: #define TC_CD_BOOTSECTOR_OFFSET 0xd000
22: #define TC_CD_BOOT_LOADER_SECTOR 26
23:
24: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR TC_BOOT_LOADER_AREA_SECTOR_COUNT
25: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR_OFFSET (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR * SECTOR_SIZE)
26:
1.1.1.3 root 27: #define TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR + TC_BOOT_LOADER_AREA_SECTOR_COUNT)
28: #define TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR_OFFSET (TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR * SECTOR_SIZE)
29:
1.1 root 30: #define TC_MBR_SECTOR 0
31: #define TC_MAX_MBR_BOOT_CODE_SIZE 440
32:
33:
34: #pragma pack (1)
35:
36: typedef struct
37: {
38: byte Flags;
39: } BootSectorConfiguration;
40:
41:
42: // Modifying this value can introduce incompatibility with previous versions
43: #define TC_BOOT_LOADER_ARGS_OFFSET 0x10
44:
45: typedef struct
46: {
47: // Modifying this structure can introduce incompatibility with previous versions
48: char Signature[8];
49: uint16 BootLoaderVersion;
50: uint16 CryptoInfoOffset;
51: uint16 CryptoInfoLength;
52: uint32 HeaderSaltCrc32;
53: Password BootPassword;
1.1.1.3 root 54: uint64 HiddenSystemPartitionStart;
55: uint64 DecoySystemPartitionStart;
56: uint32 BootArgumentsCrc32;
57:
1.1 root 58: } BootArguments;
59:
60: #pragma pack ()
61:
62: // Boot arguments signature should not be defined as a static string
63: // Modifying these values can introduce incompatibility with previous versions
64: #define TC_SET_BOOT_ARGUMENTS_SIGNATURE(SG) do { SG[0] = 'T'; SG[1] = 'R'; SG[2] = 'U'; SG[3] = 'E'; SG[4] = 0x11; SG[5] = 0x23; SG[6] = 0x45; SG[7] = 0x66; } while (FALSE)
65: #define TC_IS_BOOT_ARGUMENTS_SIGNATURE(SG) (SG[0] == 'T' && SG[1] == 'R' && SG[2] == 'U' && SG[3] == 'E' && SG[4] == 0x11 && SG[5] == 0x23 && SG[6] == 0x45 && SG[7] == 0x66)
66:
67:
68: #endif // TC_HEADER_Boot_BootCommon
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.