|
|
1.1 root 1: /*
1.1.1.7 root 2: Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
1.1 root 3:
1.1.1.8 root 4: Governed by the TrueCrypt License 3.0 the full text of which is contained in
1.1.1.7 root 5: the file License.txt included in TrueCrypt binary and source code distribution
6: packages.
1.1 root 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:
1.1.1.6 root 15: // The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version
16: #define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x060a
1.1 root 17:
1.1.1.8 root 18: #define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS)
1.1 root 19:
20: #define TC_BOOT_VOLUME_HEADER_SECTOR (TC_BOOT_LOADER_AREA_SECTOR_COUNT - 1)
1.1.1.8 root 21: #define TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET (TC_BOOT_VOLUME_HEADER_SECTOR * TC_SECTOR_SIZE_BIOS)
1.1 root 22:
23: #define TC_CD_BOOTSECTOR_OFFSET 0xd000
24: #define TC_CD_BOOT_LOADER_SECTOR 26
25:
26: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR TC_BOOT_LOADER_AREA_SECTOR_COUNT
1.1.1.8 root 27: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR_OFFSET (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR * TC_SECTOR_SIZE_BIOS)
1.1 root 28:
1.1.1.3 root 29: #define TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR + TC_BOOT_LOADER_AREA_SECTOR_COUNT)
1.1.1.8 root 30: #define TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR_OFFSET (TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR * TC_SECTOR_SIZE_BIOS)
1.1.1.3 root 31:
1.1 root 32: #define TC_MBR_SECTOR 0
33: #define TC_MAX_MBR_BOOT_CODE_SIZE 440
34:
1.1.1.6 root 35: #define TC_MAX_EXTRA_BOOT_PARTITION_SIZE (256UL * 1024UL * 1024UL)
36:
1.1 root 37:
38: #pragma pack (1)
39:
40: typedef struct
41: {
42: byte Flags;
43: } BootSectorConfiguration;
44:
45:
46: // Modifying this value can introduce incompatibility with previous versions
47: #define TC_BOOT_LOADER_ARGS_OFFSET 0x10
48:
49: typedef struct
50: {
51: // Modifying this structure can introduce incompatibility with previous versions
52: char Signature[8];
53: uint16 BootLoaderVersion;
54: uint16 CryptoInfoOffset;
55: uint16 CryptoInfoLength;
56: uint32 HeaderSaltCrc32;
57: Password BootPassword;
1.1.1.3 root 58: uint64 HiddenSystemPartitionStart;
59: uint64 DecoySystemPartitionStart;
1.1.1.6 root 60: uint32 Flags;
1.1.1.9 ! root 61: uint32 BootDriveSignature;
1.1.1.6 root 62:
1.1.1.3 root 63: uint32 BootArgumentsCrc32;
64:
1.1 root 65: } BootArguments;
66:
1.1.1.6 root 67: // Modifying these values can introduce incompatibility with previous versions
68: #define TC_BOOT_ARGS_FLAG_EXTRA_BOOT_PARTITION 0x1
69:
1.1 root 70: #pragma pack ()
71:
72: // Boot arguments signature should not be defined as a static string
73: // Modifying these values can introduce incompatibility with previous versions
74: #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)
75: #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)
76:
77:
78: #endif // TC_HEADER_Boot_BootCommon
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.