vendorcode/amd/agesa/fam15tn: Clean #includes in public headers

Right now, coreboot code using AGESA headers can only build if all the
AGESA path are given to the compiler via the "-I" option. This is sub-
optimal, as it requires us to have every AGESA source directory
specified as a compiler include path. This pollutes our global include
paths.

We restrict the compiler include paths to only allow "AGESA_ROOT/" and
"AGESA_ROOT/Include". We then modify the AGESA headers to specify
non-local include files relative to "AGESA_ROOT/Include".

We use the convention that includes relative to the directory of the
header are included as "path/to/header.h", while includes relative to
AGESA_ROOT are included as <path/to/header.h>.

This change allows building coreboot code based on AGESA with the
limited subset of include paths, but does not allow AGESA itself to
build with this restricted subset.

Change-Id: I31102273c8caa8d6b1d80774bfd35711825bec03
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/5424
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Alexandru Gagniuc 2014-03-29 16:52:46 -05:00
parent c5c21d3fe1
commit 986349df64
29 changed files with 52 additions and 52 deletions

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_APM_INSTALL_H_
#define _OPTION_APM_INSTALL_H_
#include "cpuApm.h"
#include <Proc/CPU/Feature/cpuApm.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_C6_STATE_INSTALL_H_
#define _OPTION_C6_STATE_INSTALL_H_
#include "cpuC6State.h"
#include <Proc/CPU/Feature/cpuC6State.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_CPB_INSTALL_H_
#define _OPTION_CPB_INSTALL_H_
#include "cpuCpb.h"
#include <Proc/CPU/Feature/cpuCpb.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_CPU_CACHEFLUSHONHALT_INSTALL_H_
#define _OPTION_CPU_CACHEFLUSHONHALT_INSTALL_H_
#include "cpuPostInit.h"
#include "Proc/CPU/cpuPostInit.h"
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_DMI_INSTALL_H_
#define _OPTION_DMI_INSTALL_H_
#include "cpuLateInit.h"
#include <Proc/CPU/cpuLateInit.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -43,7 +43,7 @@
#ifndef _OPTION_FAMILY_15H_INSTALL_H_
#define _OPTION_FAMILY_15H_INSTALL_H_
#include "cpuFamilyTranslation.h"
#include <Proc/CPU/cpuFamilyTranslation.h>
/*
* Pull in family specific services based on entry point

View File

@ -42,7 +42,7 @@
#ifndef _OPTION_FCH_INSTALL_H_
#define _OPTION_FCH_INSTALL_H_
#include "AmdFch.h"
#include <Proc/Common/AmdFch.h>
#ifndef FCH_SUPPORT
#define FCH_SUPPORT FALSE

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_GNB_INSTALL_H_
#define _OPTION_GNB_INSTALL_H_
#include "S3SaveState.h"
#include <Proc/Common/S3SaveState.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.
* Check to validate the definition
@ -82,13 +82,13 @@
// Service installation
//---------------------------------------------------------------------------------------------------
#include "Gnb.h"
#include "GnbPcie.h"
#include "GnbGfx.h"
#include <Proc/GNB/Common/Gnb.h>
#include <Proc/GNB/Common/GnbPcie.h>
#include <Proc/GNB/Common/GnbGfx.h>
#define SERVICES_POINTER NULL
#if (GNB_TYPE_TN == TRUE)
#include "GnbInitTNInstall.h"
#include <Proc/GNB/Modules/GnbInitTN/GnbInitTNInstall.h>
#endif
GNB_SERVICE *ServiceTable = SERVICES_POINTER;

View File

@ -45,10 +45,10 @@
#define _OPTION_HT_INSTALL_H_
#include "Topology.h"
#include "htFeat.h"
#include "htInterface.h"
#include "htNb.h"
#include "htTopologies.h"
#include <Proc/HT/htFeat.h>
#include <Proc/HT/htInterface.h>
#include <Proc/HT/htNb.h>
#include <Proc/HT/htTopologies.h>
/*
* Advanced Option only, hardware socket naming is the preferred method.
*/

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_HTC_INSTALL_H_
#define _OPTION_HTC_INSTALL_H_
#include "cpuHtc.h"
#include <Proc/CPU/Feature/cpuHtc.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_HW_C1E_INSTALL_H_
#define _OPTION_HW_C1E_INSTALL_H_
#include "cpuHwC1e.h"
#include <Proc/CPU/Feature/cpuHwC1e.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -43,8 +43,8 @@
#define _OPTION_IDS_INSTALL_H_
#include "Ids.h"
#include "IdsHt.h"
#include "IdsLib.h"
#include "IdsDebugPrint.h"
#include <Proc/IDS/IdsLib.h>
#include <Proc/IDS/Debug/IdsDebugPrint.h>
#ifdef __IDS_EXTENDED__
#include OPTION_IDS_EXT_INSTALL_FILE
#endif

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_IO_CSTATE_INSTALL_H_
#define _OPTION_IO_CSTATE_INSTALL_H_
#include "cpuIoCstate.h"
#include <Proc/CPU/Feature/cpuIoCstate.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_L3_FEATURES_INSTALL_H_
#define _OPTION_L3_FEATURES_INSTALL_H_
#include "cpuL3Features.h"
#include <Proc/CPU/Feature/cpuL3Features.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -45,11 +45,11 @@
#define _OPTION_MEMORY_H_
/* Memory Includes */
#include "mm.h"
#include "mn.h"
#include "mt.h"
#include "ma.h"
#include "mp.h"
#include <Proc/Mem/mm.h>
#include <Proc/Mem/mn.h>
#include <Proc/Mem/mt.h>
#include <Proc/Mem/ma.h>
#include <Proc/Mem/mp.h>
/*----------------------------------------------------------------------------------------
* M I X E D (Definitions And Macros / Typedefs, Structures, Enums)
*----------------------------------------------------------------------------------------

View File

@ -44,9 +44,9 @@
#ifndef _OPTION_MEMORY_RECOVERY_H_
#define _OPTION_MEMORY_RECOVERY_H_
#include "mm.h"
#include "mn.h"
#include "mt.h"
#include <Proc/Mem/mm.h>
#include <Proc/Mem/mn.h>
#include <Proc/Mem/mt.h>
typedef BOOLEAN MEM_REC_NB_CONSTRUCTOR (
IN OUT MEM_NB_BLOCK *NBPtr,

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_MMIO_MAP_INSTALL_H_
#define _OPTION_MMIO_MAP_INSTALL_H_
#include "mmioMapManager.h"
#include <Proc/CPU/mmioMapManager.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_MSG_BASED_C1E_INSTALL_H_
#define _OPTION_MSG_BASED_C1E_INSTALL_H_
#include "cpuMsgBasedC1e.h"
#include <Proc/CPU/Feature/cpuMsgBasedC1e.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_PRESERVE_MAILBOX_INSTALL_H_
#define _OPTION_PRESERVE_MAILBOX_INSTALL_H_
#include "PreserveMailbox.h"
#include <Proc/CPU/Feature/PreserveMailbox.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_PSI_INSTALL_H_
#define _OPTION_PSI_INSTALL_H_
#include "cpuPsi.h"
#include <Proc/CPU/Feature/cpuPsi.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_PSTATE_H_
#define _OPTION_PSTATE_H_
#include "cpuPstateTables.h"
#include <Proc/CPU/Feature/cpuPstateTables.h>
/*----------------------------------------------------------------------------------------
* M I X E D (Definitions And Macros / Typedefs, Structures, Enums)

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_PSTATE_HPC_MODE_INSTALL_H_
#define _OPTION_PSTATE_HPC_MODE_INSTALL_H_
#include "cpuPstateHpcMode.h"
#include <Proc/CPU/Feature/cpuPstateHpcMode.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_PSTATE_INSTALL_H_
#define _OPTION_PSTATE_INSTALL_H_
#include "cpuPstateTables.h"
#include <Proc/CPU/Feature/cpuPstateTables.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_S3SCRIPT_INSTALL_H_
#define _OPTION_S3SCRIPT_INSTALL_H_
#include "S3SaveState.h"
#include <Proc/Common/S3SaveState.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.
* Check to validate the definition

View File

@ -44,7 +44,7 @@
#ifndef _OPTION_SW_C1E_INSTALL_H_
#define _OPTION_SW_C1E_INSTALL_H_
#include "cpuSwC1e.h"
#include <Proc/CPU/Feature/cpuSwC1e.h>
/* This option is designed to be included into the platform solution install
* file. The platform solution install file will define the options status.

View File

@ -45,7 +45,7 @@
#ifndef _CPU_REGISTERS_H_
#define _CPU_REGISTERS_H_
#include "cpuFamRegisters.h"
#include "Family/cpuFamRegisters.h"
/*
*--------------------------------------------------------------
*

View File

@ -106,12 +106,12 @@
#endif
#include "Fch.h"
#include "amdlib.h"
#include "FchCommonCfg.h"
#include "AcpiLib.h"
#include "FchDef.h"
#include "FchBiosRamUsage.h"
#include "AmdFch.h"
#include <Lib/amdlib.h>
#include "Common/FchCommonCfg.h"
#include "Common/AcpiLib.h"
#include "Common/FchDef.h"
#include "Common/FchBiosRamUsage.h"
#include <Proc/Common/AmdFch.h>
extern BUILD_OPT_CFG UserOptions;

View File

@ -50,9 +50,9 @@
// Specify definition used by module services
//-----------------------------------------------------------------------
#include "GnbPcie.h"
#include "GnbPcieFamServices.h"
#include "GnbFamServices.h"
#include <Proc/GNB/Common/GnbPcie.h>
#include <Proc/GNB/Common/GnbPcieFamServices.h>
#include <Proc/GNB/Common/GnbFamServices.h>
//-----------------------------------------------------------------------
// Export services

View File

@ -43,9 +43,9 @@
#ifndef _IDS_LIB_H_
#define _IDS_LIB_H_
#include "OptionsIds.h"
#include "cpuRegisters.h"
#include "cpuApicUtilities.h"
#include "Table.h"
#include <Proc/CPU/cpuRegisters.h>
#include <Proc/CPU/cpuApicUtilities.h>
#include <Proc/CPU/Table.h>
///Specific time stamp performance analysis which need ids control support
#if IDSOPT_CONTROL_ENABLED == TRUE
#define PERF_SPEC_TS_ANALYSE(StdHeader) IdsPerfSpecTsAnalyse(StdHeader)