Revision: 18677
http://sourceforge.net/p/edk2/code/18677
Author: jyao1
Date: 2015-10-27 03:54:08 +0000 (Tue, 27 Oct 2015)
Log Message:
-----------
Move Smbios measurement from TCG driver to Smbios driver.
This is patch to remove smbios measurement in TCG driver. There will be other
patch to add it in Smbios driver.
The problem of current SMBIOS measurement is:
1) TCG drivers do not support SMBIOS3.0 table.
2) TCG drivers do not follow TCG platform spec on: "Platform configuration
information that is automatically updated,
such as clock registers, and system unique information, such as asset numbers
or serial numbers,
MUST NOT be measured into PCR [1], or any other PCR."
So we decide to move Smbios measurement from TCG drivers to Smbios driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <[email protected]>
Reviewed-by: "Zhang, Chao B" <[email protected]>
Modified Paths:
--------------
trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.inf
Modified: trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c 2015-10-27 03:49:31 UTC
(rev 18676)
+++ trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c 2015-10-27 03:54:08 UTC
(rev 18677)
@@ -15,11 +15,9 @@
#include <PiDxe.h>
#include <IndustryStandard/Acpi.h>
#include <IndustryStandard/PeImage.h>
-#include <IndustryStandard/SmBios.h>
#include <IndustryStandard/TcpaAcpi.h>
#include <Guid/GlobalVariable.h>
-#include <Guid/SmBios.h>
#include <Guid/HobList.h>
#include <Guid/TcgEventHob.h>
#include <Guid/EventGroup.h>
@@ -1690,43 +1688,14 @@
)
{
EFI_STATUS Status;
- SMBIOS_TABLE_ENTRY_POINT *SmbiosTable;
TCG_PCR_EVENT_HDR TcgEvent;
EFI_HANDOFF_TABLE_POINTERS HandoffTables;
UINTN ProcessorNum;
EFI_CPU_PHYSICAL_LOCATION *ProcessorLocBuf;
ProcessorLocBuf = NULL;
+ Status = EFI_SUCCESS;
- //
- // Measure SMBIOS with EV_EFI_HANDOFF_TABLES to PCR[1]
- //
- Status = EfiGetSystemConfigurationTable (
- &gEfiSmbiosTableGuid,
- (VOID **) &SmbiosTable
- );
-
- if (!EFI_ERROR (Status) && SmbiosTable != NULL) {
- TcgEvent.PCRIndex = 1;
- TcgEvent.EventType = EV_EFI_HANDOFF_TABLES;
- TcgEvent.EventSize = sizeof (HandoffTables);
-
- HandoffTables.NumberOfTables = 1;
- HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid;
- HandoffTables.TableEntry[0].VendorTable = SmbiosTable;
-
- DEBUG ((DEBUG_INFO, "The Smbios Table starts at: 0x%x\n",
SmbiosTable->TableAddress));
- DEBUG ((DEBUG_INFO, "The Smbios Table size: 0x%x\n",
SmbiosTable->TableLength));
-
- Status = TcgDxeHashLogExtendEvent (
- 0,
- (UINT8*)(UINTN)SmbiosTable->TableAddress,
- SmbiosTable->TableLength,
- &TcgEvent,
- (UINT8*)&HandoffTables
- );
- }
-
if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_SERVER) {
//
// Tcg Server spec.
Modified: trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf 2015-10-27 03:49:31 UTC
(rev 18676)
+++ trunk/edk2/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf 2015-10-27 03:54:08 UTC
(rev 18677)
@@ -61,10 +61,6 @@
Tcg2PhysicalPresenceLib
[Guids]
- ## SOMETIMES_CONSUMES ## SystemTable # Smbios Table
- ## SOMETIMES_CONSUMES ## GUID # Handoff Table for
measurement.
- gEfiSmbiosTableGuid
-
## SOMETIMES_CONSUMES ## Variable:L"SecureBoot"
## SOMETIMES_CONSUMES ## Variable:L"PK"
## SOMETIMES_CONSUMES ## Variable:L"KEK"
Modified: trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.c 2015-10-27 03:49:31 UTC (rev
18676)
+++ trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.c 2015-10-27 03:54:08 UTC (rev
18677)
@@ -23,11 +23,9 @@
#include <IndustryStandard/Tpm12.h>
#include <IndustryStandard/Acpi.h>
#include <IndustryStandard/PeImage.h>
-#include <IndustryStandard/SmBios.h>
#include <IndustryStandard/TcpaAcpi.h>
#include <Guid/GlobalVariable.h>
-#include <Guid/SmBios.h>
#include <Guid/HobList.h>
#include <Guid/TcgEventHob.h>
#include <Guid/EventGroup.h>
@@ -748,43 +746,14 @@
)
{
EFI_STATUS Status;
- SMBIOS_TABLE_ENTRY_POINT *SmbiosTable;
TCG_PCR_EVENT_HDR TcgEvent;
EFI_HANDOFF_TABLE_POINTERS HandoffTables;
UINTN ProcessorNum;
EFI_CPU_PHYSICAL_LOCATION *ProcessorLocBuf;
ProcessorLocBuf = NULL;
+ Status = EFI_SUCCESS;
- //
- // Measure SMBIOS with EV_EFI_HANDOFF_TABLES to PCR[1]
- //
- Status = EfiGetSystemConfigurationTable (
- &gEfiSmbiosTableGuid,
- (VOID **) &SmbiosTable
- );
-
- if (!EFI_ERROR (Status) && SmbiosTable != NULL) {
- TcgEvent.PCRIndex = 1;
- TcgEvent.EventType = EV_EFI_HANDOFF_TABLES;
- TcgEvent.EventSize = sizeof (HandoffTables);
-
- HandoffTables.NumberOfTables = 1;
- HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid;
- HandoffTables.TableEntry[0].VendorTable = SmbiosTable;
-
- DEBUG ((DEBUG_INFO, "The Smbios Table starts at: 0x%x\n",
SmbiosTable->TableAddress));
- DEBUG ((DEBUG_INFO, "The Smbios Table size: 0x%x\n",
SmbiosTable->TableLength));
-
- Status = TcgDxeHashLogExtendEventI (
- &mTcgDxeData,
- (UINT8*)(UINTN)SmbiosTable->TableAddress,
- SmbiosTable->TableLength,
- &TcgEvent,
- (UINT8*)&HandoffTables
- );
- }
-
if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_SERVER) {
//
// Tcg Server spec.
Modified: trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf 2015-10-27 03:49:31 UTC
(rev 18676)
+++ trunk/edk2/SecurityPkg/Tcg/TcgDxe/TcgDxe.inf 2015-10-27 03:54:08 UTC
(rev 18677)
@@ -54,10 +54,6 @@
ReportStatusCodeLib
[Guids]
- ## SOMETIMES_CONSUMES ## SystemTable # Smbios Table
- ## SOMETIMES_CONSUMES ## GUID # Handoff Table for
measurement.
- gEfiSmbiosTableGuid
-
gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ##
Variable:L"BootXXXX"
gTcgEventEntryHobGuid ## SOMETIMES_CONSUMES ##
HOB
gTpmErrorHobGuid ## SOMETIMES_CONSUMES ##
HOB
Modified: trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c 2015-10-27 03:49:31 UTC
(rev 18676)
+++ trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c 2015-10-27 03:54:08 UTC
(rev 18677)
@@ -15,11 +15,9 @@
#include <PiDxe.h>
#include <IndustryStandard/Acpi.h>
#include <IndustryStandard/PeImage.h>
-#include <IndustryStandard/SmBios.h>
#include <IndustryStandard/TcpaAcpi.h>
#include <Guid/GlobalVariable.h>
-#include <Guid/SmBios.h>
#include <Guid/HobList.h>
#include <Guid/TcgEventHob.h>
#include <Guid/EventGroup.h>
@@ -1046,43 +1044,14 @@
)
{
EFI_STATUS Status;
- SMBIOS_TABLE_ENTRY_POINT *SmbiosTable;
TCG_PCR_EVENT_HDR TcgEvent;
EFI_HANDOFF_TABLE_POINTERS HandoffTables;
UINTN ProcessorNum;
EFI_CPU_PHYSICAL_LOCATION *ProcessorLocBuf;
ProcessorLocBuf = NULL;
+ Status = EFI_SUCCESS;
- //
- // Measure SMBIOS with EV_EFI_HANDOFF_TABLES to PCR[1]
- //
- Status = EfiGetSystemConfigurationTable (
- &gEfiSmbiosTableGuid,
- (VOID **) &SmbiosTable
- );
-
- if (!EFI_ERROR (Status) && SmbiosTable != NULL) {
- TcgEvent.PCRIndex = 1;
- TcgEvent.EventType = EV_EFI_HANDOFF_TABLES;
- TcgEvent.EventSize = sizeof (HandoffTables);
-
- HandoffTables.NumberOfTables = 1;
- HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid;
- HandoffTables.TableEntry[0].VendorTable = SmbiosTable;
-
- DEBUG ((DEBUG_INFO, "The Smbios Table starts at: 0x%x\n",
SmbiosTable->TableAddress));
- DEBUG ((DEBUG_INFO, "The Smbios Table size: 0x%x\n",
SmbiosTable->TableLength));
-
- Status = TcgDxeHashLogExtendEvent (
- 0,
- (UINT8*)(UINTN)SmbiosTable->TableAddress,
- SmbiosTable->TableLength,
- &TcgEvent,
- (UINT8*)&HandoffTables
- );
- }
-
if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_SERVER) {
//
// Tcg Server spec.
Modified: trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.inf
===================================================================
--- trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.inf 2015-10-27 03:49:31 UTC
(rev 18676)
+++ trunk/edk2/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.inf 2015-10-27 03:54:08 UTC
(rev 18677)
@@ -60,10 +60,6 @@
ReportStatusCodeLib
[Guids]
- ## SOMETIMES_CONSUMES ## SystemTable # Smbios Table
- ## SOMETIMES_CONSUMES ## GUID # Handoff Table for
measurement.
- gEfiSmbiosTableGuid
-
## SOMETIMES_CONSUMES ## Variable:L"SecureBoot"
## SOMETIMES_CONSUMES ## Variable:L"PK"
## SOMETIMES_CONSUMES ## Variable:L"KEK"
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits