Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17992
-gerrit
commit 357fe7ee9a9a93d6e944e7ec552ea990817ccd3d
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 29 14:03:50 2016 -0700
amdmct: Rewrite mct_ResetDataStruct_D to avoid array-bounds warning
The code was intentionally using an offset past the end of the array to
get the value of the next byte when starting to clear the structure.
Rewrite it to get the end of the array and then increment the starting
value.
Fixes warning for GCC 6.2 toolchain update:
src/northbridge/amd/amdfam10/../amdmct/mct/mct_d.c:3628:27:
In function 'mct_ResetDataStruct_D':
error: index 2 denotes an offset greater than size of 'u8[2][4]
{aka unsigned char[2][4]}' [-Werror=array-bounds]
Change-Id: Ic81cf5e57992fc0e45f6c96b62a35742a8ef891f
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/northbridge/amd/amdmct/mct/mct_d.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/amd/amdmct/mct/mct_d.c b/src/northbridge/amd/amdmct/mct/mct_d.c
index 62fc626..a856599 100644
--- a/src/northbridge/amd/amdmct/mct/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct/mct_d.c
@@ -3625,9 +3625,9 @@ static void mct_ResetDataStruct_D(struct MCTStatStruc *pMCTstat,
p[i] = 0;
}
- start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[2][4]);
+ start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[1][3]);
stop = sizeof(struct DCTStatStruc);
- for (i = start; i < stop; i++) {
+ for (i = start + 1; i < stop; i++) {
p[i] = 0;
}
pDCTstat->HostBiosSrvc1 = host_serv1;
the following patch was just integrated into master:
commit 643236e193aa6a3a88903d7bdd2d13fe1ac0f675
Author: Martin Roth <martinroth(a)google.com>
Date: Sun Dec 18 11:02:56 2016 -0700
drivers/uart/oxpcie_early.c: remove uart_fill_lb()
uart_fill_lb() was added to drivers/uart/uart8250mem.c, so when the
Oxford OXPCIe952 Kconfig option is enabled, we were getting an error.
"multiple definition of `uart_fill_lb'"
The new version of uart_fill_lb sets the regwidth depending on the
Kconfig symbol DRIVERS_UART_8250MEM_32, so if that's selected, don't
give DRIVERS_UART_OXPCIE as a choice.
Change-Id: Ife24ab390553b10b2266809595c2e06463de708c
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/17966
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/17966 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17992
-gerrit
commit 0dcb86664c0190f8364e1a8d33d2e163cf7b76e5
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 29 14:03:50 2016 -0700
amdmct: Rewrite mct_ResetDataStruct_D to avoid array-bounds warning
The code was intentionally using an offset past the end of the array to
get the value of the next byte when starting to clear the structure.
Rewrite it to get the end of the array and then increment the starting
value.
Fixes warning for GCC 6.2 toolchain update:
src/northbridge/amd/amdfam10/../amdmct/mct/mct_d.c:3628:27:
In function 'mct_ResetDataStruct_D':
error: index 2 denotes an offset greater than size of 'u8[2][4]
{aka unsigned char[2][4]}' [-Werror=array-bounds]
Change-Id: Ic81cf5e57992fc0e45f6c96b62a35742a8ef891f
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/northbridge/amd/amdmct/mct/mct_d.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/northbridge/amd/amdmct/mct/mct_d.c b/src/northbridge/amd/amdmct/mct/mct_d.c
index 62fc626..a856599 100644
--- a/src/northbridge/amd/amdmct/mct/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct/mct_d.c
@@ -3625,9 +3625,9 @@ static void mct_ResetDataStruct_D(struct MCTStatStruc *pMCTstat,
p[i] = 0;
}
- start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[2][4]);
+ start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[1][3]);
stop = sizeof(struct DCTStatStruc);
- for (i = start; i < stop; i++) {
+ for (i = start + 1; i < stop; i++) {
p[i] = 0;
}
pDCTstat->HostBiosSrvc1 = host_serv1;