From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"afish@apple.com" <afish@apple.com>,
"Gao, Liming" <liming.gao@intel.com>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH edk2-platforms v2 1/2] MdePkg: introduce DxeRuntimeDebugLibSerialPort
Date: Thu, 22 Feb 2018 19:26:31 +0100 [thread overview]
Message-ID: <8890e4c2-f4a8-2c93-e9b9-ac86cffec36e@redhat.com> (raw)
In-Reply-To: <CAKv+Gu-Ws+8dAt_0kTGNU3dLmjEd69qQjZW9XgWPgxoeJv=JKA@mail.gmail.com>
On 02/22/18 18:50, Ard Biesheuvel wrote:
> On 22 February 2018 at 17:46, Kinney, Michael D
> <michael.d.kinney@intel.com> wrote:
>> Ard,
>>
>> The check for the runtime flag seems inconsistent.
>>
>> Since the issue being addressed is use of SerialPortLib,
>> can't the mEfiAtRuntime flag be use around SerialPortLib
>> calls only.
>>
>
> I take it you mean the checks around ASSERT()s? I agree that those are
> redundant, since the check will occur in the ASSERT() implementation
> as well.
>
> Will fix.
I noticed that as well, comparing the C file against its counterpart in
BaseDebugLibSerialPort. I thought it was harmless: DebugClearMemory()
should only be called via DEBUG_CLEAR_MEMORY(), and that only occurs
from MdeModulePkg/Core/Dxe/Mem, typically when memory (pool/pages) is
freed, or the memmap is changed similarly (IIUC when entries are
"converted"). None of those should happen at runtime; so I didn't think
we'd get a call to DebugClearMemory() with mEfiAtRuntime==TRUE.
Anyway I agree it's cleaner to fix that up.
Thanks
Laszlo
next prev parent reply other threads:[~2018-02-22 18:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 16:28 [PATCH edk2-platforms v2 0/2] Create UART DebugLib implementation for runtime drivers Ard Biesheuvel
2018-02-22 16:28 ` [PATCH edk2-platforms v2 1/2] MdePkg: introduce DxeRuntimeDebugLibSerialPort Ard Biesheuvel
2018-02-22 17:45 ` Ard Biesheuvel
2018-02-22 17:46 ` Kinney, Michael D
2018-02-22 17:50 ` Ard Biesheuvel
2018-02-22 18:26 ` Laszlo Ersek [this message]
2018-02-22 18:15 ` Laszlo Ersek
2018-02-22 16:28 ` [PATCH edk2-platforms v2 2/2] ArmVirtPkg: switch to DXE runtime version of DebugLib where appropriate Ard Biesheuvel
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=8890e4c2-f4a8-2c93-e9b9-ac86cffec36e@redhat.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