From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.3179.1587635051407180257 for ; Thu, 23 Apr 2020 02:44:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GM50+kVM; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587635050; 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=em8cT0Xei0K4kOAi1Mwe+lghPWRdSy6Smx0tTqj33JQ=; b=GM50+kVMbBCwhaykOYCD530oJHoaJpRXW12tqlcVS/qJvkg98ys+SbpaqeOIMypoIQtPqa XravIbktHBSBIMa07MEN0Rjqw6GJNYckqOGkMKK7KFSvpPrlPWbXIzVtFWIux/aK0ICF4e dS+GicBkTDjCWuARPh0dD4HIfoGHjOQ= 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-468---MtKVfvPmKfq2A-eL3hxA-1; Thu, 23 Apr 2020 05:44:08 -0400 X-MC-Unique: --MtKVfvPmKfq2A-eL3hxA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63906DB4A; Thu, 23 Apr 2020 09:44:07 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-95.ams2.redhat.com [10.36.114.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D4126084A; Thu, 23 Apr 2020 09:44:05 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 6/6] BhyvePkg: Add AcpiPlatformDxe To: devel@edk2.groups.io, rebecca@bsdio.com Cc: Jordan Justen , Ard Biesheuvel , Leif Lindholm , Michael Kinney , Andrew Fish , Peter Grehan References: <20200421030955.114850-1-rebecca@bsdio.com> <20200421030955.114850-7-rebecca@bsdio.com> From: "Laszlo Ersek" Message-ID: <41ac08af-1152-cb38-7a71-a2d569fa384b@redhat.com> Date: Thu, 23 Apr 2020 11:44:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200421030955.114850-7-rebecca@bsdio.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 04/21/20 05:09, Rebecca Cran wrote: > Make a copy of OvmfPkg/AcpiPlatformDxe under BhyvePkg, with the changes > needed to support the bhyve hypervisor. > > Signed-off-by: Rebecca Cran > --- > BhyvePkg/AcpiPlatformDxe/AcpiPlatform.c | 250 +++++++++++++++++++ > BhyvePkg/AcpiPlatformDxe/AcpiPlatform.h | 76 ++++++ > BhyvePkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 64 +++++ > BhyvePkg/AcpiPlatformDxe/Bhyve.c | 138 ++++++++++ > BhyvePkg/AcpiPlatformDxe/EntryPoint.c | 90 +++++++ > BhyvePkg/AcpiPlatformDxe/PciDecoding.c | 192 ++++++++++++++ > 6 files changed, 810 insertions(+) > create mode 100644 BhyvePkg/AcpiPlatformDxe/AcpiPlatform.c > create mode 100644 BhyvePkg/AcpiPlatformDxe/AcpiPlatform.h > create mode 100644 BhyvePkg/AcpiPlatformDxe/AcpiPlatformDxe.inf > create mode 100644 BhyvePkg/AcpiPlatformDxe/Bhyve.c > create mode 100644 BhyvePkg/AcpiPlatformDxe/EntryPoint.c > create mode 100644 BhyvePkg/AcpiPlatformDxe/PciDecoding.c > > diff --git a/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.c b/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.c > new file mode 100644 > index 0000000000..4814a9f1e6 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.c > @@ -0,0 +1,250 @@ > +/** @file > + OVMF ACPI Platform Driver > + > + Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ (1) Please add your (C) notice, with the year 2020. > diff --git a/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.h b/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.h > new file mode 100644 > index 0000000000..157ff42c07 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/AcpiPlatform.h > @@ -0,0 +1,76 @@ > +/** @file > + Sample ACPI Platform Driver > + > + Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ (2) Same as (1). > diff --git a/BhyvePkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/BhyvePkg/AcpiPlatformDxe/AcpiPlatformDxe.inf > new file mode 100644 > index 0000000000..6e931d85c0 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/AcpiPlatformDxe.inf > @@ -0,0 +1,64 @@ > +## @file > +# OVMF ACPI Platform Driver > +# > +# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause > +## (3) Same as (1). > diff --git a/BhyvePkg/AcpiPlatformDxe/Bhyve.c b/BhyvePkg/AcpiPlatformDxe/Bhyve.c > new file mode 100644 > index 0000000000..7f1a5fd664 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/Bhyve.c > @@ -0,0 +1,138 @@ > +/* > + * Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.
> + * Copyright (C) 2012, Red Hat, Inc. > + * Copyright (c) 2014, Pluribus Networks, Inc. > + * > + * This program and the accompanying materials are licensed and made > + * available under the terms and conditions of the BSD License which > + * accompanies this distribution. The full text of the license may be > + * found at http://opensource.org/licenses/bsd-license.php > + * > + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > + * BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > + * EXPRESS OR IMPLIED. > + */ (4) please use the SPDX ID format. > diff --git a/BhyvePkg/AcpiPlatformDxe/EntryPoint.c b/BhyvePkg/AcpiPlatformDxe/EntryPoint.c > new file mode 100644 > index 0000000000..f66f892911 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/EntryPoint.c > @@ -0,0 +1,90 @@ > +/** @file > + Entry point of OVMF ACPI Platform Driver > + > + Copyright (C) 2015, Red Hat, Inc. > + Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ (5) Same as (1). > diff --git a/BhyvePkg/AcpiPlatformDxe/PciDecoding.c b/BhyvePkg/AcpiPlatformDxe/PciDecoding.c > new file mode 100644 > index 0000000000..73894106c9 > --- /dev/null > +++ b/BhyvePkg/AcpiPlatformDxe/PciDecoding.c > @@ -0,0 +1,192 @@ > +/** @file > + Temporarily enable IO and MMIO decoding for all PCI devices while QEMU > + regenerates the ACPI tables. > + > + Copyright (C) 2016, Red Hat, Inc. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > +**/ (6) Same as (1). Thanks Laszlo