--- /dev/null
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation \r
+All rights reserved. This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+Module Name:\r
+\r
+ DecompressLibraryHob.h\r
+\r
+Abstract:\r
+\r
+ Declaration of HOB that is used to pass decompressor library functions from PEI to DXE\r
+\r
+--*/\r
+\r
+#ifndef __DECOMPRESS_LIBRARY_H__\r
+#define __DECOMPRESS_LIBRARY_H__\r
+\r
+typedef\r
+RETURN_STATUS\r
+(EFIAPI *DECOMPRESS_LIBRARY_GET_INFO) (\r
+ IN CONST VOID *Source,\r
+ IN UINT32 SourceSize,\r
+ OUT UINT32 *DestinationSize,\r
+ OUT UINT32 *ScratchSize\r
+ );\r
+\r
+typedef\r
+RETURN_STATUS\r
+(EFIAPI *DECOMPRESS_LIBRARY_DECOMPRESS) (\r
+ IN CONST VOID *Source,\r
+ IN OUT VOID *Destination,\r
+ IN OUT VOID *Scratch\r
+ );\r
+\r
+typedef struct {\r
+ DECOMPRESS_LIBRARY_GET_INFO GetInfo;\r
+ DECOMPRESS_LIBRARY_DECOMPRESS Decompress;\r
+} DECOMPRESS_LIBRARY;\r
+\r
+#endif\r
#include "DxeIpl.h"\r
\r
// porting note remove later\r
-#include "Common/DecompressLibraryHob.h"\r
+#include "DecompressLibrary.h"\r
#include "FrameworkPei.h"\r
// end of remove later\r
\r
#define EFI_CAPSULE_VENDOR_GUID \\r
{ 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }\r
\r
+//\r
+// Name of capsule variable\r
+// \r
+#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"\r
+\r
extern EFI_GUID gEfiCapsuleVendorGuid;\r
\r
#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_\r
#define EFI_FLASH_MAP_HOB_GUID \\r
{ 0xb091e7d2, 0x5a0, 0x4198, {0x94, 0xf0, 0x74, 0xb7, 0xb8, 0xc5, 0x54, 0x59 } }\r
\r
+\r
+//\r
+// Definition for flash map GUIDed HOBs\r
+//\r
+typedef UINT32 EFI_FLASH_AREA_ATTRIBUTES;\r
+\r
+#define EFI_FLASH_AREA_FV 0x0001\r
+#define EFI_FLASH_AREA_SUBFV 0x0002\r
+#define EFI_FLASH_AREA_MEMMAPPED_FV 0x0004\r
+#define EFI_FLASH_AREA_REQUIRED 0x0008\r
+#define EFI_FLASH_AREA_CORRUPT 0x0010\r
+\r
+typedef UINT8 EFI_FLASH_AREA_TYPE;\r
+\r
+#define EFI_FLASH_AREA_RECOVERY_BIOS 0x0 // Recovery code\r
+#define EFI_FLASH_AREA_MAIN_BIOS 0x1 // Regular BIOS code\r
+#define EFI_FLASH_AREA_PAL_B 0x2 // PAL-B\r
+#define EFI_FLASH_AREA_RESERVED_03 0x3 // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_RESERVED_04 0x4 // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_DMI_FRU 0x5 // DMI FRU information\r
+#define EFI_FLASH_AREA_OEM_BINARY 0x6 // OEM Binary Code/data\r
+#define EFI_FLASH_AREA_RESERVED_07 0x7 // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_RESERVED_08 0x8 // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_RESERVED_09 0x9 // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_RESERVED_0A 0x0a // Reserved for backwards compatibility\r
+#define EFI_FLASH_AREA_EFI_VARIABLES 0x0b // EFI variables\r
+#define EFI_FLASH_AREA_MCA_LOG 0x0c // MCA error log\r
+#define EFI_FLASH_AREA_SMBIOS_LOG 0x0d // SMBIOS error log\r
+#define EFI_FLASH_AREA_FTW_BACKUP 0x0e // A backup block during FTW operations\r
+#define EFI_FLASH_AREA_FTW_STATE 0x0f // State information during FTW operations\r
+#define EFI_FLASH_AREA_UNUSED 0x0fd // Not used\r
+#define EFI_FLASH_AREA_GUID_DEFINED 0x0fe // Usage defined by a GUID\r
+#pragma pack(1)\r
+//\r
+// An individual sub-area Entry.\r
+// A single flash area may consist of more than one sub-area.\r
+//\r
+typedef struct {\r
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;\r
+ UINT32 Reserved;\r
+ EFI_PHYSICAL_ADDRESS Base;\r
+ EFI_PHYSICAL_ADDRESS Length;\r
+ EFI_GUID FileSystem;\r
+} EFI_FLASH_SUBAREA_ENTRY;\r
+\r
+typedef struct {\r
+ UINT8 Reserved[3];\r
+ EFI_FLASH_AREA_TYPE AreaType;\r
+ EFI_GUID AreaTypeGuid;\r
+ UINT32 NumEntries;\r
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];\r
+} EFI_FLASH_MAP_ENTRY_DATA;\r
+\r
+typedef struct {\r
+ EFI_HOB_GENERIC_HEADER Header;\r
+ EFI_GUID Name;\r
+ UINT8 Reserved[3];\r
+ EFI_FLASH_AREA_TYPE AreaType;\r
+ EFI_GUID AreaTypeGuid;\r
+ UINT32 NumEntries;\r
+ EFI_FLASH_SUBAREA_ENTRY Entries[1];\r
+} EFI_HOB_FLASH_MAP_ENTRY_TYPE;\r
+\r
+//\r
+// Internal definitions\r
+//\r
+typedef struct {\r
+ UINT8 Reserved[3];\r
+ EFI_FLASH_AREA_TYPE AreaType;\r
+ EFI_GUID AreaTypeGuid;\r
+ UINT32 NumberOfEntries;\r
+ EFI_FLASH_SUBAREA_ENTRY SubAreaData;\r
+} EFI_FLASH_AREA_HOB_DATA;\r
+\r
+typedef struct {\r
+ UINTN Base;\r
+ UINTN Length;\r
+ EFI_FLASH_AREA_ATTRIBUTES Attributes;\r
+ EFI_FLASH_AREA_TYPE AreaType;\r
+ UINT8 Reserved[3];\r
+ EFI_GUID AreaTypeGuid;\r
+} EFI_FLASH_AREA_DATA;\r
+\r
+#pragma pack()\r
+\r
+\r
extern EFI_GUID gEfiFlashMapHobGuid;\r
\r
#endif // _FLASH_MAP_HOB_GUID_H_\r
#ifndef _PEI_FLASH_MAP_PPI_H_\r
#define _PEI_FLASH_MAP_PPI_H_\r
\r
-#include <common/FlashMap.h>\r
+#include <Guid/FlashMapHob.h>\r
\r
#define PEI_FLASH_MAP_PPI_GUID \\r
{ 0xf34c2fa0, 0xde88, 0x4270, {0x84, 0x14, 0x96, 0x12, 0x22, 0xf4, 0x52, 0x1c } }\r
--- /dev/null
+/**@file\r
+ Header file for EFI Variable Services.\r
+\r
+ Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+ \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __VARIABLE_FORMAT_H__\r
+#define __VARIABLE_FORMAT_H__\r
+\r
+#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')\r
+\r
+#define MAX_VARIABLE_SIZE 1024\r
+\r
+//\r
+// Enlarges the hardware error record maximum variable size to 32K bytes\r
+//\r
+#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000\r
+\r
+#define VARIABLE_DATA 0x55AA\r
+\r
+//\r
+// Variable Store Header flags\r
+//\r
+#define VARIABLE_STORE_FORMATTED 0x5a\r
+#define VARIABLE_STORE_HEALTHY 0xfe\r
+\r
+//\r
+// The alignment of variable's start offset.\r
+// For IA32/X64 architecture, the alignment is set to 1, and\r
+// 8 is for IPF archtecture.\r
+//\r
+#if defined (MDE_CPU_IPF)\r
+#define ALIGNMENT 8\r
+#else\r
+#define ALIGNMENT 1\r
+#endif\r
+\r
+//\r
+// Variable Store Status\r
+//\r
+typedef enum {\r
+ EfiRaw,\r
+ EfiValid,\r
+ EfiInvalid,\r
+ EfiUnknown\r
+} VARIABLE_STORE_STATUS;\r
+\r
+//\r
+// Variable State flags\r
+//\r
+#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion\r
+#define VAR_DELETED 0xfd // Variable is obsolete\r
+#define VAR_ADDED 0x7f // Variable has been completely added\r
+#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+ UINT32 Signature;\r
+ UINT32 Size;\r
+ UINT8 Format;\r
+ UINT8 State;\r
+ UINT16 Reserved;\r
+ UINT32 Reserved1;\r
+} VARIABLE_STORE_HEADER;\r
+\r
+typedef struct {\r
+ UINT16 StartId;\r
+ UINT8 State;\r
+ UINT8 Reserved;\r
+ UINT32 Attributes;\r
+ UINT32 NameSize;\r
+ UINT32 DataSize;\r
+ EFI_GUID VendorGuid;\r
+} VARIABLE_HEADER;\r
+\r
+#pragma pack()\r
+\r
+#endif // _EFI_VARIABLE_H_\r
--- /dev/null
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+ EfiWorkingBlockHeader.h\r
+\r
+Abstract:\r
+\r
+ Defines data structure that is the headers found at the runtime\r
+ updatable firmware volumes, such as the FileSystemGuid of the\r
+ working block, the header structure of the variable block, FTW\r
+ working block, or event log block.\r
+\r
+--*/\r
+\r
+#ifndef __EFI_WORKING_BLOCK_HEADER_H__\r
+#define __EFI_WORKING_BLOCK_HEADER_H__\r
+\r
+//\r
+// EFI Fault tolerant working block header\r
+// The header is immediately followed by the write queue.\r
+//\r
+typedef struct {\r
+ EFI_GUID Signature;\r
+ UINT32 Crc;\r
+ UINT8 WorkingBlockValid : 1;\r
+ UINT8 WorkingBlockInvalid : 1;\r
+#define WORKING_BLOCK_VALID 0x1\r
+#define WORKING_BLOCK_INVALID 0x2\r
+ UINT8 Reserved : 6;\r
+ UINT8 Reserved3[3];\r
+ UINT32 WriteQueueSize;\r
+ //\r
+ // UINT8 WriteQueue[WriteQueueSize];\r
+ //\r
+} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;\r
+\r
+#endif\r
#/** @file\r
# EFI/PI Reference Module Package for All Architectures\r
#\r
-# This FPD file is used for Package Level build.\r
-#\r
# Copyright (c) 2007, Intel Corporation\r
#\r
# All rights reserved. This program and the accompanying materials\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
-#include <Common/CapsuleName.h>\r
-\r
extern EFI_GUID gEfiCapsuleGuid;\r
\r
EFI_STATUS\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
-#include <Common/WorkingBlockHeader.h>\r
+#include <WorkingBlockHeader.h>\r
\r
#define EFI_D_FTW_LITE EFI_D_ERROR\r
#define EFI_D_FTW_INFO EFI_D_INFO\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation. All rights reserved. <BR> \r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
\r
\r
/*++\r
\r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved. <BR>\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
\r
\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation. All rights reserved. \r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
\r
Module Name:\r
# This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.\r
# Copyright (c) 2006 - 2007, Intel Corporation.\r
#\r
-# All rights reserved.\r
-# This software and associated documentation (if any) is furnished\r
-# under a license and may only be used or copied in accordance\r
-# with the terms of the license. Except as permitted by such\r
-# license, no part of this software or documentation may be\r
-# reproduced, stored in a retrieval system, or transmitted in any\r
-# form or by any means without the express written consent of\r
-# Intel Corporation.\r
+# Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
#\r
#\r
#**/\r
<Abstract>PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL.</Abstract>\r
<Description>This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.</Description>\r
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation.</Copyright>\r
- <License>All rights reserved.\r
- This software and associated documentation (if any) is furnished\r
- under a license and may only be used or copied in accordance\r
- with the terms of the license. Except as permitted by such\r
- license, no part of this software or documentation may be\r
- reproduced, stored in a retrieval system, or transmitted in any\r
- form or by any means without the express written consent of\r
- Intel Corporation.</License>\r
+ <License>\r
+ Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ </License>\r
<Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>\r
</MsaHeader>\r
<ModuleDefinitions>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/BaseLib.h>\r
-\r
-//\r
-// BugBug: We need relcate the head file.\r
-//\r
-#include <Common/Variable.h>\r
+#include <VariableFormat.h>\r
\r
#define VARIABLE_STORE_SIZE (64 * 1024)\r
#define SCRATCH_SIZE (4 * 1024)\r
#include <Library/PcdLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/PeiServicesTablePointerLib.h>\r
-\r
-\r
-//\r
-// BugBug: We need relcate the head file.\r
-//\r
-#include <Common/Variable.h>\r
+#include <VariableFormat.h>\r
\r
//\r
// Define GET_PAD_SIZE to optimize compiler\r
\r
\r
#include "Variable.h"\r
-#include <Common/FlashMap.h>\r
+#include <Guid/FlashMapHob.h>\r
\r
//\r
// Don't use module globals after the SetVirtualAddress map is signaled\r
#include <Library/BaseLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/HobLib.h>\r
-#include <Common/FlashMap.h>\r
#include <Guid/FlashMapHob.h>\r
-\r
-//\r
-// BugBug: We need relcate the head file.\r
-//\r
-#include <Common/Variable.h>\r
+#include <Guid/FlashMapHob.h>\r
+#include <VariableFormat.h>\r
\r
#define VARIABLE_RECLAIM_THRESHOLD (1024)\r
\r
--*/\r
\r
\r
-#include <Variable.h>\r
-#include "Common/Variable.h"\r
+#include "Variable.h"\r
+#include <VariableFormat.h>\r
\r
EFI_STATUS\r
GetFvbHandleByAddress (\r
//\r
#include "CommonHeader.h"\r
\r
-#include <Common/FlashMap.H>\r
+#include <Guid/FlashMapHob.h>\r
\r
VOID\r
BdsLockFv (\r