On 02/22/18 18:50, Ard Biesheuvel wrote:
> On 22 February 2018 at 17:46, Kinney, Michael D
> <michael.d.kin...@intel.com> wrote:
>> 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.
edk2-devel mailing list