Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB

  1. #ifndef _EFI_PART_H
  2. #define _EFI_PART_H
  3. /*++
  4. Copyright (c) 1998 Intel Corporation
  5. Module Name:
  6. efipart.h
  7. Abstract:
  8. Info about disk partitions and Master Boot Records
  9. Revision History
  10. --*/
  11. /*
  12. *
  13. */
  14. #define EFI_PARTITION 0xef
  15. #define FDISK_SIGNATURE L"EFI FDISK COMMAND"
  16. #define MBR_SIZE 512
  17. #pragma pack(1)
  18. typedef struct {
  19. UINT8 BootIndicator;
  20. UINT8 StartHead;
  21. UINT8 StartSector;
  22. UINT8 StartTrack;
  23. UINT8 OSIndicator;
  24. UINT8 EndHead;
  25. UINT8 EndSector;
  26. UINT8 EndTrack;
  27. UINT8 StartingLBA[4];
  28. UINT8 SizeInLBA[4];
  29. } MBR_PARTITION_RECORD;
  30. #define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
  31. #define MBR_SIGNATURE 0xaa55
  32. #define MIN_MBR_DEVICE_SIZE 0x80000
  33. #define MBR_ERRATA_PAD 0x40000 /* 128 MB */
  34. #define MAX_MBR_PARTITIONS 4
  35. typedef struct {
  36. UINT8 BootStrapCode[440];
  37. UINT8 UniqueMbrSignature[4];
  38. UINT8 Unknown[2];
  39. MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
  40. UINT16 Signature;
  41. } MASTER_BOOT_RECORD;
  42. #pragma pack()
  43. #endif