[coreboot-gerrit] New patch to review for coreboot: AGESA vendorcode: Fix logic error

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Mon Apr 18 14:01:22 CEST 2016


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14394

-gerrit

commit 4e50bc607039751861e6355c63049a14bcd7dfdc
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Apr 18 14:36:40 2016 +0300

    AGESA vendorcode: Fix logic error
    
    We have not really hit this error, due the test on AGESA_UNSUPPORTED
    above.
    
    Change-Id: I6e7d136a1bb46138cc347225bc4c82cfeaff385d
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c   | 2 +-
 src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c   | 2 +-
 src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c   | 2 +-
 src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c   | 2 +-
 src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c | 2 +-
 src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c
index 0034064..364a46a 100644
--- a/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c
@@ -109,7 +109,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component
diff --git a/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c
index cbbd491..23c2a72 100644
--- a/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c
@@ -112,7 +112,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component
diff --git a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c
index d7c6f80..10ec224 100644
--- a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c
@@ -115,7 +115,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component
diff --git a/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c
index 4353c41..adb3ff5 100644
--- a/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c
@@ -113,7 +113,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component
diff --git a/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c
index 4188f1b..a45b69c 100644
--- a/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c
@@ -112,7 +112,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component
diff --git a/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c
index f41deda..d787dc0 100644
--- a/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c
+++ b/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c
@@ -112,7 +112,7 @@ AmdAgesaDispatcher (
 
   // 3. If not this image specific function, see if we can find alternative image instead
   if (Status == AGESA_UNSUPPORTED) {
-    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) || (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
+    if ((((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0xFFFFFFFF  ) && (((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr != 0)) {
       ImageStart = ((AMD_CONFIG_PARAMS *)ConfigPtr)->AltImageBasePtr;
       ImageEnd = ImageStart + 4;
       // Locate/test image base that matches this component



More information about the coreboot-gerrit mailing list