aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vendorcode/amd/agesa/f10/Lib/amdlib.c6
-rw-r--r--src/vendorcode/amd/agesa/f12/Lib/amdlib.c6
-rw-r--r--src/vendorcode/amd/agesa/f14/Lib/amdlib.c6
-rw-r--r--src/vendorcode/amd/agesa/f15/Lib/amdlib.c6
-rw-r--r--src/vendorcode/amd/agesa/f15tn/Lib/amdlib.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/src/vendorcode/amd/agesa/f10/Lib/amdlib.c b/src/vendorcode/amd/agesa/f10/Lib/amdlib.c
index d88eee7a8e..83e6a009ab 100644
--- a/src/vendorcode/amd/agesa/f10/Lib/amdlib.c
+++ b/src/vendorcode/amd/agesa/f10/Lib/amdlib.c
@@ -344,11 +344,11 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
+ UINT8 Index;
for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
+ if (value & (1 << Index)) return Index;
}
- return (UINT8) Index;
+ return 0xFF;
}
VOID
LibAmdMsrRead (
diff --git a/src/vendorcode/amd/agesa/f12/Lib/amdlib.c b/src/vendorcode/amd/agesa/f12/Lib/amdlib.c
index cb8f695a89..f88eb984c9 100644
--- a/src/vendorcode/amd/agesa/f12/Lib/amdlib.c
+++ b/src/vendorcode/amd/agesa/f12/Lib/amdlib.c
@@ -348,11 +348,11 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
+ UINT8 Index;
for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
+ if (value & (1 << Index)) return Index;
}
- return (UINT8) Index;
+ return 0xFF;
}
VOID
LibAmdMsrRead (
diff --git a/src/vendorcode/amd/agesa/f14/Lib/amdlib.c b/src/vendorcode/amd/agesa/f14/Lib/amdlib.c
index 31b3f1ea69..c1fa494642 100644
--- a/src/vendorcode/amd/agesa/f14/Lib/amdlib.c
+++ b/src/vendorcode/amd/agesa/f14/Lib/amdlib.c
@@ -348,11 +348,11 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
+ UINT8 Index;
for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
+ if (value & (1 << Index)) return Index;
}
- return (UINT8) Index;
+ return 0xFF;
}
VOID
LibAmdMsrRead (
diff --git a/src/vendorcode/amd/agesa/f15/Lib/amdlib.c b/src/vendorcode/amd/agesa/f15/Lib/amdlib.c
index e51a971a79..1180ad29a6 100644
--- a/src/vendorcode/amd/agesa/f15/Lib/amdlib.c
+++ b/src/vendorcode/amd/agesa/f15/Lib/amdlib.c
@@ -348,11 +348,11 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
+ UINT8 Index;
for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
+ if (value & (1 << Index)) return Index;
}
- return (UINT8) Index;
+ return 0xFF;
}
UINT64
diff --git a/src/vendorcode/amd/agesa/f15tn/Lib/amdlib.c b/src/vendorcode/amd/agesa/f15tn/Lib/amdlib.c
index 55adc8a478..9646e6d3b9 100644
--- a/src/vendorcode/amd/agesa/f15tn/Lib/amdlib.c
+++ b/src/vendorcode/amd/agesa/f15tn/Lib/amdlib.c
@@ -359,11 +359,11 @@ LibAmdBitScanReverse (
IN UINT32 value
)
{
- UINTN Index;
+ UINT8 Index;
for (Index = 31; Index >= 0; Index--){
- if (value & (1 << Index)) break;
+ if (value & (1 << Index)) return Index;
}
- return (UINT8) Index;
+ return 0xFF;
}
VOID
LibAmdMsrRead (