From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.221.66, mailfrom: philmd@redhat.com) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Fri, 05 Apr 2019 02:05:15 -0700 Received: by mail-wr1-f66.google.com with SMTP id g3so7019772wrx.9 for ; Fri, 05 Apr 2019 02:05:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qEg69MPMBXW38lp8hvDKyuJhDQO6qzsDLAnMrdL7v90=; b=CfDv1yixw/Vf70+YT5Go2Cae1Z4d5fD0hNVibWdA8H7mfpBWj7vOQQKDbQT2+h50x+ GDJ5mc5iYJ1kaAHg+5bCmyjJmFgaBZp1pWfcRJDHvR6/WF6BU1lIlC41TL30v9teEAxk yhuKnyKueulnwGyIwGO0q6/uTOZL84CbmwBlFTPFrHo6gjv3LEWWKgEnIxSVCziu798k LIZEhlfBxmYnJXWKZ0dq1w3LvEB5VPNEMS9vMv4MBSUC3QXbcYh9oU4X9CDM6a2v05Cl /vJDO4iRYmSIxtJzv6+XK6RYRO3z6ghkc0rLhsc+AstLc7BjP9Jez7/s/6hdxhpYfC5T EvSQ== X-Gm-Message-State: APjAAAXRnNdgxJ65DN4PLQ6iPVFpa6RMO1S5eRh3bIXkrIsIPgH0orF/ cInd44efhKEhm4wksQaXkRDhT7aqorA= X-Google-Smtp-Source: APXvYqyzHyVl7TrQODMHTCzamNhpbHMzmQlHrz1PYWw2AJTez6dZDp+m8RBus2N+D/PX72uOBQ+3TA== X-Received: by 2002:a5d:474d:: with SMTP id o13mr7804064wrs.278.1554455113386; Fri, 05 Apr 2019 02:05:13 -0700 (PDT) Return-Path: Received: from [192.168.1.33] (193.red-88-21-103.staticip.rima-tde.net. [88.21.103.193]) by smtp.gmail.com with ESMTPSA id w16sm28367845wrt.84.2019.04.05.02.05.12 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2019 02:05:12 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH] IntelFrameworkModulePkg: Fix comments and improve E820 debug output To: rebecca@bluestop.org, Liming Gao References: <20190404175616.51393-1-rebecca@bluestop.org> Cc: devel@edk2.groups.io From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: Date: Fri, 5 Apr 2019 11:05:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190404175616.51393-1-rebecca@bluestop.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 4/4/19 7:56 PM, Rebecca Cran via Groups.Io wrote: > 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 Reviewed-by: Philippe Mathieu-Daude > --- > .../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 ( > > 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. Otherwize > + // EfiMemoryMapEnd which is dependent upon EfiMemoryMapSize. Otherwise > // we process bogus entries and create bogus E820 entries. > // > EfiMemoryMap = (EFI_MEMORY_DESCRIPTOR *) AllocatePool (EfiMemoryMapSize); > @@ -1801,7 +1801,7 @@ LegacyBiosBuildE820 ( > MemoryBlockLength = (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 = (UINTN) (Index * sizeof (EFI_E820_ENTRY64)); > > // > - // Determine OS usable memory above 1Mb > + // Determine OS usable memory above 1MB > // > Private->IntThunk->EfiToLegacy16BootTable.OsMemoryAbove1Mb = 0x0000; > for (TempIndex = Above1MIndex; TempIndex < Index; TempIndex++) { > @@ -1948,7 +1948,7 @@ LegacyBiosBuildE820 ( > // Print DEBUG information > // > for (TempIndex = 0; TempIndex < Index; TempIndex++) { > - DEBUG((EFI_D_INFO, "E820[%2d]: 0x%16lx ---- 0x%16lx, Type = 0x%x \n", > + DEBUG((EFI_D_INFO, "E820[%2d]: 0x%016lx - 0x%016lx, Type = %d\n", > TempIndex, > E820Table[TempIndex].BaseAddr, > (E820Table[TempIndex].BaseAddr + E820Table[TempIndex].Length), >