public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: sebastien.boeuf@intel.com
Cc: devel@edk2.groups.io, jiewen.yao@intel.com, jordan.l.justen@intel.com
Subject: Re: [PATCH v2 1/5] OvmfPkg: Handle Cloud Hypervisor host bridge
Date: Mon, 6 Dec 2021 09:12:40 +0100	[thread overview]
Message-ID: <20211206081240.olfmvrfvck3fnkkh@sirius.home.kraxel.org> (raw)
In-Reply-To: <2368c18ff5330c5ebab8ff0857823749299d8211.1638658097.git.sebastien.boeuf@intel.com>

  Hi,

>  STATIC UINT16 mAcpiPmBaseAddress;
> +STATIC UINT16 mAcpiHwReducedSleepCtl;
>  
>  EFI_STATUS
>  EFIAPI
> @@ -26,6 +27,7 @@ DxeResetInit (
>  {
>    UINT16 HostBridgeDevId;
>  
> +  mAcpiPmBaseAddress = 0;

Hmm?  mAcpiPmBaseAddress + mAcpiHwReducedSleepCtl should be treated
equal here (zero both or zero none).

I think explicitly zeroing is not needed, the variables should be in a
zero-initialized memory block.

> -  IoBitFieldWrite16 (mAcpiPmBaseAddress + 4, 10, 13, 0);
> -  IoOr16 (mAcpiPmBaseAddress + 4, BIT13);
> +  if (mAcpiPmBaseAddress == 0) {

if (mAcpiHwReducedSleepCtl)

> +    IoWrite8 (mAcpiHwReducedSleepCtl, 5 << 2 | 1 << 5);

take care,
  Gerd


  parent reply	other threads:[~2021-12-06  8:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 22:51 [PATCH v2 0/5] Add Cloud Hypervisor support for x86 sebastien.boeuf
2021-12-04 22:51 ` [PATCH v2 1/5] OvmfPkg: Handle Cloud Hypervisor host bridge sebastien.boeuf
2021-12-05  2:24   ` Yao, Jiewen
2021-12-06  8:12   ` Gerd Hoffmann [this message]
2021-12-04 22:51 ` [PATCH v2 2/5] OvmfPkg: Create global entry point for SMBIOS parsing sebastien.boeuf
2021-12-06  8:16   ` Gerd Hoffmann
2021-12-04 22:51 ` [PATCH v2 3/5] OvmfPkg: Retrieve SMBIOS from Cloud Hypervisor sebastien.boeuf
2021-12-06  8:16   ` Gerd Hoffmann
2021-12-04 22:51 ` [PATCH v2 4/5] OvmfPkg: Generalize AcpiPlatformDxe sebastien.boeuf
2021-12-04 22:52 ` [PATCH v2 5/5] OvmfPkg: Install ACPI tables for Cloud Hypervisor sebastien.boeuf
2021-12-06  8:17   ` [edk2-devel] " Gerd Hoffmann

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=20211206081240.olfmvrfvck3fnkkh@sirius.home.kraxel.org \
    --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