From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@bluestop.org header.s=mail header.b=jtpslkIl; spf=pass (domain: bluestop.org, ip: 65.103.231.193, mailfrom: rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [65.103.231.193]) by groups.io with SMTP; Thu, 04 Apr 2019 10:56:29 -0700 Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id C8FA0CCA31; Thu, 4 Apr 2019 11:57:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bluestop.org; s=mail; t=1554400631; bh=0NuGyvOrfcnqAfUAr0YO0tjBVMrdOmmQUBCUjuImKS0=; h=From:To:Cc:Subject:Date:From; b=jtpslkIlwh29GSQ+qmJkVa8y/mIcw3UFPr6//JHSLDni933Wywpo9TfTxy1e2HueX ud8jYyFaURbBdQNOMB9AZyXd4rbCue271DqPvh3mfLpRZEpjKHetoLyubk8vhrmU59 SnbRWiPSqoNRonZcAgV8l1m1WZbDgsbnNpm+AfnA= Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s7ZiKiPzBNt5; Thu, 4 Apr 2019 11:57:11 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [65.103.231.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Thu, 4 Apr 2019 11:57:11 -0600 (MDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Liming Gao Cc: Rebecca Cran Subject: [PATCH] IntelFrameworkModulePkg: Fix comments and improve E820 debug output Date: Thu, 4 Apr 2019 11:56:16 -0600 Message-Id: <20190404175616.51393-1-rebecca@bluestop.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Fix a few typos in LegacyBiosBuildE820, and improve the debug output of the E820 table to pad with zeros instead of spaces, remove extra hyphens and display the memory type in decimal. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Rebecca Cran --- .../Csm/LegacyBiosDxe/LegacyBootSupport.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.= c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c index a7b8e6a9a0..8c415cdfc6 100644 --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c @@ -1711,9 +1711,9 @@ LegacyBiosBuildE820 ( =20 do { // - // Use size returned back plus 1 descriptor for the AllocatePool. + // Use size returned for the AllocatePool. // We don't just multiply by 2 since the "for" loop below terminates= on - // EfiMemoryMapEnd which is dependent upon EfiMemoryMapSize. Otherwi= ze + // EfiMemoryMapEnd which is dependent upon EfiMemoryMapSize. Otherwi= se // we process bogus entries and create bogus E820 entries. // EfiMemoryMap =3D (EFI_MEMORY_DESCRIPTOR *) AllocatePool (EfiMemoryMa= pSize); @@ -1801,7 +1801,7 @@ LegacyBiosBuildE820 ( MemoryBlockLength =3D (UINT64) (LShiftU64 (EfiEntry->NumberOfPages, = 12)); if ((EfiEntry->PhysicalStart + MemoryBlockLength) < 0x100000) { // - // Skip the memory block is under 1MB + // Skip the memory block if under 1MB // } else { if (EfiEntry->PhysicalStart < 0x100000) { @@ -1926,7 +1926,7 @@ LegacyBiosBuildE820 ( *Size =3D (UINTN) (Index * sizeof (EFI_E820_ENTRY64)); =20 // - // Determine OS usable memory above 1Mb + // Determine OS usable memory above 1MB // Private->IntThunk->EfiToLegacy16BootTable.OsMemoryAbove1Mb =3D 0x0000; for (TempIndex =3D Above1MIndex; TempIndex < Index; TempIndex++) { @@ -1948,7 +1948,7 @@ LegacyBiosBuildE820 ( // Print DEBUG information // for (TempIndex =3D 0; TempIndex < Index; TempIndex++) { - DEBUG((EFI_D_INFO, "E820[%2d]: 0x%16lx ---- 0x%16lx, Type =3D 0x%x \= n", + DEBUG((EFI_D_INFO, "E820[%2d]: 0x%016lx - 0x%016lx, Type =3D %d\n", TempIndex, E820Table[TempIndex].BaseAddr, (E820Table[TempIndex].BaseAddr + E820Table[TempIndex].Length), --=20 2.21.0