diff mbox

[U-Boot,v2,02/13] x86: fsp: Report correct number of E820 table entries

Message ID 1443431530-472-3-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Sept. 28, 2015, 9:11 a.m. UTC
The logic to calculate the number of E820 table entries is wrong
when walking through the FSP HOB tables. Fix it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jian Luo <jian.luo4@boschrexroth.de>

---
Simon, I think we need get this fix in v2015.10 release.

Changes in v2: None

 arch/x86/lib/fsp/fsp_dram.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass Sept. 29, 2015, 4:52 a.m. UTC | #1
On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
> The logic to calculate the number of E820 table entries is wrong
> when walking through the FSP HOB tables. Fix it.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
>
> ---
> Simon, I think we need get this fix in v2015.10 release.
>
> Changes in v2: None
>
>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 18, 2015, 12:58 p.m. UTC | #2
Hi Tom,

On 28 September 2015 at 22:52, Simon Glass <sjg@chromium.org> wrote:
> On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
>> The logic to calculate the number of E820 table entries is wrong
>> when walking through the FSP HOB tables. Fix it.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
>>
>> ---
>> Simon, I think we need get this fix in v2015.10 release.
>>
>> Changes in v2: None
>>
>>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Are you able to pick this one up if it is not too late?

Regards,
Simon
Tom Rini Oct. 18, 2015, 3:55 p.m. UTC | #3
On Sun, Oct 18, 2015 at 06:58:51AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 28 September 2015 at 22:52, Simon Glass <sjg@chromium.org> wrote:
> > On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
> >> The logic to calculate the number of E820 table entries is wrong
> >> when walking through the FSP HOB tables. Fix it.
> >>
> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> >> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
> >>
> >> ---
> >> Simon, I think we need get this fix in v2015.10 release.
> >>
> >> Changes in v2: None
> >>
> >>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Acked-by: Simon Glass <sjg@chromium.org>
> 
> Are you able to pick this one up if it is not too late?

Is this the only x86 patch that should come in?
Simon Glass Oct. 18, 2015, 8:25 p.m. UTC | #4
Hi Tom,

On 18 October 2015 at 09:55, Tom Rini <trini@konsulko.com> wrote:
> On Sun, Oct 18, 2015 at 06:58:51AM -0600, Simon Glass wrote:
>> Hi Tom,
>>
>> On 28 September 2015 at 22:52, Simon Glass <sjg@chromium.org> wrote:
>> > On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >> The logic to calculate the number of E820 table entries is wrong
>> >> when walking through the FSP HOB tables. Fix it.
>> >>
>> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> >> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
>> >>
>> >> ---
>> >> Simon, I think we need get this fix in v2015.10 release.
>> >>
>> >> Changes in v2: None
>> >>
>> >>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
>> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > Acked-by: Simon Glass <sjg@chromium.org>
>>
>> Are you able to pick this one up if it is not too late?
>
> Is this the only x86 patch that should come in?

Yes, that's it.

Regards,
Simon
Tom Rini Oct. 19, 2015, 12:09 a.m. UTC | #5
On Sun, Oct 18, 2015 at 06:58:51AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 28 September 2015 at 22:52, Simon Glass <sjg@chromium.org> wrote:
> > On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
> >> The logic to calculate the number of E820 table entries is wrong
> >> when walking through the FSP HOB tables. Fix it.
> >>
> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> >> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
> >>
> >> ---
> >> Simon, I think we need get this fix in v2015.10 release.
> >>
> >> Changes in v2: None
> >>
> >>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Acked-by: Simon Glass <sjg@chromium.org>
> 
> Are you able to pick this one up if it is not too late?

...
$ git am -3 U-Boot-v2-02-13-x86-fsp-Report-correct-number-of-E820-table-entries.patch
Applying: x86: fsp: Report correct number of E820 table entries
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
$
Simon Glass Oct. 19, 2015, 2:28 a.m. UTC | #6
Hi Tom,

On 18 October 2015 at 18:09, Tom Rini <trini@konsulko.com> wrote:
> On Sun, Oct 18, 2015 at 06:58:51AM -0600, Simon Glass wrote:
>> Hi Tom,
>>
>> On 28 September 2015 at 22:52, Simon Glass <sjg@chromium.org> wrote:
>> > On 28 September 2015 at 03:11, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >> The logic to calculate the number of E820 table entries is wrong
>> >> when walking through the FSP HOB tables. Fix it.
>> >>
>> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> >> Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
>> >>
>> >> ---
>> >> Simon, I think we need get this fix in v2015.10 release.
>> >>
>> >> Changes in v2: None
>> >>
>> >>  arch/x86/lib/fsp/fsp_dram.c | 3 ++-
>> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > Acked-by: Simon Glass <sjg@chromium.org>
>>
>> Are you able to pick this one up if it is not too late?
>
> ...
> $ git am -3 U-Boot-v2-02-13-x86-fsp-Report-correct-number-of-E820-table-entries.patch
> Applying: x86: fsp: Report correct number of E820 table entries
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> No changes -- Patch already applied.
> $

Sorry, I must have applied it in a moment of delirium.

Regards,
Simon
diff mbox

Patch

diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 28552fa..e51ca96 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -72,9 +72,10 @@  unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
 				entries[num_entries].type = E820_RAM;
 			else if (res_desc->type == RES_MEM_RESERVED)
 				entries[num_entries].type = E820_RESERVED;
+
+			num_entries++;
 		}
 		hdr = get_next_hob(hdr);
-		num_entries++;
 	}
 
 	/* Mark PCIe ECAM address range as reserved */