From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web09.8813.1631091736549785144 for ; Wed, 08 Sep 2021 02:02:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CfvV29Pj; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631091735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6KtgVgyz0UX3Gk2dBJg7UN1fo0cnjQOA/bFGDDDsU8I=; b=CfvV29PjrgIq7Eb8FkgA585FwiwS34aRpd+Isouadz/eDeDh99xhjrp0tms8hdY+2EawH9 BNgH9ebH0iX9MYQ3qhYRPARXJwSq9u372n6isaDD0Dw3ImwaJtWFbI1JBCx9S5pckzT0y+ dgkn+K23ZG0Nc5iB/0rrA4Fqwdpugag= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-99-zenAsD5nOjyjdp29unZQ4g-1; Wed, 08 Sep 2021 05:02:14 -0400 X-MC-Unique: zenAsD5nOjyjdp29unZQ4g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E35941B18BC0; Wed, 8 Sep 2021 09:02:12 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2A6D1346F; Wed, 8 Sep 2021 09:02:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E719E1800939; Wed, 8 Sep 2021 11:01:19 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael D Kinney , Andrew Fish , Gerd Hoffmann , Jordan Justen , Leif Lindholm , Julien Grall , Anthony Perard , Ard Biesheuvel , Stefan Berger , Jiewen Yao Subject: [PATCH v3 13/19] OvmfPkg/Microvm: PlatformPei/Platform: add id. Date: Wed, 8 Sep 2021 11:01:13 +0200 Message-Id: <20210908090119.2378189-14-kraxel@redhat.com> In-Reply-To: <20210908090119.2378189-1-kraxel@redhat.com> References: <20210908090119.2378189-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Add + set microvm id for PcdOvmfHostBridgePciDevId. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599 Signed-off-by: Gerd Hoffmann Acked-by: Jiewen Yao --- OvmfPkg/Include/IndustryStandard/Microvm.h | 12 ++++++++++++ OvmfPkg/PlatformPei/Platform.c | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/Microvm.h diff --git a/OvmfPkg/Include/IndustryStandard/Microvm.h b/OvmfPkg/Include/IndustryStandard/Microvm.h new file mode 100644 index 000000000000..c56547c4f2a4 --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/Microvm.h @@ -0,0 +1,12 @@ +/** @file + Various defines for qemu microvm + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef __MICROVM_H__ +#define __MICROVM_H__ + +#define MICROVM_PSEUDO_DEVICE_ID 0xfff1 + +#endif // __MICROVM_H__ diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index d425a5c429c6..aeb39595aa28 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -364,6 +365,12 @@ MiscInitialization ( AcpiCtlReg = POWER_MGMT_REGISTER_Q35 (ICH9_ACPI_CNTL); AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN; break; + case 0xffff: /* microvm */ + DEBUG ((DEBUG_INFO, "%a: microvm\n", __FUNCTION__)); + PcdStatus = PcdSet16S (PcdOvmfHostBridgePciDevId, + MICROVM_PSEUDO_DEVICE_ID); + ASSERT_RETURN_ERROR (PcdStatus); + return; default: DEBUG ((DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", __FUNCTION__, mHostBridgeDevId)); -- 2.31.1