public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Corvin Köhne" <c.koehne@beckhoff.com>
To: <devel@edk2.groups.io>
Cc: ardb+tianocore@kernel.org, jiewen.yao@intel.com,
	jordan.l.justen@intel.com, kraxel@redhat.com, rebecca@bsdio.com,
	grehan@freebsd.org, "Corvin Köhne" <c.koehne@beckhoff.com>
Subject: [PATCH] OvmfPkg/BhyvePkg: add WorkAreaHeader PCD
Date: Wed, 15 Sep 2021 11:27:15 +0200	[thread overview]
Message-ID: <20210915092715.441-1-c.koehne@beckhoff.com> (raw)

SEC phase will throw an assertion in IsSevGuest if
PcdOvmfConfidentialComputingWorkAreaHeader doesn't match the
sizeof CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER.

Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
---
 OvmfPkg/Bhyve/BhyveDefines.fdf.inc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/OvmfPkg/Bhyve/BhyveDefines.fdf.inc b/OvmfPkg/Bhyve/BhyveDefines.fdf.inc
index 66e0e4d270..9f01ef797c 100644
--- a/OvmfPkg/Bhyve/BhyveDefines.fdf.inc
+++ b/OvmfPkg/Bhyve/BhyveDefines.fdf.inc
@@ -82,4 +82,10 @@ SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZ
 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)

+# The OVMF WorkArea contains a fixed size header followed by the actual data.
+# The size of header is accessed through a fixed PCD in the reset vector code.
+# The value need to be kept in sync with the any changes to the Confidential
+# Computing Work Area header defined in the Include/WorkArea.h
+SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader  = 4
+
 DEFINE MEMFD_BASE_ADDRESS = 0x800000
--
2.11.0

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075



             reply	other threads:[~2021-09-15  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  9:27 Corvin Köhne [this message]
2021-09-15 12:57 ` [PATCH] OvmfPkg/BhyvePkg: add WorkAreaHeader PCD Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210915092715.441-1-c.koehne@beckhoff.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox