diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-04-21 14:45:32 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-04-24 14:37:59 +0000 |
commit | 6403167d290da235a732bd2d6157aa2124fb403a (patch) | |
tree | 9c4805af37a31830934f91098d299e967df930c6 /src/drivers/intel/fsp2_0 | |
parent | 38fd6685e9da61daadc96a8d537e6966dfe3b219 (diff) |
compiler.h: add __weak macro
Instead of writing out '__attribute__((weak))' use a shorter form.
Change-Id: If418a1d55052780077febd2d8f2089021f414b91
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r-- | src/drivers/intel/fsp2_0/graphics.c | 2 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/hob_display.c | 6 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/memory_init.c | 4 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/notify.c | 3 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/upd_display.c | 5 |
5 files changed, 11 insertions, 9 deletions
diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index f1219ea15c..ae1442ee9d 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -124,7 +124,7 @@ int fill_lb_framebuffer(struct lb_framebuffer *framebuffer) return 0; } -__attribute__((weak)) uintptr_t fsp_soc_get_igd_bar(void) +__weak uintptr_t fsp_soc_get_igd_bar(void) { return 0; } diff --git a/src/drivers/intel/fsp2_0/hob_display.c b/src/drivers/intel/fsp2_0/hob_display.c index d9838e9462..977facbfc6 100644 --- a/src/drivers/intel/fsp2_0/hob_display.c +++ b/src/drivers/intel/fsp2_0/hob_display.c @@ -157,7 +157,7 @@ const char *fsp_get_guid_name(const uint8_t *guid) return "Unknown GUID"; } -__attribute__((weak)) const char *soc_get_hob_type_name( +__weak const char *soc_get_hob_type_name( const struct hob_header *hob) { return NULL; @@ -173,7 +173,7 @@ void fsp_print_guid_extension_hob(const struct hob_header *hob) printk(BIOS_SPEW, ": %s\n", fsp_get_guid_name(res->owner_guid)); } -__attribute__((weak)) const char *soc_get_guid_name(const uint8_t *guid) +__weak const char *soc_get_guid_name(const uint8_t *guid) { return NULL; } @@ -212,6 +212,6 @@ void fsp_display_hobs(void) } } -__attribute__((weak)) void soc_display_hob(const struct hob_header *hob) +__weak void soc_display_hob(const struct hob_header *hob) { } diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c index 0abe121aa6..30987ce500 100644 --- a/src/drivers/intel/fsp2_0/memory_init.c +++ b/src/drivers/intel/fsp2_0/memory_init.c @@ -307,13 +307,13 @@ static enum cb_err fsp_fill_common_arch_params(FSPM_ARCH_UPD *arch_upd, return CB_SUCCESS; } -__attribute__((weak)) +__weak uint8_t fsp_memory_mainboard_version(void) { return 0; } -__attribute__((weak)) +__weak uint8_t fsp_memory_soc_version(void) { return 0; diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c index 34a4262049..6d6d623be4 100644 --- a/src/drivers/intel/fsp2_0/notify.c +++ b/src/drivers/intel/fsp2_0/notify.c @@ -12,6 +12,7 @@ #include <arch/cpu.h> #include <bootstate.h> +#include <compiler.h> #include <console/console.h> #include <fsp/util.h> #include <soc/intel/common/util.h> @@ -87,7 +88,7 @@ BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, fsp_notify_dummy, BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, fsp_notify_dummy, (void *) READY_TO_BOOT); -__attribute__((weak)) void platform_fsp_notify_status( +__weak void platform_fsp_notify_status( enum fsp_notify_phase phase) { } diff --git a/src/drivers/intel/fsp2_0/upd_display.c b/src/drivers/intel/fsp2_0/upd_display.c index 8df48659fa..415505e1dd 100644 --- a/src/drivers/intel/fsp2_0/upd_display.c +++ b/src/drivers/intel/fsp2_0/upd_display.c @@ -10,6 +10,7 @@ */ #include <arch/cpu.h> +#include <compiler.h> #include <console/console.h> #include <fsp/util.h> #include <lib.h> @@ -50,7 +51,7 @@ static void fspm_display_arch_params(const FSPM_ARCH_UPD *old, } /* Display the UPD parameters for MemoryInit */ -__attribute__((weak)) void soc_display_fspm_upd_params( +__weak void soc_display_fspm_upd_params( const FSPM_UPD *fspm_old_upd, const FSPM_UPD *fspm_new_upd) { @@ -67,7 +68,7 @@ void fspm_display_upd_values(const FSPM_UPD *old, } /* Display the UPD parameters for SiliconInit */ -__attribute__((weak)) void soc_display_fsps_upd_params( +__weak void soc_display_fsps_upd_params( const FSPS_UPD *fsps_old_upd, const FSPS_UPD *fsps_new_upd) { |