From: "Ni, Ray" <ray.ni@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Zeng, Star" <star.zeng@intel.com>
Cc: "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH V2] UefiCpuPkg PiSmmCpuDxeSmm: Reduce SMRAM consumption in CpuS3.c
Date: Thu, 7 Jan 2021 05:23:37 +0000 [thread overview]
Message-ID: <CO1PR11MB49307EB3A46609A205647E998CAF0@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a6aba141-7894-fe5d-2c15-6c77e2137316@redhat.com>
> This patch is a step in the right direction, but, IMO, it can be improved.
>
> The IsRegisterTableEmpty() function should also handle the case when the
> "RegisterTable" parameter is NULL. The function should then also return
> TRUE.
>
> And then, two more patches would be nice:
>
>
> (2) The register table allocation in
> "UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c" should be removed.
>
> Right now, the code there allocates memory just so it can set the
> "TableLength" and "AllocatedSize" fields to zero, for each "InitialApicId".
>
> It's a waste -- the memory is allocated only for ensuring that
> PiSmmCpuDxeSmm does not program any CPU registers during S3 resume.
>
> Setting "AcpiCpuData->RegisterTable" and
> "AcpiCpuData->PreSmmInitRegisterTable" should have the same effect.
Laszlo,
It's a good suggestion.
We also need to change CpuS3.c:SetRegister() to directly return
when mAcpiCpuData.[PreSmmInit]RegisterTable is NULL.
Considering the urgency of this patch (fix a system hang caused by smram shortage),
do you agree that we can first let this patch in?
Thanks,
Ray
next prev parent reply other threads:[~2021-01-07 5:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 6:48 [PATCH V2] UefiCpuPkg PiSmmCpuDxeSmm: Reduce SMRAM consumption in CpuS3.c Zeng, Star
2021-01-06 9:44 ` Ni, Ray
2021-01-06 17:56 ` [edk2-devel] " Laszlo Ersek
2021-01-06 18:46 ` Laszlo Ersek
2021-01-07 5:23 ` Ni, Ray [this message]
2021-01-07 10:09 ` Laszlo Ersek
2021-01-07 10:47 ` Zeng, Star
2021-01-07 11:00 ` Laszlo Ersek
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=CO1PR11MB49307EB3A46609A205647E998CAF0@CO1PR11MB4930.namprd11.prod.outlook.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