timestamp: Bump CBMEM timestamp count, make full use of pre-RAM regions

Since we're reaching the timestamp limit on certain platforms (both for
the pre-RAM cache and the final CBMEM region), this patch increases the
amount of space for both. In the pre-RAM case, it achieves this by
always utilizing the full size of the TIMESTAMP() region allocated in
memlayout.ld, rather than arbitrarily limiting it to some constant.

BRANCH=None
BUG=None
TEST=Booted Oak and confirmed that I can once again see all pre-RAM
timestamps after picking in the LZ4 patch series.

Change-Id: Iabb075a48d8d1e3e1811afeaad5ab47e7846c972
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/13651
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Julius Werner 2016-02-08 19:48:11 -08:00
parent 87fb1a6cdb
commit 69d20c45ec
1 changed files with 10 additions and 5 deletions

View File

@ -25,17 +25,17 @@
#include <rules.h>
#include <smp/node.h>
#define MAX_TIMESTAMPS 60
#define MAX_TIMESTAMPS 84
#define MAX_TIMESTAMP_CACHE 16
#define MAX_BSS_TIMESTAMP_CACHE 16
struct __attribute__((__packed__)) timestamp_cache {
uint32_t cache_state;
struct timestamp_table table;
/* The struct timestamp_table has a 0 length array as its last field.
* The following 'entries' array serves as the storage space for the
* cache. */
struct timestamp_entry entries[MAX_TIMESTAMP_CACHE];
* cache when allocated in the BSS. */
struct timestamp_entry entries[MAX_BSS_TIMESTAMP_CACHE];
};
#if (IS_ENABLED(CONFIG_HAS_PRECBMEM_TIMESTAMP_REGION) && defined(__PRE_RAM__))
@ -62,9 +62,14 @@ static void timestamp_cache_init(struct timestamp_cache *ts_cache,
uint64_t base)
{
ts_cache->table.num_entries = 0;
ts_cache->table.max_entries = MAX_TIMESTAMP_CACHE;
ts_cache->table.max_entries = MAX_BSS_TIMESTAMP_CACHE;
ts_cache->table.base_time = base;
ts_cache->cache_state = TIMESTAMP_CACHE_INITIALIZED;
if (USE_TIMESTAMP_REGION)
ts_cache->table.max_entries = (_timestamp_size -
offsetof(struct timestamp_cache, entries))
/ sizeof(struct timestamp_entry);
}
static struct timestamp_cache *timestamp_cache_get(void)