diff options
author | Subrata Banik <subrata.banik@intel.com> | 2019-05-15 20:27:04 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2019-06-24 04:33:06 +0000 |
commit | 42c44c2f8391a3b56acf9215044d2b2787061738 (patch) | |
tree | 54b57668d334901331c3a48182e59ee29d3ccd75 /src/lib | |
parent | e56fb89e7c04655ec0fed36484d9e509e08f662f (diff) | |
download | coreboot-42c44c2f8391a3b56acf9215044d2b2787061738.tar.xz |
Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER
This patch relying on new rule, ENV_PAYLOAD_LOADER which is set
to ENV_RAMSTAGE.
This approach will help to add future optimization (rampayload) in
coreboot flow if required.
Change-Id: Ib54ece7b9e5f281f8a092dc6f38c07406edfa5fa
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: ron minnich <rminnich@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/imd_cbmem.c | 2 | ||||
-rw-r--r-- | src/lib/memrange.c | 2 | ||||
-rw-r--r-- | src/lib/prog_loaders.c | 2 | ||||
-rw-r--r-- | src/lib/timestamp.c | 11 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c index 1a67ad5be1..b1b63f68b3 100644 --- a/src/lib/imd_cbmem.c +++ b/src/lib/imd_cbmem.c @@ -307,7 +307,7 @@ void cbmem_get_region(void **baseptr, size_t *size) imd_region_used(cbmem_get_imd(), baseptr, size); } -#if ENV_RAMSTAGE || (CONFIG(EARLY_CBMEM_LIST) \ +#if ENV_PAYLOAD_LOADER || (CONFIG(EARLY_CBMEM_LIST) \ && (ENV_POSTCAR || ENV_ROMSTAGE)) /* * -fdata-sections doesn't work so well on read only strings. They all diff --git a/src/lib/memrange.c b/src/lib/memrange.c index 96d7524218..79a1b0ee49 100644 --- a/src/lib/memrange.c +++ b/src/lib/memrange.c @@ -47,7 +47,7 @@ static struct range_entry *alloc_range(struct memranges *ranges) range_entry_unlink(&ranges->free_list, r); return r; } - if (ENV_RAMSTAGE) + if (ENV_PAYLOAD_LOADER) return malloc(sizeof(struct range_entry)); return NULL; } diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 81ec2ec3c4..dfabd31910 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -160,7 +160,7 @@ fail: die_with_post_code(POST_INVALID_ROM, "Ramstage was not loaded!\n"); } -#ifdef __RAMSTAGE__ // gc-sections should take care of this +#if ENV_PAYLOAD_LOADER // gc-sections should take care of this static struct prog global_payload = PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/payload"); diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index 38d0212845..adacf6b1b3 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -116,8 +116,11 @@ static struct timestamp_table *timestamp_alloc_cbmem_table(void) * based x86 platforms. */ static int timestamp_should_run(void) { - /* Only check boot_cpu() in other stages than ramstage on x86. */ - if ((!ENV_RAMSTAGE && CONFIG(ARCH_X86)) && !boot_cpu()) + /* + * Only check boot_cpu() in other stages than + * ENV_PAYLOAD_LOADER on x86. + */ + if ((!ENV_PAYLOAD_LOADER && CONFIG(ARCH_X86)) && !boot_cpu()) return 0; return 1; @@ -302,8 +305,8 @@ static void timestamp_sync_cache_to_cbmem(int is_recovery) if (ts_cbmem_table->base_time == 0) ts_cbmem_table->base_time = ts_cache_table->base_time; - /* Seed the timestamp tick frequency in ramstage. */ - if (ENV_RAMSTAGE) + /* Seed the timestamp tick frequency in ENV_PAYLOAD_LOADER. */ + if (ENV_PAYLOAD_LOADER) ts_cbmem_table->tick_freq_mhz = timestamp_tick_freq_mhz(); /* Cache no longer required. */ |