diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-26 14:30:39 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-27 17:35:39 +0000 |
commit | 8d29dd12580add6fc7e87c9e935165da50cfc67b (patch) | |
tree | 7192c03ff3f2dc9d6bc48916dcdbf6eb0afc7d04 /src | |
parent | a26dbbd9d066d4276b2d090654c73f7c589b3114 (diff) |
vendorcode/amd: Unify Porting.h across all targets
This requires to also unify the calling convention for
AGESA functions from
AGESA_STATUS (*agesa_func)(UINT32 Func, UINT32 Data, VOID *ConfigPtr)
to
AGESA_STATUS (*agesa_func)(UINT32 Func, UINTN Data, VOID *ConfigPtr)
On systems running 32bit x86 code this will not make a difference as
UINTN is uintptr_t which is 32bit on these machines.
Change-Id: I095ec2273c18a9fda11712654e290ebc41b27bd9
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src')
53 files changed, 113 insertions, 1274 deletions
diff --git a/src/cpu/amd/pi/heapmanager.c b/src/cpu/amd/pi/heapmanager.c index 7fc8fb8405..d610bc535e 100644 --- a/src/cpu/amd/pi/heapmanager.c +++ b/src/cpu/amd/pi/heapmanager.c @@ -62,7 +62,7 @@ static AGESA_STATUS alloc_cbmem(AGESA_BUFFER_PARAMS *AllocParams) { } #endif -AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT32 AvailableHeapSize; UINT8 *BiosHeapBaseAddr; @@ -197,7 +197,7 @@ AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT8 *BiosHeapBaseAddr; @@ -316,7 +316,7 @@ AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT32 AllocNodeOffset; UINT8 *BiosHeapBaseAddr; diff --git a/src/mainboard/amd/bettong/BiosCallOuts.c b/src/mainboard/amd/bettong/BiosCallOuts.c index e5eed05679..15c4b9f792 100644 --- a/src/mainboard/amd/bettong/BiosCallOuts.c +++ b/src/mainboard/amd/bettong/BiosCallOuts.c @@ -33,7 +33,7 @@ #include "northbridge/amd/pi/agesawrapper.h" #include <boardid.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); static AGESA_STATUS board_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = @@ -64,7 +64,7 @@ static const GPIO_CONTROL oem_bettong_gpio[] = { * Configure platform specific Hudson device, * such as Azalia, SATA, IMC etc. */ -AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = ConfigPtr; diff --git a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c index 63b14ac37c..b13119cdea 100644 --- a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c +++ b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c @@ -28,7 +28,7 @@ #include "hudson.h" #include <stdlib.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = { @@ -273,7 +273,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams) * Configure platform specific Hudson device, * such Azalia, SATA, IMC etc. */ -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = (AMD_CONFIG_PARAMS *)ConfigPtr; if (StdHeader->Func == AMD_INIT_RESET) { diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c index b82f61d50c..a90ad69833 100644 --- a/src/mainboard/amd/gardenia/BiosCallOuts.c +++ b/src/mainboard/amd/gardenia/BiosCallOuts.c @@ -29,7 +29,7 @@ #include <agesawrapper.h> static AGESA_STATUS Fch_Oem_config(UINT32 Func, - UINT32 FchData, VOID *ConfigPtr); + UINTN FchData, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer }, @@ -78,7 +78,7 @@ static const GPIO_CONTROL oem_gardenia_gpio[] = { * Configure platform specific Hudson device, * such as Azalia, SATA, IMC etc. */ -AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = ConfigPtr; diff --git a/src/mainboard/amd/lamar/BiosCallOuts.c b/src/mainboard/amd/lamar/BiosCallOuts.c index 25dff85c40..e69e3c8ec2 100644 --- a/src/mainboard/amd/lamar/BiosCallOuts.c +++ b/src/mainboard/amd/lamar/BiosCallOuts.c @@ -27,7 +27,7 @@ #include <stdlib.h> #include <device/azalia.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = { @@ -290,7 +290,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams) * Configure platform specific Hudson device, * such Azalia, SATA, IMC etc. */ -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = (AMD_CONFIG_PARAMS *)ConfigPtr; if (StdHeader->Func == AMD_INIT_RESET) { diff --git a/src/mainboard/amd/olivehillplus/BiosCallOuts.c b/src/mainboard/amd/olivehillplus/BiosCallOuts.c index e6ef0c5c9b..e6d7fed152 100644 --- a/src/mainboard/amd/olivehillplus/BiosCallOuts.c +++ b/src/mainboard/amd/olivehillplus/BiosCallOuts.c @@ -26,7 +26,7 @@ #include "hudson.h" #include <stdlib.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = { @@ -256,7 +256,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams) * Configure platform specific Hudson device, * such Azalia, SATA, IMC etc. */ -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = (AMD_CONFIG_PARAMS *)ConfigPtr; if (StdHeader->Func == AMD_INIT_RESET) { diff --git a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c index 9b241fcc31..cd7e7ce0df 100644 --- a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c +++ b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c @@ -27,7 +27,7 @@ #include <stdlib.h> #include <spd_bin.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = @@ -258,7 +258,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams) * Configure platform specific Hudson device, * such Azalia, SATA, IMC etc. */ -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = (AMD_CONFIG_PARAMS *)ConfigPtr; if (StdHeader->Func == AMD_INIT_RESET) { diff --git a/src/mainboard/pcengines/apu2/BiosCallOuts.c b/src/mainboard/pcengines/apu2/BiosCallOuts.c index ab9d521c05..c33f0856a5 100644 --- a/src/mainboard/pcengines/apu2/BiosCallOuts.c +++ b/src/mainboard/pcengines/apu2/BiosCallOuts.c @@ -29,7 +29,7 @@ #include "hudson.h" #include <stdlib.h> -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr); static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr); const BIOS_CALLOUT_STRUCT BiosCallouts[] = @@ -71,7 +71,7 @@ static void oem_fan_control(FCH_DATA_BLOCK *FchParams) * Configure platform specific Hudson device, * such Azalia, SATA, IMC etc. */ -static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) +static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = (AMD_CONFIG_PARAMS *)ConfigPtr; if (StdHeader->Func == AMD_INIT_RESET) { @@ -126,7 +126,7 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr) return AGESA_SUCCESS; } -static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINT32 Data, VOID *ConfigPtr) +static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status = AGESA_UNSUPPORTED; #ifdef __PRE_RAM__ diff --git a/src/northbridge/amd/agesa/agesawrapper.c b/src/northbridge/amd/agesa/agesawrapper.c index 7668a089a6..6533a1f03f 100644 --- a/src/northbridge/amd/agesa/agesawrapper.c +++ b/src/northbridge/amd/agesa/agesawrapper.c @@ -335,7 +335,7 @@ void *agesawrapper_getlateinitptr(int pick) #endif /* __PRE_RAM__ */ -AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, VOID * ConfigPtr) +AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, VOID * ConfigPtr) { AGESA_STATUS status; AP_EXE_PARAMS ApExeParams; diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h index aea24f1038..0e06917118 100644 --- a/src/northbridge/amd/agesa/agesawrapper.h +++ b/src/northbridge/amd/agesa/agesawrapper.h @@ -30,7 +30,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void); AGESA_STATUS agesawrapper_amdinitresume(void); AGESA_STATUS agesawrapper_amdS3Save(void); AGESA_STATUS agesawrapper_amds3laterestore(void); -AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINTN Data, VOID *ConfigPtr); AGESA_STATUS agesawrapper_fchs3earlyrestore(void); AGESA_STATUS agesawrapper_fchs3laterestore(void); diff --git a/src/northbridge/amd/agesa/common/common.c b/src/northbridge/amd/agesa/common/common.c index 8dd2ac0725..ce86b19344 100644 --- a/src/northbridge/amd/agesa/common/common.c +++ b/src/northbridge/amd/agesa/common/common.c @@ -19,7 +19,7 @@ #include <string.h> #include <cbfs.h> -AGESA_STATUS common_ReadCbfsSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS common_ReadCbfsSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr) { #ifdef __PRE_RAM__ AGESA_READ_SPD_PARAMS *info = ConfigPtr; diff --git a/src/northbridge/amd/agesa/common/common.h b/src/northbridge/amd/agesa/common/common.h index 67ba82b573..677c768212 100644 --- a/src/northbridge/amd/agesa/common/common.h +++ b/src/northbridge/amd/agesa/common/common.h @@ -25,6 +25,6 @@ struct multi_spd_info { }; AGESA_STATUS -common_ReadCbfsSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +common_ReadCbfsSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr); #endif diff --git a/src/northbridge/amd/agesa/dimmSpd.h b/src/northbridge/amd/agesa/dimmSpd.h index 8e49b7c316..aaa6aa3d78 100644 --- a/src/northbridge/amd/agesa/dimmSpd.h +++ b/src/northbridge/amd/agesa/dimmSpd.h @@ -17,7 +17,7 @@ #define _DIMMSPD_H_ AGESA_STATUS -AmdMemoryReadSPD (IN UINT32 Func, IN UINT32 Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); +AmdMemoryReadSPD (IN UINT32 Func, IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); int hudson_readSpd(int spdAddress, char *buf, size_t len); diff --git a/src/northbridge/amd/agesa/family12/dimmSpd.c b/src/northbridge/amd/agesa/family12/dimmSpd.c index 3fbc6df5db..4b229875c1 100644 --- a/src/northbridge/amd/agesa/family12/dimmSpd.c +++ b/src/northbridge/amd/agesa/family12/dimmSpd.c @@ -54,7 +54,7 @@ STATIC CONST DIMM_INFO_SMBUS SpdAddrLookup [] = AGESA_STATUS AmdMemoryReadSPD ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData ) { diff --git a/src/northbridge/amd/agesa/family14/dimmSpd.c b/src/northbridge/amd/agesa/family14/dimmSpd.c index d992414bb5..e2bd744781 100644 --- a/src/northbridge/amd/agesa/family14/dimmSpd.c +++ b/src/northbridge/amd/agesa/family14/dimmSpd.c @@ -30,7 +30,7 @@ * Gets the SMBus address for an SPD from the array in devicetree.cb * then read the SPD into the supplied buffer. */ -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { UINT8 spdAddress; diff --git a/src/northbridge/amd/agesa/family15/dimmSpd.c b/src/northbridge/amd/agesa/family15/dimmSpd.c index 3b1220201a..cbd00edaa3 100644 --- a/src/northbridge/amd/agesa/family15/dimmSpd.c +++ b/src/northbridge/amd/agesa/family15/dimmSpd.c @@ -30,7 +30,7 @@ * Gets the SMBus address for an SPD from the array in devicetree.cb * then read the SPD into the supplied buffer. */ -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { UINT8 spdAddress; diff --git a/src/northbridge/amd/agesa/family15rl/dimmSpd.c b/src/northbridge/amd/agesa/family15rl/dimmSpd.c index 7d0f2a1c9c..bbd370f1f8 100644 --- a/src/northbridge/amd/agesa/family15rl/dimmSpd.c +++ b/src/northbridge/amd/agesa/family15rl/dimmSpd.c @@ -30,7 +30,7 @@ * Gets the SMBus address for an SPD from the array in devicetree.cb * then read the SPD into the supplied buffer. */ -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { UINT8 spdAddress; diff --git a/src/northbridge/amd/agesa/family15tn/dimmSpd.c b/src/northbridge/amd/agesa/family15tn/dimmSpd.c index 6273843dbb..8a85eaa2e7 100644 --- a/src/northbridge/amd/agesa/family15tn/dimmSpd.c +++ b/src/northbridge/amd/agesa/family15tn/dimmSpd.c @@ -29,7 +29,7 @@ * Gets the SMBus address for an SPD from the array in devicetree.cb * then read the SPD into the supplied buffer. */ -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { UINT8 spdAddress; diff --git a/src/northbridge/amd/agesa/family16kb/dimmSpd.c b/src/northbridge/amd/agesa/family16kb/dimmSpd.c index a2319bc110..68492aad9c 100644 --- a/src/northbridge/amd/agesa/family16kb/dimmSpd.c +++ b/src/northbridge/amd/agesa/family16kb/dimmSpd.c @@ -29,7 +29,7 @@ * Gets the SMBus address for an SPD from the array in devicetree.cb * then read the SPD into the supplied buffer. */ -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { UINT8 spdAddress; diff --git a/src/northbridge/amd/pi/00630F01/dimmSpd.c b/src/northbridge/amd/pi/00630F01/dimmSpd.c index 31f6f59a70..563a78dcfb 100644 --- a/src/northbridge/amd/pi/00630F01/dimmSpd.c +++ b/src/northbridge/amd/pi/00630F01/dimmSpd.c @@ -26,7 +26,7 @@ #define DIMENSION(array)(sizeof(array)/ sizeof(array [0])) -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { int spdAddress; DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); diff --git a/src/northbridge/amd/pi/00660F01/dimmSpd.c b/src/northbridge/amd/pi/00660F01/dimmSpd.c index 6b773bc7fe..14d0f7bfbc 100644 --- a/src/northbridge/amd/pi/00660F01/dimmSpd.c +++ b/src/northbridge/amd/pi/00660F01/dimmSpd.c @@ -24,7 +24,7 @@ #include "chip.h" #include "northbridge/amd/pi/dimmSpd.h" -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { int spdAddress; DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); diff --git a/src/northbridge/amd/pi/00670F00/dimmSpd.c b/src/northbridge/amd/pi/00670F00/dimmSpd.c index 42512ce902..bb944f89e9 100644 --- a/src/northbridge/amd/pi/00670F00/dimmSpd.c +++ b/src/northbridge/amd/pi/00670F00/dimmSpd.c @@ -24,7 +24,7 @@ #include "chip.h" #include "northbridge/amd/pi/dimmSpd.h" -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { int spdAddress; DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); diff --git a/src/northbridge/amd/pi/00730F01/dimmSpd.c b/src/northbridge/amd/pi/00730F01/dimmSpd.c index 424bff16e2..bf51ad4c23 100644 --- a/src/northbridge/amd/pi/00730F01/dimmSpd.c +++ b/src/northbridge/amd/pi/00730F01/dimmSpd.c @@ -26,7 +26,7 @@ #define DIMENSION(array)(sizeof(array)/ sizeof(array [0])) -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { int spdAddress; DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); diff --git a/src/northbridge/amd/pi/BiosCallOuts.h b/src/northbridge/amd/pi/BiosCallOuts.h index b05d5077a5..754cc1faf9 100644 --- a/src/northbridge/amd/pi/BiosCallOuts.h +++ b/src/northbridge/amd/pi/BiosCallOuts.h @@ -39,21 +39,21 @@ UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader); void EmptyHeap(void); -AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt); +AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_Reset (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt); -AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr); typedef struct { UINT32 CalloutName; diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c index 050d683573..a1fbc1d96a 100644 --- a/src/northbridge/amd/pi/agesawrapper.c +++ b/src/northbridge/amd/pi/agesawrapper.c @@ -347,7 +347,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void) AGESA_STATUS agesawrapper_amdlaterunaptask ( UINT32 Func, - UINT32 Data, + UINTN Data, VOID *ConfigPtr ) { diff --git a/src/northbridge/amd/pi/agesawrapper.h b/src/northbridge/amd/pi/agesawrapper.h index 811d904f87..b8d1f4a3bd 100644 --- a/src/northbridge/amd/pi/agesawrapper.h +++ b/src/northbridge/amd/pi/agesawrapper.h @@ -45,7 +45,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void); AGESA_STATUS agesawrapper_amdinitmid(void); AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus); void *agesawrapper_getlateinitptr(int pick); -AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, void *ConfigPtr); +AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, void *ConfigPtr); AGESA_STATUS agesawrapper_amdS3Save(void); AGESA_STATUS agesawrapper_amdinitresume(void); AGESA_STATUS agesawrapper_amds3laterestore(void); diff --git a/src/northbridge/amd/pi/def_callouts.c b/src/northbridge/amd/pi/def_callouts.c index 6b8aaeea5b..cddf8d5a88 100644 --- a/src/northbridge/amd/pi/def_callouts.c +++ b/src/northbridge/amd/pi/def_callouts.c @@ -24,7 +24,7 @@ #include "BiosCallOuts.h" #include "dimmSpd.h" -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINTN i; @@ -38,17 +38,17 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return BiosCallouts[i].CalloutPtr (Func, Data, ConfigPtr); } -AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINTN Data, VOID *ConfigPtr) { return AGESA_UNSUPPORTED; } -AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINTN Data, VOID *ConfigPtr) { return AGESA_SUCCESS; } -AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINTN Data, VOID *ConfigPtr) { IDS_NV_ITEM *IdsPtr = ((IDS_CALLOUT_STRUCT *) ConfigPtr)->IdsNvPtr; if (Data == IDS_CALLOUT_INIT) @@ -56,7 +56,7 @@ AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_Reset (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status; UINT8 Value; @@ -92,7 +92,7 @@ AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status; @@ -100,7 +100,7 @@ AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt) +AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt) { GFX_VBIOS_IMAGE_INFO *pVbiosImageInfo = (GFX_VBIOS_IMAGE_INFO *)ConfigPrt; pVbiosImageInfo->ImagePtr = cbfs_boot_map_with_leak( @@ -110,7 +110,7 @@ AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt return (pVbiosImageInfo->ImagePtr ? AGESA_SUCCESS : AGESA_WARNING); } -AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status = AGESA_UNSUPPORTED; #ifdef __PRE_RAM__ @@ -119,7 +119,7 @@ AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status = AGESA_UNSUPPORTED; #ifdef __PRE_RAM__ diff --git a/src/northbridge/amd/pi/dimmSpd.h b/src/northbridge/amd/pi/dimmSpd.h index 8e49b7c316..aaa6aa3d78 100644 --- a/src/northbridge/amd/pi/dimmSpd.h +++ b/src/northbridge/amd/pi/dimmSpd.h @@ -17,7 +17,7 @@ #define _DIMMSPD_H_ AGESA_STATUS -AmdMemoryReadSPD (IN UINT32 Func, IN UINT32 Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); +AmdMemoryReadSPD (IN UINT32 Func, IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); int hudson_readSpd(int spdAddress, char *buf, size_t len); diff --git a/src/soc/amd/common/BiosCallOuts.h b/src/soc/amd/common/BiosCallOuts.h index ac953cac56..80350b21de 100644 --- a/src/soc/amd/common/BiosCallOuts.h +++ b/src/soc/amd/common/BiosCallOuts.h @@ -38,21 +38,21 @@ typedef struct _BIOS_BUFFER_NODE { UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader); void EmptyHeap(void); -AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt); +AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_Reset (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt); -AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr); typedef struct { UINT32 CalloutName; diff --git a/src/soc/amd/common/agesawrapper.c b/src/soc/amd/common/agesawrapper.c index b7c19cb72a..7735d24e94 100644 --- a/src/soc/amd/common/agesawrapper.c +++ b/src/soc/amd/common/agesawrapper.c @@ -337,7 +337,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void) AGESA_STATUS agesawrapper_amdlaterunaptask ( UINT32 Func, - UINT32 Data, + UINTN Data, VOID *ConfigPtr ) { diff --git a/src/soc/amd/common/agesawrapper.h b/src/soc/amd/common/agesawrapper.h index b7f60ad3f0..50429813a6 100644 --- a/src/soc/amd/common/agesawrapper.h +++ b/src/soc/amd/common/agesawrapper.h @@ -45,7 +45,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void); AGESA_STATUS agesawrapper_amdinitmid(void); AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus); void *agesawrapper_getlateinitptr(int pick); -AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINT32 Data, void *ConfigPtr); +AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, void *ConfigPtr); AGESA_STATUS agesawrapper_amdS3Save(void); AGESA_STATUS agesawrapper_amdinitresume(void); AGESA_STATUS agesawrapper_amds3laterestore(void); diff --git a/src/soc/amd/common/def_callouts.c b/src/soc/amd/common/def_callouts.c index 52b502c023..e696abb448 100644 --- a/src/soc/amd/common/def_callouts.c +++ b/src/soc/amd/common/def_callouts.c @@ -24,7 +24,7 @@ #include <BiosCallOuts.h> #include <dimmSpd.h> -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINTN i; @@ -38,17 +38,17 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return BiosCallouts[i].CalloutPtr (Func, Data, ConfigPtr); } -AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINTN Data, VOID *ConfigPtr) { return AGESA_UNSUPPORTED; } -AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINTN Data, VOID *ConfigPtr) { return AGESA_SUCCESS; } -AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINTN Data, VOID *ConfigPtr) { IDS_NV_ITEM *IdsPtr = ((IDS_CALLOUT_STRUCT *) ConfigPtr)->IdsNvPtr; if (Data == IDS_CALLOUT_INIT) @@ -56,7 +56,7 @@ AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_Reset (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status; UINT8 Value; @@ -92,7 +92,7 @@ AGESA_STATUS agesa_Reset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status; @@ -100,7 +100,7 @@ AGESA_STATUS agesa_RunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt) +AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt) { GFX_VBIOS_IMAGE_INFO *pVbiosImageInfo = (GFX_VBIOS_IMAGE_INFO *)ConfigPrt; pVbiosImageInfo->ImagePtr = cbfs_boot_map_with_leak( @@ -110,7 +110,7 @@ AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt return (pVbiosImageInfo->ImagePtr ? AGESA_SUCCESS : AGESA_WARNING); } -AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status = AGESA_UNSUPPORTED; #ifdef __PRE_RAM__ @@ -119,7 +119,7 @@ AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; } -AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status = AGESA_UNSUPPORTED; #ifdef __PRE_RAM__ diff --git a/src/soc/amd/common/dimmSpd.h b/src/soc/amd/common/dimmSpd.h index 1ad45469e2..4527ba93b7 100644 --- a/src/soc/amd/common/dimmSpd.h +++ b/src/soc/amd/common/dimmSpd.h @@ -17,7 +17,7 @@ #define _DIMMSPD_H_ AGESA_STATUS -AmdMemoryReadSPD (IN UINT32 Func, IN UINT32 Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); +AmdMemoryReadSPD (IN UINT32 Func, IN UINTN Data, IN OUT AGESA_READ_SPD_PARAMS *SpdData); int hudson_readSpd(int spdAddress, char *buf, size_t len); int smbus_readSpd(int spdAddress, char *buf, size_t len); diff --git a/src/soc/amd/common/heapmanager.c b/src/soc/amd/common/heapmanager.c index b733fe881e..3205a09974 100644 --- a/src/soc/amd/common/heapmanager.c +++ b/src/soc/amd/common/heapmanager.c @@ -36,7 +36,7 @@ void EmptyHeap(void) memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE); } -AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT32 AvailableHeapSize; UINT8 *BiosHeapBaseAddr; @@ -165,7 +165,7 @@ AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT8 *BiosHeapBaseAddr; @@ -284,7 +284,7 @@ AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; } -AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) { UINT32 AllocNodeOffset; UINT8 *BiosHeapBaseAddr; diff --git a/src/soc/amd/stoneyridge/dimmSpd.c b/src/soc/amd/stoneyridge/dimmSpd.c index 80fe12db0c..9772809293 100644 --- a/src/soc/amd/stoneyridge/dimmSpd.c +++ b/src/soc/amd/stoneyridge/dimmSpd.c @@ -24,7 +24,7 @@ #include "chip.h" #include <dimmSpd.h> -AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PARAMS *info) +AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info) { int spdAddress; DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); diff --git a/src/southbridge/amd/cimx/sb800/smbus_spd.c b/src/southbridge/amd/cimx/sb800/smbus_spd.c index d9dcb6c9a9..6d2a385f67 100644 --- a/src/southbridge/amd/cimx/sb800/smbus_spd.c +++ b/src/southbridge/amd/cimx/sb800/smbus_spd.c @@ -19,7 +19,7 @@ #include "OEM.h" /* SMBUS0_BASE_ADDRESS */ /* warning: Porting.h includes an open #pragma pack(1) */ -#include <vendorcode/amd/agesa/common/Porting.h> +#include <vendorcode/amd/include/Porting.h> #include "AGESA.h" #include "chip.h" #include "smbus_spd.h" diff --git a/src/vendorcode/amd/agesa/common/Porting.h b/src/vendorcode/amd/agesa/common/Porting.h deleted file mode 100644 index 79d5b67079..0000000000 --- a/src/vendorcode/amd/agesa/common/Porting.h +++ /dev/null @@ -1,286 +0,0 @@ -/* $NoKeywords:$ */ -/** - * @file - * - * Describes compiler dependencies - to support several compile time environments - * - * Contains compiler environment porting descriptions - * - * @xrefitem bom "File Content Label" "Release Content" - * @e project: AGESA - * @e sub-project: Includes - * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ - */ -/***************************************************************************** - * - * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Advanced Micro Devices, Inc. nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef _PORTING_H_ -#define _PORTING_H_ - -#if defined (_MSC_VER) - #include <intrin.h> - void _disable (void); - void _enable (void); - #pragma warning(disable: 4103 4001 4733) - #pragma intrinsic (_disable, _enable) - #pragma warning(push) - // ----------------------------------------------------------------------- - // Define a code_seg MACRO - // - #define MAKE_AS_A_STRING(arg) #arg - - #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) - - #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) - #define FUNC_ATTRIBUTE(arg) __declspec(arg) - //#include <intrin.h> // MS has built-in functions - - #if _MSC_VER < 900 - // ----------------------------------------------------------------------- - // Assume MSVC 1.52C (16-bit) - // - // NOTE: When using MSVC 1.52C use the following command line: - // - // CL.EXE /G3 /AL /O1i /Fa <FILENAME.C> - // - // This will produce 32-bit code in USE16 segment that is optimized for code - // size. - typedef void VOID; - - // Create the universal 32, 16, and 8-bit data types - typedef unsigned long UINTN; - typedef long INT32; - typedef unsigned long UINT32; - typedef int INT16; - typedef unsigned int UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - /// struct for 16-bit environment handling of 64-bit value - typedef struct _UINT64 { - IN OUT UINT32 lo; ///< lower 32-bits of 64-bit value - IN OUT UINT32 hi; ///< highest 32-bits of 64-bit value - } UINT64; - - // Create the Boolean type - #define TRUE 1 - #define FALSE 0 - typedef unsigned char BOOLEAN; - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV __pascal - #define ROMDATA __based( __segname( "_CODE" ) ) - #define _16BYTE_ALIGN __declspec(align(16)) - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma warning( disable : 4103 ) // Disable '#pragma pack' in .h warning - #pragma pack(1) - - // Disable WORD->BYTE automatic conversion warnings. Example: - // BYTE LocalByte; - // void MyFunc(BYTE val); - // - // MyFunc(LocalByte*2+1); // Warning, automatic conversion - // - // The problem is any time math is performed on a BYTE, it is converted to a - // WORD by MSVC 1.52c, and then when it is converted back to a BYTE, a warning - // is generated. Disable warning C4761 - #pragma warning( disable : 4761 ) - - #else - // ----------------------------------------------------------------------- - // Assume a 32-bit MSVC++ - // - // Disable the following warnings: - // 4100 - 'identifier' : unreferenced formal parameter - // 4276 - 'function' : no prototype provided; assumed no parameters - // 4214 - non standard extension used : bit field types other than int - // 4001 - nonstandard extension 'single line comment' was used - // 4142 - benign redefinition of type for following declaration - // - typedef char INT8 - #if defined (_M_IX86) - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __w64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #define _16BYTE_ALIGN __declspec(align(64)) - // 64 bit of compiler - #else - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306 4366) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __int64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #endif - #endif - // ----------------------------------------------------------------------- - // End of MS compiler versions - -#elif defined __GNUC__ - - #include <stdint.h> - #define IN - #define OUT - #define STATIC static - #define VOLATILE volatile - #define TRUE 1 - #define FALSE 0 -// #undef CONST - #define CONST const - #define ROMDATA - #define CALLCONV - #define _16BYTE_ALIGN __attribute__ ((aligned (16))) - - - // Create the universal 32, 16, and 8-bit data types - typedef unsigned char BOOLEAN; - typedef uintptr_t UINTN; - typedef int64_t INT64; - typedef uint64_t UINT64; - typedef int32_t INT32; - typedef uint32_t UINT32; - typedef int16_t INT16; - typedef uint16_t UINT16; - typedef int8_t INT8; - typedef uint8_t UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - typedef void VOID; - //typedef unsigned long size_t; - - //#include <intrin.h> // MingW-w64 library header -#pragma pack(1) - -#define CODE_GROUP(arg) -#define RDATA_GROUP(arg) - -#define FUNC_ATTRIBUTE(arg) __attribute__((arg)) -#define MAKE_AS_A_STRING(arg) #arg -#include <stddef.h> -#include <gcc-intrin.h> - -#include <assert.h> -#include <console/console.h> -#include <commonlib/loglevel.h> - -#ifndef NULL - #define NULL (void *)0 -#endif - -#else - // ----------------------------------------------------------------------- - // Unknown or unsupported compiler - // - #error "Unknown compiler in use" -#endif - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// - -//Support forward reference construct -#define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - -// The following are use in conformance to the UEFI style guide -#define IN -#define OUT - -#endif // _PORTING_H_ diff --git a/src/vendorcode/amd/agesa/f10/Dispatcher.h b/src/vendorcode/amd/agesa/f10/Dispatcher.h index f92e1ad452..5e03a30498 100644 --- a/src/vendorcode/amd/agesa/f10/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f10/Dispatcher.h @@ -46,6 +46,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c index 4fc75b7eb1..499e8e4e9c 100644 --- a/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f10/Legacy/Proc/Dispatcher.c @@ -117,7 +117,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/agesa/f12/Dispatcher.h b/src/vendorcode/amd/agesa/f12/Dispatcher.h index 689ffd14a0..baa69cde26 100644 --- a/src/vendorcode/amd/agesa/f12/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f12/Dispatcher.h @@ -46,6 +46,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c index f5cc0362db..b507570e48 100644 --- a/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f12/Legacy/Proc/Dispatcher.c @@ -120,7 +120,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/agesa/f14/Dispatcher.h b/src/vendorcode/amd/agesa/f14/Dispatcher.h index 55bb2b2de5..b4ebeaf62f 100644 --- a/src/vendorcode/amd/agesa/f14/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f14/Dispatcher.h @@ -49,6 +49,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c index ec95fa3cd2..ea9c6da4cc 100644 --- a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c @@ -123,7 +123,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/agesa/f15/Dispatcher.h b/src/vendorcode/amd/agesa/f15/Dispatcher.h index 1ee8569228..a17757b1cc 100644 --- a/src/vendorcode/amd/agesa/f15/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f15/Dispatcher.h @@ -45,6 +45,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c index 149f1fef20..7d570679f1 100644 --- a/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f15/Legacy/Proc/Dispatcher.c @@ -121,7 +121,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/agesa/f15tn/Dispatcher.h b/src/vendorcode/amd/agesa/f15tn/Dispatcher.h index 88758e98a9..3f98e8cc98 100644 --- a/src/vendorcode/amd/agesa/f15tn/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f15tn/Dispatcher.h @@ -46,6 +46,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c index 59209fe4e5..c33d09ce06 100644 --- a/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f15tn/Legacy/Proc/Dispatcher.c @@ -120,7 +120,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/agesa/f16kb/Dispatcher.h b/src/vendorcode/amd/agesa/f16kb/Dispatcher.h index eecdd0eebf..350e5f41e0 100644 --- a/src/vendorcode/amd/agesa/f16kb/Dispatcher.h +++ b/src/vendorcode/amd/agesa/f16kb/Dispatcher.h @@ -46,6 +46,6 @@ // AGESA function prototypes AGESA_STATUS CALLCONV AmdAgesaDispatcher ( IN OUT VOID *ConfigPtr ); -AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINT32 Data, IN OUT VOID *ConfigPtr ); +AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, IN UINTN Data, IN OUT VOID *ConfigPtr ); #endif // _DISPATCHER_H_ diff --git a/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c index 067fabd44a..a721c7fa94 100644 --- a/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f16kb/Legacy/Proc/Dispatcher.c @@ -120,7 +120,7 @@ AGESA_STATUS CALLCONV AmdAgesaCallout ( IN UINT32 Func, - IN UINT32 Data, + IN UINTN Data, IN OUT VOID *ConfigPtr ) { diff --git a/src/vendorcode/amd/pi/00730F01/Porting.h b/src/vendorcode/amd/include/Porting.h index e7cb89cda9..ee0f074d3a 100644 --- a/src/vendorcode/amd/pi/00730F01/Porting.h +++ b/src/vendorcode/amd/include/Porting.h @@ -232,13 +232,14 @@ #elif defined __GNUC__ + #include <stdint.h> + #define IN #define OUT #define STATIC static #define VOLATILE volatile #define TRUE 1 #define FALSE 0 -// #undef CONST #define CONST const #define ROMDATA #define CALLCONV @@ -248,28 +249,23 @@ #define _2BYTE_ALIGN __attribute__ ((aligned (2))) #define _1BYTE_ALIGN __attribute__ ((aligned (1))) + typedef uintptr_t UINTN; + typedef int64_t INT64; + typedef uint64_t UINT64; + typedef int32_t INT32; + typedef uint32_t UINT32; + typedef int16_t INT16; + typedef uint16_t UINT16; + typedef int8_t INT8; + typedef uint8_t UINT8; + typedef char CHAR8; + typedef unsigned short CHAR16; typedef unsigned char BOOLEAN; - typedef signed char INT8; - typedef signed short INT16; - typedef signed long INT32; - typedef signed long long INT64; - typedef char CHAR8; - typedef unsigned char UINT8; - typedef unsigned short UINT16; - typedef unsigned long UINT32; - typedef unsigned long UINTN; - typedef unsigned long long UINT64; typedef void VOID; - //typedef unsigned long size_t; - //typedef unsigned int uintptr_t; - //#include <intrin.h> // MingW-w64 library header #define CODE_GROUP(arg) #define RDATA_GROUP(arg) - //#include <intrin.h> // MingW-w64 library header - //#include <MyIntrinsics.h> // AGESA temp file for GCC until support is added to MinGW - #pragma pack(1) #define FUNC_ATTRIBUTE(arg) __attribute__((arg)) @@ -278,8 +274,8 @@ #include <gcc-intrin.h> #include <assert.h> -#include <console/console.h> -#include <commonlib/loglevel.h> +//#include <console/console.h> +//#include <commonlib/loglevel.h> #ifndef NULL #define NULL ((void *)0) diff --git a/src/vendorcode/amd/pi/00630F01/Porting.h b/src/vendorcode/amd/pi/00630F01/Porting.h deleted file mode 100644 index 10346aeefd..0000000000 --- a/src/vendorcode/amd/pi/00630F01/Porting.h +++ /dev/null @@ -1,299 +0,0 @@ -/* $NoKeywords:$ */ -/** - * @file - * - * Describes compiler dependencies - to support several compile time environments - * - * Contains compiler environment porting descriptions - * - * @xrefitem bom "File Content Label" "Release Content" - * @e project: AGESA - * @e sub-project: Includes - * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ - */ -/***************************************************************************** - * - * Copyright (c) 2008 - 2013, Advanced Micro Devices, Inc. - * 2013 - 2014, Sage Electronic Engineering, LLC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Advanced Micro Devices, Inc. nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef _PORTING_H_ -#define _PORTING_H_ - -#if defined (_MSC_VER) - #pragma warning(push) - #pragma warning(disable: 4103 4001 4733) - // ----------------------------------------------------------------------- - // Define a code_seg MACRO - // - #define MAKE_AS_A_STRING(arg) #arg - - #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) - - #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) - #define FUNC_ATTRIBUTE(arg) __declspec(arg) - //#include <intrin.h> // MS has built-in functions - - #if _MSC_VER < 900 - // ----------------------------------------------------------------------- - // Assume MSVC 1.52C (16-bit) - // - // NOTE: When using MSVC 1.52C use the following command line: - // - // CL.EXE /G3 /AL /O1i /Fa <FILENAME.C> - // - // This will produce 32-bit code in USE16 segment that is optimized for code - // size. - typedef void VOID; - - // Create the universal 32, 16, and 8-bit data types - typedef unsigned long UINTN; - typedef long INT32; - typedef unsigned long UINT32; - typedef int INT16; - typedef unsigned int UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - /// struct for 16-bit environment handling of 64-bit value - typedef struct _UINT64 { - IN OUT UINT32 lo; ///< lower 32-bits of 64-bit value - IN OUT UINT32 hi; ///< highest 32-bits of 64-bit value - } UINT64; - - // Create the Boolean type - #define TRUE 1 - #define FALSE 0 - typedef unsigned char BOOLEAN; - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV __pascal - #define ROMDATA __based( __segname( "_CODE" ) ) - #define _16BYTE_ALIGN __declspec(align(16)) - #define _8BYTE_ALIGN - #define _4BYTE_ALIGN - #define _2BYTE_ALIGN - #define _1BYTE_ALIGN - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma warning( disable : 4103 ) // Disable '#pragma pack' in .h warning - #pragma pack(1) - - // Disable WORD->BYTE automatic conversion warnings. Example: - // BYTE LocalByte; - // void MyFunc(BYTE val); - // - // MyFunc(LocalByte*2+1); // Warning, automatic conversion - // - // The problem is any time math is performed on a BYTE, it is converted to a - // WORD by MSVC 1.52c, and then when it is converted back to a BYTE, a warning - // is generated. Disable warning C4761 - #pragma warning( disable : 4761 ) - - #else - // ----------------------------------------------------------------------- - // Assume a 32-bit MSVC++ - // - // Disable the following warnings: - // 4100 - 'identifier' : unreferenced formal parameter - // 4276 - 'function' : no prototype provided; assumed no parameters - // 4214 - non standard extension used : bit field types other than int - // 4001 - nonstandard extension 'single line comment' was used - // 4142 - benign redefinition of type for following declaration - // - typedef char INT8 - #if defined (_M_IX86) - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __w64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #define _16BYTE_ALIGN __declspec(align(64)) - #define _8BYTE_ALIGN - #define _4BYTE_ALIGN - #define _2BYTE_ALIGN - #define _1BYTE_ALIGN - #if _MSC_VER >= 1400 - #define VA_ARGS_SUPPORTED - #endif - // 64 bit of compiler - #else - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306 4366) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __int64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - #define _8BYTE_ALIGN - #define _4BYTE_ALIGN - #define _2BYTE_ALIGN - #define _1BYTE_ALIGN - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #endif - #endif - // ----------------------------------------------------------------------- - // End of MS compiler versions - -#elif defined __GNUC__ - - #define IN - #define OUT - #define STATIC static - #define VOLATILE volatile - #define TRUE 1 - #define FALSE 0 -// #undef CONST - #define CONST const - #define ROMDATA - #define CALLCONV - #define _16BYTE_ALIGN __attribute__ ((aligned (16))) - #define _8BYTE_ALIGN __attribute__ ((aligned (8))) - #define _4BYTE_ALIGN __attribute__ ((aligned (4))) - #define _2BYTE_ALIGN __attribute__ ((aligned (2))) - #define _1BYTE_ALIGN __attribute__ ((aligned (1))) - - typedef unsigned char BOOLEAN; - typedef signed char INT8; - typedef signed short INT16; - typedef signed long INT32; - typedef signed long long INT64; - typedef char CHAR8; - typedef unsigned char UINT8; - typedef unsigned short UINT16; - typedef unsigned long UINT32; - typedef unsigned long UINTN; - typedef unsigned long long UINT64; - typedef void VOID; - //typedef unsigned long size_t; - //typedef unsigned int uintptr_t; - #define CODE_GROUP(arg) - #define RDATA_GROUP(arg) - - //#include <intrin.h> // MingW-w64 library header - //#include <MyIntrinsics.h> // AGESA temp file for GCC until support is added to MinGW - -#pragma pack(1) - -#define FUNC_ATTRIBUTE(arg) __attribute__((arg)) -#define MAKE_AS_A_STRING(arg) #arg -#include <stddef.h> -#include <gcc-intrin.h> - -#include <assert.h> -#include <console/console.h> -#include <commonlib/loglevel.h> - -#ifndef NULL - #define NULL ((void *)0) -#endif - -#else - // ----------------------------------------------------------------------- - // Unknown or unsupported compiler - // - #error "Unknown compiler in use" -#endif - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// - -//Support forward reference construct -#define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - -// The following are use in conformance to the UEFI style guide -#define IN -#define OUT - -#endif // _PORTING_H_ diff --git a/src/vendorcode/amd/pi/00660F01/Porting.h b/src/vendorcode/amd/pi/00660F01/Porting.h deleted file mode 100644 index ceae0c0e4e..0000000000 --- a/src/vendorcode/amd/pi/00660F01/Porting.h +++ /dev/null @@ -1,286 +0,0 @@ -/* $NoKeywords:$ */ -/** - * @file - * - * Describes compiler dependencies - to support several compile time environments - * - * Contains compiler environment porting descriptions - * - * @xrefitem bom "File Content Label" "Release Content" - * @e project: AGESA - * @e sub-project: Includes - * @e \$Revision: 309090 $ @e \$Date: 2014-12-09 12:28:05 -0600 (Tue, 09 Dec 2014) $ - */ -/***************************************************************************** - * - * Copyright 2008 - 2015 ADVANCED MICRO DEVICES, INC. All Rights Reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Advanced Micro Devices, Inc. nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef _PORTING_H_ -#define _PORTING_H_ - -#if defined (_MSC_VER) - #include <intrin.h> - void _disable (void); - void _enable (void); - #pragma warning(disable: 4103 4001 4733) - #pragma intrinsic (_disable, _enable) - #pragma warning(push) - // ----------------------------------------------------------------------- - // Define a code_seg MACRO - // - #define MAKE_AS_A_STRING(arg) #arg - - #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) - - #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) - #define FUNC_ATTRIBUTE(arg) __declspec(arg) - //#include <intrin.h> // MS has built-in functions - - #if _MSC_VER < 900 - // ----------------------------------------------------------------------- - // Assume MSVC 1.52C (16-bit) - // - // NOTE: When using MSVC 1.52C use the following command line: - // - // CL.EXE /G3 /AL /O1i /Fa <FILENAME.C> - // - // This will produce 32-bit code in USE16 segment that is optimized for code - // size. - typedef void VOID; - - // Create the universal 32, 16, and 8-bit data types - typedef unsigned long UINTN; - typedef long INT32; - typedef unsigned long UINT32; - typedef int INT16; - typedef unsigned int UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - /// struct for 16-bit environment handling of 64-bit value - typedef struct _UINT64 { - IN OUT UINT32 lo; ///< lower 32-bits of 64-bit value - IN OUT UINT32 hi; ///< highest 32-bits of 64-bit value - } UINT64; - - // Create the Boolean type - #define TRUE 1 - #define FALSE 0 - typedef unsigned char BOOLEAN; - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV __pascal - #define ROMDATA __based( __segname( "_CODE" ) ) - #define _16BYTE_ALIGN __declspec(align(16)) - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma warning( disable : 4103 ) // Disable '#pragma pack' in .h warning - #pragma pack(1) - - // Disable WORD->BYTE automatic conversion warnings. Example: - // BYTE LocalByte; - // void MyFunc(BYTE val); - // - // MyFunc(LocalByte*2+1); // Warning, automatic conversion - // - // The problem is any time math is performed on a BYTE, it is converted to a - // WORD by MSVC 1.52c, and then when it is converted back to a BYTE, a warning - // is generated. Disable warning C4761 - #pragma warning( disable : 4761 ) - - #else - // ----------------------------------------------------------------------- - // Assume a 32-bit MSVC++ - // - // Disable the following warnings: - // 4100 - 'identifier' : unreferenced formal parameter - // 4276 - 'function' : no prototype provided; assumed no parameters - // 4214 - non standard extension used : bit field types other than int - // 4001 - nonstandard extension 'single line comment' was used - // 4142 - benign redefinition of type for following declaration - // - typedef char INT8 - #if defined (_M_IX86) - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __w64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #define _16BYTE_ALIGN __declspec(align(64)) - // 64 bit of compiler - #else - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306 4366) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __int64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #endif - #endif - // ----------------------------------------------------------------------- - // End of MS compiler versions - -#elif defined __GNUC__ - - #define IN - #define OUT - #define STATIC static - #define VOLATILE volatile - #define TRUE 1 - #define FALSE 0 -// #undef CONST - #define CONST const - #define ROMDATA - #define CALLCONV - #define _16BYTE_ALIGN __attribute__ ((aligned (16))) - #define _8BYTE_ALIGN __attribute__ ((aligned (8))) - #define _4BYTE_ALIGN __attribute__ ((aligned (4))) - #define _2BYTE_ALIGN __attribute__ ((aligned (2))) - #define _1BYTE_ALIGN __attribute__ ((aligned (1))) - - typedef unsigned char BOOLEAN; - typedef signed char INT8; - typedef signed short INT16; - typedef signed long INT32; - typedef char CHAR8; - typedef unsigned char UINT8; - typedef unsigned short UINT16; - typedef unsigned long UINT32; - typedef unsigned long UINTN; - typedef unsigned long long UINT64; - typedef long long INT64; - typedef void VOID; - //typedef unsigned long size_t; - - //#include <intrin.h> // MingW-w64 library header -#pragma pack(1) - -#define CODE_GROUP(arg) -#define RDATA_GROUP(arg) - -#define FUNC_ATTRIBUTE(arg) __attribute__((arg)) -#define MAKE_AS_A_STRING(arg) #arg -#include <stddef.h> -#include <gcc-intrin.h> - -#include <assert.h> -#include <console/console.h> -#include <commonlib/loglevel.h> - -#ifndef NULL - #define NULL (void *)0 -#endif - -#else - // ----------------------------------------------------------------------- - // Unknown or unsupported compiler - // - #error "Unknown compiler in use" -#endif - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// - -//Support forward reference construct -#define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - -// The following are use in conformance to the UEFI style guide -#define IN -#define OUT - -#endif // _PORTING_H_ diff --git a/src/vendorcode/amd/pi/00670F00/Porting.h b/src/vendorcode/amd/pi/00670F00/Porting.h deleted file mode 100644 index ceae0c0e4e..0000000000 --- a/src/vendorcode/amd/pi/00670F00/Porting.h +++ /dev/null @@ -1,286 +0,0 @@ -/* $NoKeywords:$ */ -/** - * @file - * - * Describes compiler dependencies - to support several compile time environments - * - * Contains compiler environment porting descriptions - * - * @xrefitem bom "File Content Label" "Release Content" - * @e project: AGESA - * @e sub-project: Includes - * @e \$Revision: 309090 $ @e \$Date: 2014-12-09 12:28:05 -0600 (Tue, 09 Dec 2014) $ - */ -/***************************************************************************** - * - * Copyright 2008 - 2015 ADVANCED MICRO DEVICES, INC. All Rights Reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Advanced Micro Devices, Inc. nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ***************************************************************************/ - -#ifndef _PORTING_H_ -#define _PORTING_H_ - -#if defined (_MSC_VER) - #include <intrin.h> - void _disable (void); - void _enable (void); - #pragma warning(disable: 4103 4001 4733) - #pragma intrinsic (_disable, _enable) - #pragma warning(push) - // ----------------------------------------------------------------------- - // Define a code_seg MACRO - // - #define MAKE_AS_A_STRING(arg) #arg - - #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) - - #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) - #define FUNC_ATTRIBUTE(arg) __declspec(arg) - //#include <intrin.h> // MS has built-in functions - - #if _MSC_VER < 900 - // ----------------------------------------------------------------------- - // Assume MSVC 1.52C (16-bit) - // - // NOTE: When using MSVC 1.52C use the following command line: - // - // CL.EXE /G3 /AL /O1i /Fa <FILENAME.C> - // - // This will produce 32-bit code in USE16 segment that is optimized for code - // size. - typedef void VOID; - - // Create the universal 32, 16, and 8-bit data types - typedef unsigned long UINTN; - typedef long INT32; - typedef unsigned long UINT32; - typedef int INT16; - typedef unsigned int UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - /// struct for 16-bit environment handling of 64-bit value - typedef struct _UINT64 { - IN OUT UINT32 lo; ///< lower 32-bits of 64-bit value - IN OUT UINT32 hi; ///< highest 32-bits of 64-bit value - } UINT64; - - // Create the Boolean type - #define TRUE 1 - #define FALSE 0 - typedef unsigned char BOOLEAN; - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV __pascal - #define ROMDATA __based( __segname( "_CODE" ) ) - #define _16BYTE_ALIGN __declspec(align(16)) - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma warning( disable : 4103 ) // Disable '#pragma pack' in .h warning - #pragma pack(1) - - // Disable WORD->BYTE automatic conversion warnings. Example: - // BYTE LocalByte; - // void MyFunc(BYTE val); - // - // MyFunc(LocalByte*2+1); // Warning, automatic conversion - // - // The problem is any time math is performed on a BYTE, it is converted to a - // WORD by MSVC 1.52c, and then when it is converted back to a BYTE, a warning - // is generated. Disable warning C4761 - #pragma warning( disable : 4761 ) - - #else - // ----------------------------------------------------------------------- - // Assume a 32-bit MSVC++ - // - // Disable the following warnings: - // 4100 - 'identifier' : unreferenced formal parameter - // 4276 - 'function' : no prototype provided; assumed no parameters - // 4214 - non standard extension used : bit field types other than int - // 4001 - nonstandard extension 'single line comment' was used - // 4142 - benign redefinition of type for following declaration - // - typedef char INT8 - #if defined (_M_IX86) - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __w64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #define _16BYTE_ALIGN __declspec(align(64)) - // 64 bit of compiler - #else - #pragma warning (disable: 4100 4276 4214 4001 4142 4305 4306 4366) - - #ifndef VOID - typedef void VOID; - #endif - // Create the universal 32, 16, and 8-bit data types - #ifndef UINTN - typedef unsigned __int64 UINTN; - #endif - typedef __int64 INT64; - typedef unsigned __int64 UINT64; - typedef int INT32; - typedef unsigned int UINT32; - typedef short INT16; - typedef unsigned short UINT16; - typedef char INT8; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef unsigned short CHAR16; - - // Create the Boolean type - #ifndef TRUE - #define TRUE 1 - #endif - #ifndef FALSE - #define FALSE 0 - #endif - typedef unsigned char BOOLEAN; - - // Force tight packing of structures - // Note: Entire AGESA (Project / Solution) will be using pragma pack 1 - #pragma pack(1) - - #define CONST const - #define STATIC static - #define VOLATILE volatile - #define CALLCONV - #define ROMDATA - #endif - #endif - // ----------------------------------------------------------------------- - // End of MS compiler versions - -#elif defined __GNUC__ - - #define IN - #define OUT - #define STATIC static - #define VOLATILE volatile - #define TRUE 1 - #define FALSE 0 -// #undef CONST - #define CONST const - #define ROMDATA - #define CALLCONV - #define _16BYTE_ALIGN __attribute__ ((aligned (16))) - #define _8BYTE_ALIGN __attribute__ ((aligned (8))) - #define _4BYTE_ALIGN __attribute__ ((aligned (4))) - #define _2BYTE_ALIGN __attribute__ ((aligned (2))) - #define _1BYTE_ALIGN __attribute__ ((aligned (1))) - - typedef unsigned char BOOLEAN; - typedef signed char INT8; - typedef signed short INT16; - typedef signed long INT32; - typedef char CHAR8; - typedef unsigned char UINT8; - typedef unsigned short UINT16; - typedef unsigned long UINT32; - typedef unsigned long UINTN; - typedef unsigned long long UINT64; - typedef long long INT64; - typedef void VOID; - //typedef unsigned long size_t; - - //#include <intrin.h> // MingW-w64 library header -#pragma pack(1) - -#define CODE_GROUP(arg) -#define RDATA_GROUP(arg) - -#define FUNC_ATTRIBUTE(arg) __attribute__((arg)) -#define MAKE_AS_A_STRING(arg) #arg -#include <stddef.h> -#include <gcc-intrin.h> - -#include <assert.h> -#include <console/console.h> -#include <commonlib/loglevel.h> - -#ifndef NULL - #define NULL (void *)0 -#endif - -#else - // ----------------------------------------------------------------------- - // Unknown or unsupported compiler - // - #error "Unknown compiler in use" -#endif - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// - -//Support forward reference construct -#define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - -// The following are use in conformance to the UEFI style guide -#define IN -#define OUT - -#endif // _PORTING_H_ |