+++ /dev/null
-#/** @file\r
-# Emulation Variable for EFI_RUNTIME_SERVICES.\r
-#\r
-# This module provides three EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName\r
-# Copyright (c) 2006 - 2007, Intel Corporation\r
-#\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
-# 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
-#\r
-# Defines Section - statements that will be processed to create a Makefile.\r
-#\r
-################################################################################\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = EmuVariableIpf\r
- FILE_GUID = A46320E8-0514-489a-BC4E-481624D9CE33\r
- MODULE_TYPE = DXE_SAL_DRIVER\r
- VERSION_STRING = 1.0\r
- EDK_RELEASE_VERSION = 0x00020000\r
- EFI_SPECIFICATION_VERSION = 0x00020000\r
-\r
- ENTRY_POINT = VariableServiceInitialize\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IPF\r
-#\r
-\r
-################################################################################\r
-#\r
-# Sources Section - list of files that are required for the build to succeed.\r
-#\r
-################################################################################\r
-\r
-[Sources.common]\r
- Ipf/InitVariable.c\r
- EmuVariable.c\r
- Variable.h\r
-\r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-# this module.\r
-#\r
-################################################################################\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- MdeModulePkg/MdeModulePkg.dec\r
-\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-# this module.\r
-#\r
-################################################################################\r
-\r
-[LibraryClasses]\r
- ExtendedSalLib\r
- BaseLib\r
- UefiLib\r
- UefiBootServicesTableLib\r
- UefiDriverEntryPoint\r
- UefiRuntimeLib\r
- DebugLib\r
- MemoryAllocationLib\r
- BaseMemoryLib\r
-\r
-\r
-################################################################################\r
-#\r
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names\r
-# that this module uses or produces.\r
-#\r
-################################################################################\r
-\r
-[Protocols]\r
- gEfiExtendedSalVariableServicesProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
-\r
-\r
-################################################################################\r
-#\r
-# Dependency Expression Section - list of Dependency expressions that are required for\r
-# this module.\r
-#\r
-################################################################################\r
-\r
-[Depex]\r
- TRUE\r
-\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
- <MsaHeader>\r
- <ModuleName>EmuVariableIpf</ModuleName>\r
- <ModuleType>DXE_SAL_DRIVER</ModuleType>\r
- <GuidValue>A46320E8-0514-489a-BC4E-481624D9CE33</GuidValue>\r
- <Version>1.0</Version>\r
- <Abstract>Emulation Variable for EFI_RUNTIME_SERVICES.</Abstract>\r
- <Description>This module provides three EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName</Description>\r
- <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
- <License>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>\r
- <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>\r
- </MsaHeader>\r
- <ModuleDefinitions>\r
- <SupportedArchitectures>IPF</SupportedArchitectures>\r
- <BinaryModule>false</BinaryModule>\r
- <OutputFileBasename>EmuVariableIpf</OutputFileBasename>\r
- </ModuleDefinitions>\r
- <LibraryClassDefinitions>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>BaseMemoryLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>MemoryAllocationLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>DebugLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiRuntimeLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiDriverEntryPoint</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiBootServicesTableLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>BaseLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>ExtendedSalLib</Keyword>\r
- </LibraryClass>\r
- </LibraryClassDefinitions>\r
- <SourceFiles>\r
- <Filename>Variable.h</Filename>\r
- <Filename>EmuVariable.c</Filename>\r
- <Filename>EmuVariable.dxs</Filename>\r
- <Filename>Ipf/InitVariable.c</Filename>\r
- </SourceFiles>\r
- <PackageDependencies>\r
- <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
- <Package PackageGuid="68169ab0-d41b-4009-9060-292c253ac43d"/>\r
- </PackageDependencies>\r
- <Protocols>\r
- <Protocol Usage="ALWAYS_CONSUMED">\r
- <ProtocolCName>gEfiExtendedSalVariableServicesProtocolGuid</ProtocolCName>\r
- </Protocol>\r
- </Protocols>\r
- <Externs>\r
- <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
- <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
- <Extern>\r
- <ModuleEntryPoint>VariableServiceInitialize</ModuleEntryPoint>\r
- </Extern>\r
- </Externs>\r
-</ModuleSurfaceArea>
\ No newline at end of file
+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006 - 2007, 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
- IpfVariable.c\r
-\r
-Abstract:\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#include "Variable.h"\r
-#include <IndustryStandard/Sal.h>\r
-\r
-//\r
-// Don't use module globals after the SetVirtualAddress map is signaled\r
-//\r
-\r
-STATIC\r
-SAL_RETURN_REGS\r
-EsalVariableCommonEntry (\r
- IN UINT64 FunctionId,\r
- IN UINT64 Arg2,\r
- IN UINT64 Arg3,\r
- IN UINT64 Arg4,\r
- IN UINT64 Arg5,\r
- IN UINT64 Arg6,\r
- IN UINT64 Arg7,\r
- IN UINT64 Arg8,\r
- IN SAL_EXTENDED_SAL_PROC ExtendedSalProc,\r
- IN BOOLEAN VirtualMode,\r
- IN ESAL_VARIABLE_GLOBAL *Global\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
- SAL_RETURN_REGS ReturnVal;\r
-\r
- switch (FunctionId) {\r
- case EsalGetVariable:\r
- ReturnVal.Status = GetVariable (\r
- (CHAR16 *) Arg2,\r
- (EFI_GUID *) Arg3,\r
- (UINT32 *) Arg4,\r
- (UINTN *) Arg5,\r
- (VOID *) Arg6,\r
- &Global->VariableGlobal[VirtualMode],\r
- Global->FvbInstance\r
- );\r
- return ReturnVal;\r
-\r
- case EsalGetNextVariableName:\r
- ReturnVal.Status = GetNextVariableName (\r
- (UINTN *) Arg2,\r
- (CHAR16 *) Arg3,\r
- (EFI_GUID *) Arg4,\r
- &Global->VariableGlobal[VirtualMode],\r
- Global->FvbInstance\r
- );\r
- return ReturnVal;\r
-\r
- case EsalSetVariable:\r
- ReturnVal.Status = SetVariable (\r
- (CHAR16 *) Arg2,\r
- (EFI_GUID *) Arg3,\r
- (UINT32) Arg4,\r
- (UINTN) Arg5,\r
- (VOID *) Arg6,\r
- &Global->VariableGlobal[VirtualMode],\r
- (UINTN *) &Global->VolatileLastVariableOffset,\r
- (UINTN *) &Global->NonVolatileLastVariableOffset,\r
- Global->FvbInstance\r
- );\r
- return ReturnVal;\r
-\r
- case EsalQueryVariableInfo:\r
- ReturnVal.Status = QueryVariableInfo (\r
- (UINT32) Arg2,\r
- (UINT64 *) Arg3,\r
- (UINT64 *) Arg4,\r
- (UINT64 *) Arg5,\r
- &Global->VariableGlobal[VirtualMode],\r
- Global->FvbInstance\r
- );\r
- return ReturnVal;\r
-\r
- default:\r
- ReturnVal.Status = EFI_SAL_INVALID_ARGUMENT;\r
- return ReturnVal;\r
- }\r
-}\r
-\r
-\r
-VOID\r
-VariableClassAddressChangeEvent (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
- CopyMem (\r
- &mVariableModuleGlobal->VariableGlobal[Virtual],\r
- &mVariableModuleGlobal->VariableGlobal[Physical],\r
- sizeof (VARIABLE_GLOBAL)\r
- );\r
-\r
- EfiConvertPointer (\r
- 0x0,\r
- (VOID **) &mVariableModuleGlobal->VariableGlobal[Virtual].NonVolatileVariableBase\r
- );\r
- EfiConvertPointer (\r
- 0x0,\r
- (VOID **) &mVariableModuleGlobal->VariableGlobal[Virtual].VolatileVariableBase\r
- );\r
- EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal);\r
-}\r
-\r
-EFI_STATUS\r
-VariableServiceInitialize (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
-{\r
- EFI_STATUS Status;\r
-\r
- Status = VariableCommonInitialize (ImageHandle, SystemTable);\r
- ASSERT_EFI_ERROR (Status);\r
-\r
- //\r
- // Register All the Functions with Extended Sal.\r
- //\r
- RegisterEsalClass (\r
- &gEfiExtendedSalVariableServicesProtocolGuid,\r
- mVariableModuleGlobal,\r
- EsalVariableCommonEntry,\r
- EsalGetVariable,\r
- EsalVariableCommonEntry,\r
- EsalGetNextVariableName,\r
- EsalVariableCommonEntry,\r
- EsalSetVariable,\r
- EsalVariableCommonEntry,\r
- EsalQueryVariableInfo,\r
- NULL\r
- );\r
-\r
- return EFI_SUCCESS;\r
-}\r