coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <stdint.h>
#include <console/console.h>
#include <cbmem.h>
#include <symbols.h>
#include <timer.h>
#include <timestamp.h>
#include <smp/node.h>
Go to the source code of this file.
Macros | |
#define | MAX_TIMESTAMPS 192 |
Functions | |
static void | timestamp_cache_init (struct timestamp_table *ts_cache, uint64_t base) |
static struct timestamp_table * | timestamp_cache_get (void) |
static struct timestamp_table * | timestamp_alloc_cbmem_table (void) |
static int | timestamp_should_run (void) |
static struct timestamp_table * | timestamp_table_get (void) |
static void | timestamp_table_set (struct timestamp_table *ts) |
static const char * | timestamp_name (enum timestamp_id id) |
static void | timestamp_add_table_entry (struct timestamp_table *ts_table, enum timestamp_id id, int64_t ts_time) |
void | timestamp_add (enum timestamp_id id, int64_t ts_time) |
void | timestamp_add_now (enum timestamp_id id) |
void | timestamp_init (uint64_t base) |
static void | timestamp_sync_cache_to_cbmem (struct timestamp_table *ts_cbmem_table) |
static void | timestamp_reinit (int is_recovery) |
void | timestamp_rescale_table (uint16_t N, uint16_t M) |
uint32_t | get_us_since_boot (void) |
uint64_t __weak | timestamp_get (void) |
int __weak | timestamp_tick_freq_mhz (void) |
Variables | |
static struct timestamp_table * | glob_ts_table |
#define MAX_TIMESTAMPS 192 |
Definition at line 12 of file timestamp.c.
Definition at line 273 of file timestamp.c.
References timestamp_table::base_time, NULL, timestamp_table::tick_freq_mhz, timestamp_get(), and timestamp_table_get().
Referenced by wait_for_legacy_dev().
void timestamp_add | ( | enum timestamp_id | id, |
int64_t | ts_time | ||
) |
Definition at line 120 of file timestamp.c.
References timestamp_table::base_time, BIOS_ERR, BIOS_INFO, CONFIG, printk, timestamp_add_table_entry(), timestamp_name(), timestamp_should_run(), and timestamp_table_get().
Referenced by bootblock_main_with_timestamp(), cbmem_inject_telemetry_data(), hash_body(), and timestamp_add_now().
void timestamp_add_now | ( | enum timestamp_id | id | ) |
Definition at line 141 of file timestamp.c.
References timestamp_add(), and timestamp_get().
Referenced by acpi_resume(), agesa_execute_state(), amd_init_early(), amd_init_env(), amd_init_late(), amd_init_mid(), amd_init_post(), amd_init_reset(), amd_init_resume(), amd_init_rtb(), amd_s3final_restore(), amd_s3late_restore(), amd_update_microcode_from_cbfs(), bootblock_main_with_timestamp(), bs_dev_enable(), bs_dev_init(), bs_dev_init_chips(), bs_dev_resources(), bs_os_resume_check(), bs_post_device(), bs_write_tables(), cache_as_ram_stage_main(), car_stage_entry(), cbfs_load_and_decompress(), cbmem_add_cros_vpd(), do_fsp_memory_init(), do_send_end_of_post(), do_silicon_init(), ec_hash_image(), elog_init(), extract(), fit_payload(), fsp_notify(), fsp_run_silicon_init(), fsp_silicon_init(), graphics_set_resources(), hash_body(), init_dram_ddr3(), intel_early_me_init_done(), load_one_segment(), main(), mainboard_romstage_entry(), perform_raminit(), raminit(), raminit_common(), romstage(), romstage_main(), run_postcar_phase(), run_ramstage(), run_romstage(), sdram_initialize(), soc_update_apob_cache(), vb2ex_ec_vboot_done(), vboot_run_logic(), vboot_sync_ec(), and verstage_main().
|
static |
Definition at line 104 of file timestamp.c.
References BIOS_ERR, timestamp_table::entries, timestamp_entry::entry_id, timestamp_entry::entry_stamp, timestamp_table::max_entries, timestamp_table::num_entries, and printk.
Referenced by timestamp_add(), and timestamp_sync_cache_to_cbmem().
|
static |
Definition at line 44 of file timestamp.c.
References timestamp_table::base_time, cbmem_add(), CBMEM_ID_TIMESTAMP, timestamp_table::max_entries, MAX_TIMESTAMPS, NULL, and timestamp_table::num_entries.
Referenced by timestamp_reinit().
|
static |
Definition at line 28 of file timestamp.c.
References BUG, ENV_ROMSTAGE_OR_BEFORE, NULL, and REGION_SIZE.
Referenced by timestamp_init(), and timestamp_table_get().
|
static |
Definition at line 18 of file timestamp.c.
References base, timestamp_table::base_time, timestamp_table::entries, timestamp_table::max_entries, timestamp_table::num_entries, offsetof, and REGION_SIZE.
Referenced by timestamp_init().
Definition at line 287 of file timestamp.c.
References CONFIG, mono_time_diff_microseconds(), mono_time_set_usecs(), and timer_monotonic_get().
Definition at line 146 of file timestamp.c.
References assert, base, BIOS_ERR, ENV_ROMSTAGE_OR_BEFORE, printk, timestamp_cache_get(), timestamp_cache_init(), timestamp_should_run(), and timestamp_table_set().
Referenced by bootblock_main(), bootblock_main_with_timestamp(), main(), Main(), romstage(), and tegra124_main().
|
static |
Definition at line 92 of file timestamp.c.
References ARRAY_SIZE, timestamp_id_to_name::name, and timestamp_ids.
Referenced by timestamp_add().
|
static |
Definition at line 209 of file timestamp.c.
References BIOS_ERR, cbmem_find(), CBMEM_ID_TIMESTAMP, ENV_PAYLOAD_LOADER, ENV_ROMSTAGE, NULL, printk, timestamp_table::tick_freq_mhz, timestamp_alloc_cbmem_table(), timestamp_should_run(), timestamp_sync_cache_to_cbmem(), timestamp_table_set(), and timestamp_tick_freq_mhz().
Definition at line 241 of file timestamp.c.
References timestamp_table::base_time, BIOS_ERR, timestamp_table::entries, timestamp_entry::entry_stamp, M, NULL, timestamp_table::num_entries, printk, timestamp_should_run(), and timestamp_table_get().
Referenced by romstage_dispatch().
|
static |
Definition at line 65 of file timestamp.c.
References boot_cpu(), ENV_PAYLOAD_LOADER, and ENV_X86.
Referenced by timestamp_add(), timestamp_init(), timestamp_reinit(), and timestamp_rescale_table().
|
static |
Definition at line 166 of file timestamp.c.
References timestamp_table::base_time, BIOS_ERR, timestamp_table::entries, timestamp_entry::entry_id, timestamp_entry::entry_stamp, timestamp_table::num_entries, printk, timestamp_add_table_entry(), and timestamp_table_get().
Referenced by timestamp_reinit().
|
static |
Definition at line 77 of file timestamp.c.
References glob_ts_table, and timestamp_cache_get().
Referenced by get_us_since_boot(), timestamp_add(), timestamp_rescale_table(), and timestamp_sync_cache_to_cbmem().
|
static |
Definition at line 87 of file timestamp.c.
References glob_ts_table.
Referenced by timestamp_init(), and timestamp_reinit().
Definition at line 301 of file timestamp.c.
|
static |
Definition at line 16 of file timestamp.c.
Referenced by timestamp_table_get(), and timestamp_table_set().