+++ /dev/null
-/** @file\r
- This driver supports platform security service.\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
-**/\r
-\r
-\r
-#include "SecurityStub.h"\r
-\r
-//\r
-// Handle for the Security Architectural Protocol instance produced by this driver\r
-//\r
-EFI_HANDLE mSecurityArchProtocolHandle = NULL;\r
-\r
-//\r
-// Security Architectural Protocol instance produced by this driver\r
-//\r
-EFI_SECURITY_ARCH_PROTOCOL mSecurityStub = { \r
- SecurityStubAuthenticateState \r
-};\r
-\r
-\r
-/**\r
- The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific \r
- policy from the DXE core response to an attempt to use a file that returns a \r
- given status for the authentication check from the section extraction protocol. \r
-\r
- The possible responses in a given SAP implementation may include locking \r
- flash upon failure to authenticate, attestation logging for all signed drivers, \r
- and other exception operations. The File parameter allows for possible logging \r
- within the SAP of the driver.\r
-\r
- If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
-\r
- If the file specified by File with an authentication status specified by \r
- AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
-\r
- If the file specified by File with an authentication status specified by \r
- AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
- then EFI_ACCESS_DENIED is returned.\r
-\r
- If the file specified by File with an authentication status specified by \r
- AuthenticationStatus is not safe for the DXE Core to use right now, but it \r
- might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
- returned.\r
-\r
- @param This The EFI_SECURITY_ARCH_PROTOCOL instance.\r
- @param AuthenticationStatus \r
- This is the authentication type returned from the Section\r
- Extraction protocol. See the Section Extraction Protocol\r
- Specification for details on this type.\r
- @param File This is a pointer to the device path of the file that is\r
- being dispatched. This will optionally be used for logging.\r
-\r
- @retval EFI_SUCCESS The file specified by File did authenticate, and the\r
- platform policy dictates that the DXE Core may use File.\r
- @retval EFI_INVALID_PARAMETER Driver is NULL.\r
- @retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and\r
- the platform policy dictates that File should be placed\r
- in the untrusted state. A file may be promoted from\r
- the untrusted to the trusted state at a future time\r
- with a call to the Trust() DXE Service.\r
- @retval EFI_ACCESS_DENIED The file specified by File did not authenticate, and\r
- the platform policy dictates that File should not be\r
- used for any purpose.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-SecurityStubAuthenticateState (\r
- IN EFI_SECURITY_ARCH_PROTOCOL *This,\r
- IN UINT32 AuthenticationStatus,\r
- IN EFI_DEVICE_PATH_PROTOCOL *File\r
- )\r
-{\r
- if (File == NULL) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
- The user Entry Point for DXE driver. The user code starts with this function\r
- as the real entry point for the image goes into a library that calls this \r
- function.\r
-\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image. \r
- @param[in] SystemTable A pointer to the EFI System Table.\r
- \r
- @retval EFI_SUCCESS The entry point is executed successfully.\r
- @retval other Some error occurs when executing this entry point.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-SecurityStubInitialize (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- //\r
- // Make sure the Security Architectural Protocol is not already installed in the system\r
- //\r
- ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiSecurityArchProtocolGuid);\r
-\r
- //\r
- // Install the Security Architectural Protocol onto a new handle\r
- //\r
- Status = gBS->InstallMultipleProtocolInterfaces (\r
- &mSecurityArchProtocolHandle,\r
- &gEfiSecurityArchProtocolGuid,\r
- &mSecurityStub,\r
- NULL\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
-\r
- return Status;\r
-}\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
- SecurityStub.dxs\r
-\r
-Abstract:\r
-\r
- Dependency expression source file.\r
- \r
---*/ \r
-\r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
-\r
-#include <DxeDepex.h>\r
-\r
-DEPENDENCY_START\r
- TRUE\r
-DEPENDENCY_END\r
+++ /dev/null
-/** @file\r
- Some definitions for Security Architectural Protocol stub driver\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
-**/\r
-\r
-#ifndef _SECURITY_STUB_ARCH_PROTOCOL_H\r
-#define _SECURITY_STUB_ARCH_PROTOCOL_H\r
-\r
-\r
-//\r
-// Common header files for this module.\r
-//\r
-#include <PiDxe.h>\r
-#include <Protocol/Security.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-\r
-//\r
-// Function prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-SecurityStubAuthenticateState (\r
- IN EFI_SECURITY_ARCH_PROTOCOL *This,\r
- IN UINT32 AuthenticationStatus,\r
- IN EFI_DEVICE_PATH_PROTOCOL *File\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-SecurityStubInitialize (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- );\r
-\r
-#endif\r
+++ /dev/null
-#/** @file\r
-# Component description file for SecurityStub module\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
-#\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 = SecurityStub\r
- FILE_GUID = F80697E9-7FD6-4665-8646-88E33EF71DFC\r
- MODULE_TYPE = DXE_DRIVER\r
- VERSION_STRING = 1.0\r
- EDK_RELEASE_VERSION = 0x00020000\r
- EFI_SPECIFICATION_VERSION = 0x00020000\r
-\r
- ENTRY_POINT = SecurityStubInitialize\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC\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
- SecurityStub.c\r
- SecurityStub.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
-\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-# this module.\r
-#\r
-################################################################################\r
-\r
-[LibraryClasses]\r
- UefiDriverEntryPoint\r
- UefiBootServicesTableLib\r
- DebugLib\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
- gEfiSecurityArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED\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
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">\r
- <MsaHeader>\r
- <ModuleName>SecurityStub</ModuleName>\r
- <ModuleType>DXE_DRIVER</ModuleType>\r
- <GuidValue>F80697E9-7FD6-4665-8646-88E33EF71DFC</GuidValue>\r
- <Version>1.0</Version>\r
- <Abstract>Component description file for SecurityStub module</Abstract>\r
- <Description>This driver supports platform security service.</Description>\r
- <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
- <License>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.</License>\r
- <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>\r
- </MsaHeader>\r
- <ModuleDefinitions>\r
- <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>\r
- <BinaryModule>false</BinaryModule>\r
- <OutputFileBasename>SecurityStub</OutputFileBasename>\r
- </ModuleDefinitions>\r
- <LibraryClassDefinitions>\r
- <LibraryClass Usage="ALWAYS_CONSUMED" RecommendedInstanceGuid="bda39d3a-451b-4350-8266-81ab10fa0523">\r
- <Keyword>DebugLib</Keyword>\r
- <HelpText>Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg.</HelpText>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiBootServicesTableLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiDriverEntryPoint</Keyword>\r
- </LibraryClass>\r
- </LibraryClassDefinitions>\r
- <SourceFiles>\r
- <Filename>SecurityStub.dxs</Filename>\r
- <Filename>SecurityStub.h</Filename>\r
- <Filename>SecurityStub.c</Filename>\r
- </SourceFiles>\r
- <PackageDependencies>\r
- <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
- </PackageDependencies>\r
- <Protocols>\r
- <Protocol Usage="ALWAYS_PRODUCED">\r
- <ProtocolCName>gEfiSecurityArchProtocolGuid</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>SecurityStubInitialize</ModuleEntryPoint>\r
- </Extern>\r
- </Externs>\r
-</ModuleSurfaceArea>
\ No newline at end of file