|
|
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.7 ! root 4: Governed by the TrueCrypt License 2.8 the full text of which is contained in ! 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: 18: #define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * SECTOR_SIZE) 19: 20: #define TC_BOOT_VOLUME_HEADER_SECTOR (TC_BOOT_LOADER_AREA_SECTOR_COUNT - 1) 21: #define TC_BOOT_VOLUME_HEADER_SECTOR_OFFSET (TC_BOOT_VOLUME_HEADER_SECTOR * SECTOR_SIZE) 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 27: #define TC_ORIG_BOOT_LOADER_BACKUP_SECTOR_OFFSET (TC_ORIG_BOOT_LOADER_BACKUP_SECTOR * SECTOR_SIZE) 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) 30: #define TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR_OFFSET (TC_BOOT_LOADER_BACKUP_RESCUE_DISK_SECTOR * SECTOR_SIZE) 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; 61: 1.1.1.3 root 62: uint32 BootArgumentsCrc32; 63: 1.1 root 64: } BootArguments; 65: 1.1.1.6 root 66: // Modifying these values can introduce incompatibility with previous versions 67: #define TC_BOOT_ARGS_FLAG_EXTRA_BOOT_PARTITION 0x1 68: 1.1 root 69: #pragma pack () 70: 71: // Boot arguments signature should not be defined as a static string 72: // Modifying these values can introduce incompatibility with previous versions 73: #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) 74: #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) 75: 76: 77: #endif // TC_HEADER_Boot_BootCommon
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.