summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DecompressLibrary.h47
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c2
-rw-r--r--MdeModulePkg/Include/Guid/CapsuleVendor.h5
-rw-r--r--MdeModulePkg/Include/Guid/FlashMapHob.h86
-rw-r--r--MdeModulePkg/Include/Ppi/FlashMap.h2
-rw-r--r--MdeModulePkg/Include/VariableFormat.h87
-rw-r--r--MdeModulePkg/Include/WorkingBlockHeader.h47
-rw-r--r--MdeModulePkg/MdeModulePkg.dsc2
-rw-r--r--MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h2
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h2
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c16
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c16
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h16
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf16
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.msa18
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h6
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.h7
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c2
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h8
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/reclaim.c4
20 files changed, 324 insertions, 67 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DecompressLibrary.h b/MdeModulePkg/Core/DxeIplPeim/DecompressLibrary.h
new file mode 100644
index 0000000..31cb3e8
--- /dev/null
+++ b/MdeModulePkg/Core/DxeIplPeim/DecompressLibrary.h
@@ -0,0 +1,47 @@
+/*++
+
+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:
+
+ DecompressLibraryHob.h
+
+Abstract:
+
+ Declaration of HOB that is used to pass decompressor library functions from PEI to DXE
+
+--*/
+
+#ifndef __DECOMPRESS_LIBRARY_H__
+#define __DECOMPRESS_LIBRARY_H__
+
+typedef
+RETURN_STATUS
+(EFIAPI *DECOMPRESS_LIBRARY_GET_INFO) (
+ IN CONST VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
+ );
+
+typedef
+RETURN_STATUS
+(EFIAPI *DECOMPRESS_LIBRARY_DECOMPRESS) (
+ IN CONST VOID *Source,
+ IN OUT VOID *Destination,
+ IN OUT VOID *Scratch
+ );
+
+typedef struct {
+ DECOMPRESS_LIBRARY_GET_INFO GetInfo;
+ DECOMPRESS_LIBRARY_DECOMPRESS Decompress;
+} DECOMPRESS_LIBRARY;
+
+#endif
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index ebae17c..b749fb1 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -23,7 +23,7 @@ Abstract:
#include "DxeIpl.h"
// porting note remove later
-#include "Common/DecompressLibraryHob.h"
+#include "DecompressLibrary.h"
#include "FrameworkPei.h"
// end of remove later
diff --git a/MdeModulePkg/Include/Guid/CapsuleVendor.h b/MdeModulePkg/Include/Guid/CapsuleVendor.h
index cd48c39..a97a9b5 100644
--- a/MdeModulePkg/Include/Guid/CapsuleVendor.h
+++ b/MdeModulePkg/Include/Guid/CapsuleVendor.h
@@ -30,6 +30,11 @@ Abstract:
#define EFI_CAPSULE_VENDOR_GUID \
{ 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }
+//
+// Name of capsule variable
+//
+#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"
+
extern EFI_GUID gEfiCapsuleVendorGuid;
#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_
diff --git a/MdeModulePkg/Include/Guid/FlashMapHob.h b/MdeModulePkg/Include/Guid/FlashMapHob.h
index a9e9b67..416a8c6 100644
--- a/MdeModulePkg/Include/Guid/FlashMapHob.h
+++ b/MdeModulePkg/Include/Guid/FlashMapHob.h
@@ -28,6 +28,92 @@ Abstract:
#define EFI_FLASH_MAP_HOB_GUID \
{ 0xb091e7d2, 0x5a0, 0x4198, {0x94, 0xf0, 0x74, 0xb7, 0xb8, 0xc5, 0x54, 0x59 } }
+
+//
+// Definition for flash map GUIDed HOBs
+//
+typedef UINT32 EFI_FLASH_AREA_ATTRIBUTES;
+
+#define EFI_FLASH_AREA_FV 0x0001
+#define EFI_FLASH_AREA_SUBFV 0x0002
+#define EFI_FLASH_AREA_MEMMAPPED_FV 0x0004
+#define EFI_FLASH_AREA_REQUIRED 0x0008
+#define EFI_FLASH_AREA_CORRUPT 0x0010
+
+typedef UINT8 EFI_FLASH_AREA_TYPE;
+
+#define EFI_FLASH_AREA_RECOVERY_BIOS 0x0 // Recovery code
+#define EFI_FLASH_AREA_MAIN_BIOS 0x1 // Regular BIOS code
+#define EFI_FLASH_AREA_PAL_B 0x2 // PAL-B
+#define EFI_FLASH_AREA_RESERVED_03 0x3 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_04 0x4 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_DMI_FRU 0x5 // DMI FRU information
+#define EFI_FLASH_AREA_OEM_BINARY 0x6 // OEM Binary Code/data
+#define EFI_FLASH_AREA_RESERVED_07 0x7 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_08 0x8 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_09 0x9 // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_RESERVED_0A 0x0a // Reserved for backwards compatibility
+#define EFI_FLASH_AREA_EFI_VARIABLES 0x0b // EFI variables
+#define EFI_FLASH_AREA_MCA_LOG 0x0c // MCA error log
+#define EFI_FLASH_AREA_SMBIOS_LOG 0x0d // SMBIOS error log
+#define EFI_FLASH_AREA_FTW_BACKUP 0x0e // A backup block during FTW operations
+#define EFI_FLASH_AREA_FTW_STATE 0x0f // State information during FTW operations
+#define EFI_FLASH_AREA_UNUSED 0x0fd // Not used
+#define EFI_FLASH_AREA_GUID_DEFINED 0x0fe // Usage defined by a GUID
+#pragma pack(1)
+//
+// An individual sub-area Entry.
+// A single flash area may consist of more than one sub-area.
+//
+typedef struct {
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;
+ UINT32 Reserved;
+ EFI_PHYSICAL_ADDRESS Base;
+ EFI_PHYSICAL_ADDRESS Length;
+ EFI_GUID FileSystem;
+} EFI_FLASH_SUBAREA_ENTRY;
+
+typedef struct {
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumEntries;
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];
+} EFI_FLASH_MAP_ENTRY_DATA;
+
+typedef struct {
+ EFI_HOB_GENERIC_HEADER Header;
+ EFI_GUID Name;
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumEntries;
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];
+} EFI_HOB_FLASH_MAP_ENTRY_TYPE;
+
+//
+// Internal definitions
+//
+typedef struct {
+ UINT8 Reserved[3];
+ EFI_FLASH_AREA_TYPE AreaType;
+ EFI_GUID AreaTypeGuid;
+ UINT32 NumberOfEntries;
+ EFI_FLASH_SUBAREA_ENTRY SubAreaData;
+} EFI_FLASH_AREA_HOB_DATA;
+
+typedef struct {
+ UINTN Base;
+ UINTN Length;
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;
+ EFI_FLASH_AREA_TYPE AreaType;
+ UINT8 Reserved[3];
+ EFI_GUID AreaTypeGuid;
+} EFI_FLASH_AREA_DATA;
+
+#pragma pack()
+
+
extern EFI_GUID gEfiFlashMapHobGuid;
#endif // _FLASH_MAP_HOB_GUID_H_
diff --git a/MdeModulePkg/Include/Ppi/FlashMap.h b/MdeModulePkg/Include/Ppi/FlashMap.h
index c979978..a2ab338 100644
--- a/MdeModulePkg/Include/Ppi/FlashMap.h
+++ b/MdeModulePkg/Include/Ppi/FlashMap.h
@@ -24,7 +24,7 @@ Abstract:
#ifndef _PEI_FLASH_MAP_PPI_H_
#define _PEI_FLASH_MAP_PPI_H_
-#include <common/FlashMap.h>
+#include <Guid/FlashMapHob.h>
#define PEI_FLASH_MAP_PPI_GUID \
{ 0xf34c2fa0, 0xde88, 0x4270, {0x84, 0x14, 0x96, 0x12, 0x22, 0xf4, 0x52, 0x1c } }
diff --git a/MdeModulePkg/Include/VariableFormat.h b/MdeModulePkg/Include/VariableFormat.h
new file mode 100644
index 0000000..a4a3758
--- /dev/null
+++ b/MdeModulePkg/Include/VariableFormat.h
@@ -0,0 +1,87 @@
+/**@file
+ Header file for EFI Variable Services.
+
+ Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+ 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.
+
+**/
+
+#ifndef __VARIABLE_FORMAT_H__
+#define __VARIABLE_FORMAT_H__
+
+#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
+
+#define MAX_VARIABLE_SIZE 1024
+
+//
+// Enlarges the hardware error record maximum variable size to 32K bytes
+//
+#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000
+
+#define VARIABLE_DATA 0x55AA
+
+//
+// Variable Store Header flags
+//
+#define VARIABLE_STORE_FORMATTED 0x5a
+#define VARIABLE_STORE_HEALTHY 0xfe
+
+//
+// The alignment of variable's start offset.
+// For IA32/X64 architecture, the alignment is set to 1, and
+// 8 is for IPF archtecture.
+//
+#if defined (MDE_CPU_IPF)
+#define ALIGNMENT 8
+#else
+#define ALIGNMENT 1
+#endif
+
+//
+// Variable Store Status
+//
+typedef enum {
+ EfiRaw,
+ EfiValid,
+ EfiInvalid,
+ EfiUnknown
+} VARIABLE_STORE_STATUS;
+
+//
+// Variable State flags
+//
+#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion
+#define VAR_DELETED 0xfd // Variable is obsolete
+#define VAR_ADDED 0x7f // Variable has been completely added
+#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
+
+#pragma pack(1)
+
+typedef struct {
+ UINT32 Signature;
+ UINT32 Size;
+ UINT8 Format;
+ UINT8 State;
+ UINT16 Reserved;
+ UINT32 Reserved1;
+} VARIABLE_STORE_HEADER;
+
+typedef struct {
+ UINT16 StartId;
+ UINT8 State;
+ UINT8 Reserved;
+ UINT32 Attributes;
+ UINT32 NameSize;
+ UINT32 DataSize;
+ EFI_GUID VendorGuid;
+} VARIABLE_HEADER;
+
+#pragma pack()
+
+#endif // _EFI_VARIABLE_H_
diff --git a/MdeModulePkg/Include/WorkingBlockHeader.h b/MdeModulePkg/Include/WorkingBlockHeader.h
new file mode 100644
index 0000000..fc023ff
--- /dev/null
+++ b/MdeModulePkg/Include/WorkingBlockHeader.h
@@ -0,0 +1,47 @@
+/*++
+
+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:
+
+ EfiWorkingBlockHeader.h
+
+Abstract:
+
+ Defines data structure that is the headers found at the runtime
+ updatable firmware volumes, such as the FileSystemGuid of the
+ working block, the header structure of the variable block, FTW
+ working block, or event log block.
+
+--*/
+
+#ifndef __EFI_WORKING_BLOCK_HEADER_H__
+#define __EFI_WORKING_BLOCK_HEADER_H__
+
+//
+// EFI Fault tolerant working block header
+// The header is immediately followed by the write queue.
+//
+typedef struct {
+ EFI_GUID Signature;
+ UINT32 Crc;
+ UINT8 WorkingBlockValid : 1;
+ UINT8 WorkingBlockInvalid : 1;
+#define WORKING_BLOCK_VALID 0x1
+#define WORKING_BLOCK_INVALID 0x2
+ UINT8 Reserved : 6;
+ UINT8 Reserved3[3];
+ UINT32 WriteQueueSize;
+ //
+ // UINT8 WriteQueue[WriteQueueSize];
+ //
+} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
+
+#endif
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 795eb8f..ca492e3 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -1,8 +1,6 @@
#/** @file
# EFI/PI Reference Module Package for All Architectures
#
-# This FPD file is used for Package Level build.
-#
# Copyright (c) 2007, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
index 1965c3c..5d73810 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
@@ -37,8 +37,6 @@ Abstract:
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
-#include <Common/CapsuleName.h>
-
extern EFI_GUID gEfiCapsuleGuid;
EFI_STATUS
diff --git a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h
index bc28dce..4ce98eb 100644
--- a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h
+++ b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.h
@@ -44,7 +44,7 @@ Abstract:
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
-#include <Common/WorkingBlockHeader.h>
+#include <WorkingBlockHeader.h>
#define EFI_D_FTW_LITE EFI_D_ERROR
#define EFI_D_FTW_INFO EFI_D_INFO
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c
index f0b1640..b3be2ca 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/Ia32/Ia32PcRtc.c
@@ -1,13 +1,13 @@
/*++
-Copyright (c) 2006, Intel Corporation. All rights reserved. <BR>
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+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.
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
index a58aee5..e9bd801 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -1,13 +1,13 @@
/*++
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved. <BR>
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+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.
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h
index 35ed2a8..6189daa 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h
@@ -1,13 +1,13 @@
/*++
-Copyright (c) 2006, Intel Corporation. All rights reserved.
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+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:
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
index b46fb03..c72abed 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
@@ -4,14 +4,14 @@
# This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.
# Copyright (c) 2006 - 2007, Intel Corporation.
#
-# All rights reserved.
-# This software and associated documentation (if any) is furnished
-# under a license and may only be used or copied in accordance
-# with the terms of the license. Except as permitted by such
-# license, no part of this software or documentation may be
-# reproduced, stored in a retrieval system, or transmitted in any
-# form or by any means without the express written consent of
-# Intel Corporation.
+# Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+# 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.
#
#
#**/
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.msa b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.msa
index 9e911b8..c1b88e2 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.msa
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.msa
@@ -8,14 +8,16 @@
<Abstract>PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL.</Abstract>
<Description>This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.</Description>
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation.</Copyright>
- <License>All rights reserved.
- This software and associated documentation (if any) is furnished
- under a license and may only be used or copied in accordance
- with the terms of the license. Except as permitted by such
- license, no part of this software or documentation may be
- reproduced, stored in a retrieval system, or transmitted in any
- form or by any means without the express written consent of
- Intel Corporation.</License>
+ <License>
+ Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+ 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.
+ </License>
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
</MsaHeader>
<ModuleDefinitions>
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
index 8fa70ab..696065a 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
@@ -37,11 +37,7 @@ Abstract:
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
-
-//
-// BugBug: We need relcate the head file.
-//
-#include <Common/Variable.h>
+#include <VariableFormat.h>
#define VARIABLE_STORE_SIZE (64 * 1024)
#define SCRATCH_SIZE (4 * 1024)
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePkg/Universal/Variable/Pei/Variable.h
index 9747a8d..7155cda 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.h
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h
@@ -30,12 +30,7 @@ Abstract:
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeiServicesTablePointerLib.h>
-
-
-//
-// BugBug: We need relcate the head file.
-//
-#include <Common/Variable.h>
+#include <VariableFormat.h>
//
// Define GET_PAD_SIZE to optimize compiler
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 784a198..8f546bd 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -21,7 +21,7 @@ Revision History
#include "Variable.h"
-#include <Common/FlashMap.h>
+#include <Guid/FlashMapHob.h>
//
// Don't use module globals after the SetVirtualAddress map is signaled
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index 904a681..1eb477e 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -37,13 +37,9 @@ Abstract:
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/HobLib.h>
-#include <Common/FlashMap.h>
#include <Guid/FlashMapHob.h>
-
-//
-// BugBug: We need relcate the head file.
-//
-#include <Common/Variable.h>
+#include <Guid/FlashMapHob.h>
+#include <VariableFormat.h>
#define VARIABLE_RECLAIM_THRESHOLD (1024)
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/reclaim.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/reclaim.c
index 0adaa87..dd43493 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/reclaim.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/reclaim.c
@@ -23,8 +23,8 @@ Revision History
--*/
-#include <Variable.h>
-#include "Common/Variable.h"
+#include "Variable.h"
+#include <VariableFormat.h>
EFI_STATUS
GetFvbHandleByAddress (