diff mbox series

[U-Boot,5/6] x86: efi: payload: Count in conventional memory above 4GB in DRAM bank

Message ID 1529656712-3660-6-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 598374729e6b3f3070e06bdf2990dd8d10cddbda
Delegated to: Bin Meng
Headers show
Series x86: efi: payload: Various fixes | expand

Commit Message

Bin Meng June 22, 2018, 8:38 a.m. UTC
At present in dram_init_banksize() it ignores conventional memory
below 4GB. This leads to wrong DRAM size is printed during boot.
Remove such limitation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/efi/payload.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Simon Glass June 22, 2018, 7:28 p.m. UTC | #1
On 22 June 2018 at 02:38, Bin Meng <bmeng.cn@gmail.com> wrote:
> At present in dram_init_banksize() it ignores conventional memory
> below 4GB. This leads to wrong DRAM size is printed during boot.
> Remove such limitation.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/efi/payload.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng June 24, 2018, 12:54 a.m. UTC | #2
On Sat, Jun 23, 2018 at 3:28 AM, Simon Glass <sjg@chromium.org> wrote:
> On 22 June 2018 at 02:38, Bin Meng <bmeng.cn@gmail.com> wrote:
>> At present in dram_init_banksize() it ignores conventional memory
>> below 4GB. This leads to wrong DRAM size is printed during boot.

This should be "above" 4GB.

>> Remove such limitation.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  arch/x86/cpu/efi/payload.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Fixed the commit message, and

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index e3f0f82..4649bfe 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -109,11 +109,10 @@  int dram_init_banksize(void)
 	     desc < end && num_banks < CONFIG_NR_DRAM_BANKS;
 	     desc = efi_get_next_mem_desc(map, desc)) {
 		/*
-		 * We only use conventional memory below 4GB, and ignore
+		 * We only use conventional memory and ignore
 		 * anything less than 1MB.
 		 */
 		if (desc->type != EFI_CONVENTIONAL_MEMORY ||
-		    desc->physical_start >= 1ULL << 32 ||
 		    (desc->num_pages << EFI_PAGE_SHIFT) < 1 << 20)
 			continue;
 		gd->bd->bi_dram[num_banks].start = desc->physical_start;