summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/Disk
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-03 05:46:26 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-03 05:46:26 +0000
commitcc7d86f0ea610f913881c3d04af55fc8c75bcfe3 (patch)
tree76ac48eeafae61ff01e29fae6204dc56ad7f89e7 /EdkModulePkg/Universal/Disk
parente0759a83b9e6f60ebe42b20ac268474736e03572 (diff)
downloadedk2-cc7d86f0ea610f913881c3d04af55fc8c75bcfe3.zip
edk2-cc7d86f0ea610f913881c3d04af55fc8c75bcfe3.tar.gz
edk2-cc7d86f0ea610f913881c3d04af55fc8c75bcfe3.tar.bz2
Include EfiGpt.h, ElTorito.h, Mbr.h header files from MdePkg's Industry Starndard. and remove the private Gpt.h, Mbr.h and ElTorito.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1894 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/Disk')
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c1
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.h130
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c2
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.h76
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c1
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.h69
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h4
-rw-r--r--EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa5
8 files changed, 4 insertions, 284 deletions
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
index 88d0c72..b5f2926 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.c
@@ -22,7 +22,6 @@ Revision History
--*/
#include "Partition.h"
-#include "ElTorito.h"
BOOLEAN
PartitionInstallElToritoChildHandles (
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.h b/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.h
deleted file mode 100644
index f085315..0000000
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/ElTorito.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*++
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- ElTorito.h
-
-Abstract:
-
- Data Structures required for detecting ElTorito Partitions
-
-Revision History
-
---*/
-
-#ifndef _ELTORITO_H_
-#define _ELTORITO_H_
-
-#pragma pack(1)
-//
-// CDROM_VOLUME_DESCRIPTOR.Types
-//
-#define CDVOL_TYPE_STANDARD 0x0
-#define CDVOL_TYPE_CODED 0x1
-#define CDVOL_TYPE_END 0xFF
-
-//
-// CDROM_VOLUME_DESCRIPTOR.Id
-//
-#define CDVOL_ID "CD001"
-
-//
-// CDROM_VOLUME_DESCRIPTOR.SystemId
-//
-#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"
-
-//
-// Indicator types
-//
-#define ELTORITO_ID_CATALOG 0x01
-#define ELTORITO_ID_SECTION_BOOTABLE 0x88
-#define ELTORITO_ID_SECTION_NOT_BOOTABLE 0x00
-#define ELTORITO_ID_SECTION_HEADER 0x90
-#define ELTORITO_ID_SECTION_HEADER_FINAL 0x91
-
-//
-// ELTORITO_CATALOG.Boot.MediaTypes
-//
-#define ELTORITO_NO_EMULATION 0x00
-#define ELTORITO_12_DISKETTE 0x01
-#define ELTORITO_14_DISKETTE 0x02
-#define ELTORITO_28_DISKETTE 0x03
-#define ELTORITO_HARD_DISK 0x04
-
-//
-// El Torito Volume Descriptor
-// Note that the CDROM_VOLUME_DESCRIPTOR does not match the ISO-9660
-// descriptor. For some reason descriptor used by El Torito is
-// different, but they start the same. The El Torito descriptor
-// is left shifted 1 byte starting with the SystemId. (Note this
-// causes the field to get unaligned)
-//
-typedef struct {
- UINT8 Type;
- CHAR8 Id[5]; // CD001
- UINT8 Version;
- CHAR8 SystemId[26];
- CHAR8 Unused[38];
- UINT8 EltCatalog[4];
- CHAR8 Unused2[5];
- UINT32 VolSpaceSize[2];
-} CDROM_VOLUME_DESCRIPTOR;
-
-//
-// Catalog Entry
-//
-typedef union {
- struct {
- CHAR8 Reserved[0x20];
- } Unknown;
-
- //
- // Catalog validation entry (Catalog header)
- //
- struct {
- UINT8 Indicator;
- UINT8 PlatformId;
- UINT16 Reserved;
- CHAR8 ManufacId[24];
- UINT16 Checksum;
- UINT16 Id55AA;
- } Catalog;
-
- //
- // Initial/Default Entry or Section Entry
- //
- struct {
- UINT8 Indicator;
- UINT8 MediaType : 4;
- UINT8 Reserved1 : 4;
- UINT16 LoadSegment;
- UINT8 SystemType;
- UINT8 Reserved2;
- UINT16 SectorCount;
- UINT32 Lba;
- } Boot;
-
- //
- // Section Header Entry
- //
- struct {
- UINT8 Indicator;
- UINT8 PlatformId;
- UINT16 SectionEntries;
- CHAR8 Id[28];
- } Section;
-
-} ELTORITO_CATALOG;
-
-#pragma pack()
-
-#endif
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
index 6404c75..12ec976 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c
@@ -21,8 +21,6 @@ Abstract:
--*/
#include "Partition.h"
-#include "Gpt.h"
-#include "Mbr.h"
BOOLEAN
PartitionValidGptTable (
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.h b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.h
deleted file mode 100644
index fbcd93d..0000000
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*++
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- Gpt.h
-
-Abstract:
-
- Data Structures required for detecting GPT Partitions
-
-Revision History
-
---*/
-
-#ifndef _GPT_H_
-#define _GPT_H_
-
-#pragma pack(1)
-
-#define PRIMARY_PART_HEADER_LBA 1
-
-#define EFI_PTAB_HEADER_ID "EFI PART"
-
-//
-// EFI Partition Attributes
-//
-#define EFI_PART_REQUIRED_TO_FUNCTION 0x0000000000000001
-
-//
-// GPT Partition Table Header
-//
-typedef struct {
- EFI_TABLE_HEADER Header;
- EFI_LBA MyLBA;
- EFI_LBA AlternateLBA;
- EFI_LBA FirstUsableLBA;
- EFI_LBA LastUsableLBA;
- EFI_GUID DiskGUID;
- EFI_LBA PartitionEntryLBA;
- UINT32 NumberOfPartitionEntries;
- UINT32 SizeOfPartitionEntry;
- UINT32 PartitionEntryArrayCRC32;
-} EFI_PARTITION_TABLE_HEADER;
-
-//
-// GPT Partition Entry
-//
-typedef struct {
- EFI_GUID PartitionTypeGUID;
- EFI_GUID UniquePartitionGUID;
- EFI_LBA StartingLBA;
- EFI_LBA EndingLBA;
- UINT64 Attributes;
- CHAR16 PartitionName[36];
-} EFI_PARTITION_ENTRY;
-
-//
-// GPT Partition Entry Status
-//
-typedef struct {
- BOOLEAN OutOfRange;
- BOOLEAN Overlap;
-} EFI_PARTITION_ENTRY_STATUS;
-
-#pragma pack()
-
-#endif
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
index 0930292..c0cd23c 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.c
@@ -30,7 +30,6 @@ Abstract:
--*/
#include "Partition.h"
-#include "Mbr.h"
BOOLEAN
PartitionValidMbr (
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.h b/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.h
deleted file mode 100644
index ac692db..0000000
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Mbr.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*++
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- Mbr.h
-
-Abstract:
-
- Data Structures required for detecting MBR Partitions
-
-Revision History
-
---*/
-
-#ifndef _MBR_H_
-#define _MBR_H_
-
-#pragma pack(1)
-
-#define MBR_SIGNATURE 0xaa55
-#define MIN_MBR_DEVICE_SIZE 0x80000
-#define MBR_ERRATA_PAD 0x40000 // 128 MB
-#define EXTENDED_DOS_PARTITION 0x05
-#define EXTENDED_WINDOWS_PARTITION 0x0F
-#define MAX_MBR_PARTITIONS 4
-
-#define PMBR_GPT_PARTITION 0xEE
-#define EFI_PARTITION 0xEF
-#define MBR_SIZE 512
-
-//
-// MBR Partition Entry
-//
-typedef struct {
- UINT8 BootIndicator;
- UINT8 StartHead;
- UINT8 StartSector;
- UINT8 StartTrack;
- UINT8 OSIndicator;
- UINT8 EndHead;
- UINT8 EndSector;
- UINT8 EndTrack;
- UINT8 StartingLBA[4];
- UINT8 SizeInLBA[4];
-} MBR_PARTITION_RECORD;
-
-//
-// MBR Partition table
-//
-typedef struct {
- UINT8 BootStrapCode[440];
- UINT8 UniqueMbrSignature[4];
- UINT8 Unknown[2];
- MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
- UINT16 Signature;
-} MASTER_BOOT_RECORD;
-
-#pragma pack()
-
-#endif
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h
index de6fbf1..ceb838f 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h
@@ -27,7 +27,9 @@ Revision History
#ifndef __PARTITION_H__
#define __PARTITION_H__
-
+#include <IndustryStandard/Mbr.h>
+#include <IndustryStandard/ElTorito.h>
+#include <IndustryStandard/EfiGpt.h>
//
// Partition private data
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
index d9f7f1f..6c21dcf 100644
--- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
+++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.msa
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">
<MsaHeader>
<ModuleName>Partition</ModuleName>
@@ -52,9 +52,6 @@
</LibraryClassDefinitions>
<SourceFiles>
<Filename>Partition.h</Filename>
- <Filename>ElTorito.h</Filename>
- <Filename>Gpt.h</Filename>
- <Filename>Mbr.h</Filename>
<Filename>Partition.c</Filename>
<Filename>ElTorito.c</Filename>
<Filename>Gpt.c</Filename>