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.web08.3790.1630673764037606876 for ; Fri, 03 Sep 2021 05:56:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYAccSr5; 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=1630673763; 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=ym902KKVxChrstw7uh8cOBsLww9HV2q0HJngruaPGcY=; b=VYAccSr5qehM/Bf58ksGo+CFYegT9ng9Gl05lsBFRueLPki2lQRZbeEfWwrItrORa9XHuU YPCNtSbFbif0dd5u9QxrcvI7JBlmcZPNdxF2ql+M6iNPh4AmVd0G9+670d7IsDz5OIEVKY 7ooGWEsMPnKc54PCdz01WsHsKUDPNFI= 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-171-6RVeRD9NMU-AIUPK8-vrXQ-1; Fri, 03 Sep 2021 08:56:02 -0400 X-MC-Unique: 6RVeRD9NMU-AIUPK8-vrXQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E998802947; Fri, 3 Sep 2021 12:56:01 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D632260C9D; Fri, 3 Sep 2021 12:56:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1CF781800997; Fri, 3 Sep 2021 14:55:33 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao Subject: [PATCH v2 13/19] OvmfPkg/Microvm: PlatformPei/Platform: add id. Date: Fri, 3 Sep 2021 14:55:26 +0200 Message-Id: <20210903125532.393574-14-kraxel@redhat.com> In-Reply-To: <20210903125532.393574-1-kraxel@redhat.com> References: <20210903125532.393574-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 | 6 ++++++ OvmfPkg/PlatformPei/Platform.c | 7 +++++++ 2 files changed, 13 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..ec1e1e0cab1d --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/Microvm.h @@ -0,0 +1,6 @@ +#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