SecurityPkg: Tcg2Smm: Update HID patch logic
Update HID patch logic. NOOP in ASL template may cause syntax error when disassembled and recompiled. Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
This commit is contained in:
parent
ab50ab6ea1
commit
9a9fa14e5c
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
|
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
|
||||||
|
|
||||||
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
|
||||||
@ -329,7 +329,6 @@ UpdateHID (
|
|||||||
// Initialize HID with Default PNP string
|
// Initialize HID with Default PNP string
|
||||||
//
|
//
|
||||||
ZeroMem(HID, TPM_HID_ACPI_SIZE);
|
ZeroMem(HID, TPM_HID_ACPI_SIZE);
|
||||||
CopyMem(HID, TPM_HID_TAG, TPM_HID_PNP_SIZE);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get Manufacturer ID
|
// Get Manufacturer ID
|
||||||
@ -389,10 +388,12 @@ UpdateHID (
|
|||||||
if (AsciiStrCmp((CHAR8 *)DataPtr, TPM_HID_TAG) == 0) {
|
if (AsciiStrCmp((CHAR8 *)DataPtr, TPM_HID_TAG) == 0) {
|
||||||
if (PnpHID) {
|
if (PnpHID) {
|
||||||
CopyMem(DataPtr, HID, TPM_HID_PNP_SIZE);
|
CopyMem(DataPtr, HID, TPM_HID_PNP_SIZE);
|
||||||
|
//
|
||||||
|
// if HID is PNP ID, patch the last byte in HID TAG to Noop
|
||||||
|
//
|
||||||
|
*(DataPtr + TPM_HID_PNP_SIZE) = AML_NOOP_OP;
|
||||||
} else {
|
} else {
|
||||||
//
|
|
||||||
// NOOP will be patched to '\0'
|
|
||||||
//
|
|
||||||
CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
|
CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE);
|
||||||
}
|
}
|
||||||
DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
|
DEBUG((EFI_D_INFO, "TPM2 ACPI _HID updated to %a\n", HID));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header file for Tcg2 SMM driver.
|
The header file for Tcg2 SMM driver.
|
||||||
|
|
||||||
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
|
||||||
@ -98,7 +98,7 @@ typedef struct {
|
|||||||
//
|
//
|
||||||
// PNP _HID for TPM2 device
|
// PNP _HID for TPM2 device
|
||||||
//
|
//
|
||||||
#define TPM_HID_TAG "NNN0000"
|
#define TPM_HID_TAG "NNNN0000"
|
||||||
#define TPM_HID_PNP_SIZE 8
|
#define TPM_HID_PNP_SIZE 8
|
||||||
#define TPM_HID_ACPI_SIZE 9
|
#define TPM_HID_ACPI_SIZE 9
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
The TPM2 definition block in ACPI table for TCG2 physical presence
|
The TPM2 definition block in ACPI table for TCG2 physical presence
|
||||||
and MemoryClear.
|
and MemoryClear.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
(c)Copyright 2016 HP Development Company, L.P.<BR>
|
(c)Copyright 2016 HP Development Company, L.P.<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
|
||||||
@ -30,11 +30,11 @@ DefinitionBlock (
|
|||||||
//
|
//
|
||||||
// TCG2
|
// TCG2
|
||||||
//
|
//
|
||||||
Name (_HID, "NNN0000")
|
|
||||||
//
|
//
|
||||||
// Reserve 1 more byte for ACPI HID
|
// TAG for patching TPM2.0 _HID
|
||||||
//
|
//
|
||||||
Noop
|
Name (_HID, "NNNN0000")
|
||||||
|
|
||||||
Name (_CID, "MSFT0101")
|
Name (_CID, "MSFT0101")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user