From nobody Mon Feb 9 06:49:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+82971+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82971+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1635772695; cv=none; d=zohomail.com; s=zohoarc; b=Hv3hkvEXJdiSS56Ld4qWO90ZVw1Op4X0ITeayAVesdoZuHomUtA90Gyi+Wbmjd5Jrhzv1OGv09K2/Utmv/1cSVOAhECZKiwcxekVyK2T5ZGNW7+OdmhlVUjoAw+j4D9oU9ITo5LeNYSbe/xIQlsgu6WdialQpgu9C/1hEXg1pPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635772695; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=xSwYmzl/2E4cJW5Bt9Vabs20lbG3kIMrP8EEQSxswAc=; b=kPlnr1eUW4KD+hOHXl9ZuafcJySRdng6Uga0r6NXILQejAOja69FFabzaLiAqD1o3T/phc45tC4f8NEm/VJqgHQwR/aistH/l/b/IIYI5kjH0PXpEJ8qmhUVzDN0gCUYUOAWZM3/Z8/u4Cv35R29Z0CmLdOtyVSakwCUYdP0Xr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+82971+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1635772695840934.5295948715756; Mon, 1 Nov 2021 06:18:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xoA6YY1788612xN2IegQrEB2; Mon, 01 Nov 2021 06:18:15 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.43666.1635772685932348170 for ; Mon, 01 Nov 2021 06:18:15 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="229737656" X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="229737656" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 06:18:14 -0700 X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="500035724" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.216]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 06:18:11 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann Subject: [edk2-devel] [PATCH V3 16/29] OvmfPkg: Add IntelTdx.h in OvmfPkg/Include/IndustryStandard Date: Mon, 1 Nov 2021 21:16:05 +0800 Message-Id: <37b92a132e9d26453f8f81ce662df7d74d53c18a.1635769996.git.min.m.xu@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: mfL1akNLuhxSvGc1bsSL3kiZx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1635772695; bh=kE0dYZzdr0QXla16Akd36W/QTplHQtOJClbPfkuUbcY=; h=Cc:Date:From:Reply-To:Subject:To; b=E4VgILC46NJMRZ6z2Sw4yp/EE5W4Sq/pYlkeRUgIKswwa/M62BAZly9kaDu5OUW2o8N G4oM2fwtrPaS62j6pDGi8tR/cUcQXsjxYIrtmrHtyjrTjCdpqY8690d615wrZrafYOrqc S2rU2TL5mibO7x2tuHuBPtQhoA3yKlqyp4k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1635772696554100002 Content-Type: text/plain; charset="utf-8" RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3429 IntelTdx.h defines the defitions used by TDX in OvmfPkg: - Mailbox related defitions,such as the data structure, command code, AP relocation defitions. - EFI_HOB_PLATFORM_INFO describes the TDX platform information Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Signed-off-by: Min Xu --- OvmfPkg/Include/IndustryStandard/IntelTdx.h | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/IntelTdx.h diff --git a/OvmfPkg/Include/IndustryStandard/IntelTdx.h b/OvmfPkg/Include/= IndustryStandard/IntelTdx.h new file mode 100644 index 000000000000..2370f18289a1 --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/IntelTdx.h @@ -0,0 +1,77 @@ +/** @file + TBD + + Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _OVMF_INTEL_TDX__H_ +#define _OVMF_INTEL_TDX__H_ + +#include +#include +#include +#include + +#define MP_CPU_PROTECTED_MODE_MAILBOX_APICID_INVALID 0xFFFFFFFF +#define MP_CPU_PROTECTED_MODE_MAILBOX_APICID_BROADCAST 0xFFFFFFFE + +typedef enum { + MpProtectedModeWakeupCommandNoop =3D 0, + MpProtectedModeWakeupCommandWakeup =3D 1, + MpProtectedModeWakeupCommandSleep =3D 2, + MpProtectedModeWakeupCommandAcceptPages =3D 3, +} MP_CPU_PROTECTED_MODE_WAKEUP_CMD; + +#pragma pack (1) + + // + // Describes the CPU MAILBOX control structure use to + // wakeup cpus spinning in long mode + // + typedef struct { + UINT16 Command; + UINT16 Resv; + UINT32 ApicId; + UINT64 WakeUpVector; + UINT8 ResvForOs[2032]; + // + // Arguments available for wakeup code + // + UINT64 WakeUpArgs1; + UINT64 WakeUpArgs2; + UINT64 WakeUpArgs3; + UINT64 WakeUpArgs4; + UINT8 Pad1[0xe0]; + UINT64 NumCpusArriving; + UINT8 Pad2[0xf8]; + UINT64 NumCpusExiting; + UINT32 Tallies[256]; + UINT8 Errors[256]; + UINT8 Pad3[0xf8]; + } MP_WAKEUP_MAILBOX; + + +// +// AP relocation code information including code address and size, +// this structure will be shared be C code and assembly code. +// It is natural aligned by design. +// +typedef struct { + UINT8 *RelocateApLoopFuncAddress; + UINTN RelocateApLoopFuncSize; +} MP_RELOCATION_MAP; + +typedef struct { + /// + EFI_HOB_GUID_TYPE GuidHeader; + UINT64 RelocatedMailBox; + UINT16 HostBridgePciDevId; + BOOLEAN SetNxForStack; + UINT8 SystemStates[6]; +} EFI_HOB_PLATFORM_INFO; + +#pragma pack() + +#endif --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#82971): https://edk2.groups.io/g/devel/message/82971 Mute This Topic: https://groups.io/mt/86739865/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-