mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
MdeModulePkg SmbiosMeasurementDxe: Skip measurement for OEM type
The generic driver has no way to know whether an OEM type should be filtered or not. This patch is to update the code to skip measurement for OEM type and platform code can measure it by self if required. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
This commit is contained in:
parent
fbfe64203b
commit
7f2f96f1a8
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This driver measures SMBIOS table to TPM.
|
This driver measures SMBIOS table to TPM.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -277,10 +277,17 @@ FilterSmbiosEntry (
|
|||||||
DEBUG ((EFI_D_INFO, "Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
DEBUG ((EFI_D_INFO, "Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||||
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
||||||
|
|
||||||
|
//
|
||||||
|
// Skip measurement for OEM types.
|
||||||
|
//
|
||||||
|
if (((SMBIOS_STRUCTURE *)TableEntry)->Type >= SMBIOS_OEM_BEGIN) {
|
||||||
|
// zero all table fields, except header
|
||||||
|
ZeroMem ((UINT8 *)TableEntry + sizeof(SMBIOS_STRUCTURE), TableEntrySize - sizeof(SMBIOS_STRUCTURE));
|
||||||
|
} else {
|
||||||
FilterStruct = GetFilterStructByType (((SMBIOS_STRUCTURE *)TableEntry)->Type);
|
FilterStruct = GetFilterStructByType (((SMBIOS_STRUCTURE *)TableEntry)->Type);
|
||||||
if (FilterStruct != NULL) {
|
if (FilterStruct != NULL) {
|
||||||
if (FilterStruct->Filter == NULL || FilterStruct->FilterCount == 0) {
|
if (FilterStruct->Filter == NULL || FilterStruct->FilterCount == 0) {
|
||||||
// zero all table entries, except header
|
// zero all table fields, except header
|
||||||
ZeroMem ((UINT8 *)TableEntry + sizeof(SMBIOS_STRUCTURE), TableEntrySize - sizeof(SMBIOS_STRUCTURE));
|
ZeroMem ((UINT8 *)TableEntry + sizeof(SMBIOS_STRUCTURE), TableEntrySize - sizeof(SMBIOS_STRUCTURE));
|
||||||
} else {
|
} else {
|
||||||
Filter = FilterStruct->Filter;
|
Filter = FilterStruct->Filter;
|
||||||
@ -305,6 +312,7 @@ FilterSmbiosEntry (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "Filter Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
DEBUG ((EFI_D_INFO, "Filter Smbios Table (Type - %d):\n", ((SMBIOS_STRUCTURE *)TableEntry)->Type));
|
||||||
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
DEBUG_CODE (InternalDumpHex (TableEntry, TableEntrySize););
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
# such as clock registers, and system unique information, such as
|
# such as clock registers, and system unique information, such as
|
||||||
# asset numbers or serial numbers, MUST NOT be measured into PCR [1],
|
# asset numbers or serial numbers, MUST NOT be measured into PCR [1],
|
||||||
# or any other PCR.
|
# or any other PCR.
|
||||||
|
# The OEM types are skipped and platform code can measure them by self if required.
|
||||||
#
|
#
|
||||||
# A platform may use its own policy to filter some fields in SMBIOS table.
|
# A platform may use its own policy to filter some fields in SMBIOS table.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
Loading…
x
Reference in New Issue
Block a user