From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.54443.1685380014980465657 for ; Mon, 29 May 2023 10:06:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=l8hzbtvQ; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685380015; x=1716916015; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4enhHuzqRAxvr4yeMTIYPQvZ+oYSnav4WmZiFaeaVPo=; b=l8hzbtvQpk3nov+LCvmQQK5z946dwOYxJLSvvOPmEstwSaEydDbGZB4B xgXgrwT3sUFZSeS7CSlcEK9WWTr4MLPOGoY9+rITlXnBbahLlF4pmnrRa Kcvi+5o8xNmwBPFDKEYQQ7cn1SNlwDDM9nFEvYggpxs/zVreyVdEXPFt7 m+WMil0XZzNEZW+b7lXOzS/K5eIwa/yjatviT/dCGbW8ky3SSGn9WS49p O+cKJrQUSaiEWLhFlhBZYFtJhBqZp2to5jCYgfKfUQcgTpkR1NJZqhPZG i7AvU2V/x/i8HPWvKBCiMuk8bM8OFlVQj7JD1YlyHnhZT/qqi1gm9EWvt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="352246059" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="352246059" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 10:06:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="709350935" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="709350935" Received: from mdkinney-mobl.amr.corp.intel.com ([10.209.9.14]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 10:06:53 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Zhiguang Liu , Oliver Smith-Denny , Pedro Falcato , Aaron Pop Subject: [Patch 1/2] MdePkg/Include/IndustryStandard: Address C++ keyword collisions Date: Mon, 29 May 2023 10:06:48 -0700 Message-Id: <20230529170649.1506-2-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.40.1.windows.1 In-Reply-To: <20230529170649.1506-1-michael.d.kinney@intel.com> References: <20230529170649.1506-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Update Tpm12.h and Tpm20.h and not use c++ reserved keywords operator and xor in C structures to support use of these include files when building with a C++ compiler. * Change operator -> Operator * Change xor -> Xor NOTE: This is a non-backwards compatible change to Tpm12.h and Tmp20.h. And consumers of these include files that access the "operator" or "xor" fields must be updated. Cc: Liming Gao Cc: Zhiguang Liu Cc: Oliver Smith-Denny Cc: Pedro Falcato Cc: Aaron Pop Signed-off-by: Michael D Kinney --- MdePkg/Include/IndustryStandard/Tpm12.h | 4 ++-- MdePkg/Include/IndustryStandard/Tpm20.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h b/MdePkg/Include/IndustryStandard/Tpm12.h index 155dcc9f5f99..147c0863fffd 100644 --- a/MdePkg/Include/IndustryStandard/Tpm12.h +++ b/MdePkg/Include/IndustryStandard/Tpm12.h @@ -744,8 +744,8 @@ typedef struct tdTPM_PERMANENT_FLAGS { BOOLEAN TPMpost; BOOLEAN TPMpostLock; BOOLEAN FIPS; - BOOLEAN operator; - BOOLEAN enableRevokeEK; + BOOLEAN Operator; + BOOLEAN enableRevokeEK; BOOLEAN nvLocked; BOOLEAN readSRKPub; BOOLEAN tpmEstablished; diff --git a/MdePkg/Include/IndustryStandard/Tpm20.h b/MdePkg/Include/IndustryStandard/Tpm20.h index 4440f3769f26..c827af13efd0 100644 --- a/MdePkg/Include/IndustryStandard/Tpm20.h +++ b/MdePkg/Include/IndustryStandard/Tpm20.h @@ -1247,7 +1247,7 @@ typedef union { TPMI_AES_KEY_BITS aes; TPMI_SM4_KEY_BITS SM4; TPM_KEY_BITS sym; - TPMI_ALG_HASH xor; + TPMI_ALG_HASH Xor; } TPMU_SYM_KEY_BITS; // Table 123 - TPMU_SYM_MODE Union @@ -1320,7 +1320,7 @@ typedef struct { // Table 136 - TPMU_SCHEME_KEYEDHASH Union typedef union { TPMS_SCHEME_HMAC hmac; - TPMS_SCHEME_XOR xor; + TPMS_SCHEME_XOR Xor; } TPMU_SCHEME_KEYEDHASH; // Table 137 - TPMT_KEYEDHASH_SCHEME Structure -- 2.40.1.windows.1