summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/amd/inagua/BiosCallOuts.h1
-rw-r--r--src/mainboard/amd/parmer/BiosCallOuts.h1
-rw-r--r--src/mainboard/amd/thatcher/BiosCallOuts.h1
-rw-r--r--src/mainboard/asrock/e350m1/BiosCallOuts.c17
-rw-r--r--src/mainboard/asrock/e350m1/BiosCallOuts.h1
-rw-r--r--src/mainboard/supermicro/h8qgi/BiosCallOuts.c7
-rw-r--r--src/mainboard/supermicro/h8qgi/BiosCallOuts.h1
-rw-r--r--src/mainboard/supermicro/h8scm/BiosCallOuts.c7
-rw-r--r--src/mainboard/supermicro/h8scm/BiosCallOuts.h1
-rw-r--r--src/mainboard/tyan/s8226/BiosCallOuts.c7
-rw-r--r--src/mainboard/tyan/s8226/BiosCallOuts.h1
11 files changed, 21 insertions, 24 deletions
diff --git a/src/mainboard/amd/inagua/BiosCallOuts.h b/src/mainboard/amd/inagua/BiosCallOuts.h
index e713ac360d..66d3d15c12 100644
--- a/src/mainboard/amd/inagua/BiosCallOuts.h
+++ b/src/mainboard/amd/inagua/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x00010000
#define BIOS_HEAP_SIZE 0x20000 /* 64MB */
diff --git a/src/mainboard/amd/parmer/BiosCallOuts.h b/src/mainboard/amd/parmer/BiosCallOuts.h
index b7b9eaf2e3..b449c68198 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.h
+++ b/src/mainboard/amd/parmer/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x010000000
#define BIOS_HEAP_SIZE 0x30000
#define BSP_STACK_BASE_ADDR 0x30000
diff --git a/src/mainboard/amd/thatcher/BiosCallOuts.h b/src/mainboard/amd/thatcher/BiosCallOuts.h
index b7b9eaf2e3..b449c68198 100644
--- a/src/mainboard/amd/thatcher/BiosCallOuts.h
+++ b/src/mainboard/amd/thatcher/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x010000000
#define BIOS_HEAP_SIZE 0x30000
#define BSP_STACK_BASE_ADDR 0x30000
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.c b/src/mainboard/asrock/e350m1/BiosCallOuts.c
index a0d64a7247..2d6c9e0105 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.c
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.c
@@ -23,12 +23,7 @@
#include "heapManager.h"
#include "SB800.h"
-AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- UINTN i;
- AGESA_STATUS CalloutStatus;
-
-CONST BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
+CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER,
BiosAllocateBuffer
@@ -73,7 +68,13 @@ CONST BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
},
};
- for (i = 0; i < REQUIRED_CALLOUTS; i++)
+AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+{
+ UINTN i;
+ AGESA_STATUS CalloutStatus;
+ UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
+
+ for (i = 0; i < CallOutCount; i++)
{
if (BiosCallouts[i].CalloutName == Func)
{
@@ -81,7 +82,7 @@ CONST BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
}
}
- if(i >= REQUIRED_CALLOUTS)
+ if(i >= CallOutCount)
{
return AGESA_UNSUPPORTED;
}
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.h b/src/mainboard/asrock/e350m1/BiosCallOuts.h
index 4efe15fa4d..71d8fa436a 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.h
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x00010000
#define BIOS_HEAP_SIZE 0x20000 /* 64MB */
diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
index b7f0124034..7c9c7bd321 100644
--- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
@@ -24,7 +24,7 @@
#include "OptionsIds.h"
#include "heapManager.h"
-STATIC BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
+STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{
AGESA_ALLOCATE_BUFFER,
@@ -87,14 +87,15 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINTN i;
AGESA_STATUS CalloutStatus;
+ UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
- for (i = 0; i < REQUIRED_CALLOUTS; i++) {
+ for (i = 0; i < CallOutCount; i++) {
if (BiosCallouts[i].CalloutName == Func) {
break;
}
}
- if(i >= REQUIRED_CALLOUTS) {
+ if(i >= CallOutCount) {
return AGESA_UNSUPPORTED;
}
diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.h b/src/mainboard/supermicro/h8qgi/BiosCallOuts.h
index 24a05fb868..88eddc5f75 100644
--- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.h
+++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x00010000
#define BIOS_HEAP_SIZE 0x20000 /* 64MB */
diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.c b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
index b7f0124034..7c9c7bd321 100644
--- a/src/mainboard/supermicro/h8scm/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
@@ -24,7 +24,7 @@
#include "OptionsIds.h"
#include "heapManager.h"
-STATIC BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
+STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{
AGESA_ALLOCATE_BUFFER,
@@ -87,14 +87,15 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINTN i;
AGESA_STATUS CalloutStatus;
+ UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
- for (i = 0; i < REQUIRED_CALLOUTS; i++) {
+ for (i = 0; i < CallOutCount; i++) {
if (BiosCallouts[i].CalloutName == Func) {
break;
}
}
- if(i >= REQUIRED_CALLOUTS) {
+ if(i >= CallOutCount) {
return AGESA_UNSUPPORTED;
}
diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.h b/src/mainboard/supermicro/h8scm/BiosCallOuts.h
index c52417401e..834374881d 100644
--- a/src/mainboard/supermicro/h8scm/BiosCallOuts.h
+++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x00010000
#define BIOS_HEAP_SIZE 0x20000 /* 64MB */
diff --git a/src/mainboard/tyan/s8226/BiosCallOuts.c b/src/mainboard/tyan/s8226/BiosCallOuts.c
index b7f0124034..7c9c7bd321 100644
--- a/src/mainboard/tyan/s8226/BiosCallOuts.c
+++ b/src/mainboard/tyan/s8226/BiosCallOuts.c
@@ -24,7 +24,7 @@
#include "OptionsIds.h"
#include "heapManager.h"
-STATIC BIOS_CALLOUT_STRUCT BiosCallouts[REQUIRED_CALLOUTS] =
+STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{
AGESA_ALLOCATE_BUFFER,
@@ -87,14 +87,15 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINTN i;
AGESA_STATUS CalloutStatus;
+ UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
- for (i = 0; i < REQUIRED_CALLOUTS; i++) {
+ for (i = 0; i < CallOutCount; i++) {
if (BiosCallouts[i].CalloutName == Func) {
break;
}
}
- if(i >= REQUIRED_CALLOUTS) {
+ if(i >= CallOutCount) {
return AGESA_UNSUPPORTED;
}
diff --git a/src/mainboard/tyan/s8226/BiosCallOuts.h b/src/mainboard/tyan/s8226/BiosCallOuts.h
index 24a05fb868..88eddc5f75 100644
--- a/src/mainboard/tyan/s8226/BiosCallOuts.h
+++ b/src/mainboard/tyan/s8226/BiosCallOuts.h
@@ -23,7 +23,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define REQUIRED_CALLOUTS 12
#define BIOS_HEAP_START_ADDRESS 0x00010000
#define BIOS_HEAP_SIZE 0x20000 /* 64MB */