coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
console.h File Reference
Include dependency graph for console.h:

Go to the source code of this file.

Macros

#define RAM_DEBUG   (CONFIG(DEBUG_RAM_SETUP) ? BIOS_DEBUG : BIOS_NEVER)
 
#define RAM_SPEW   (CONFIG(DEBUG_RAM_SETUP) ? BIOS_SPEW : BIOS_NEVER)
 
#define die_with_post_code(value, fmt, ...)    do { post_code(value); die(fmt, ##__VA_ARGS__); } while (0)
 
#define __CONSOLE_ENABLE__
 

Functions

void post_code (u8 value)
 
void mainboard_post (u8 value)
 
void arch_post_code (u8 value)
 
void __noreturn die (const char *fmt,...)
 
void die_notify (void)
 
static int get_console_loglevel (void)
 
static int get_log_level (void)
 
static void console_init (void)
 
static int console_log_level (int msg_level)
 
static int printk (int LEVEL, const char *fmt,...)
 
static int vprintk (int LEVEL, const char *fmt, va_list args)
 
static void do_putchar (unsigned char byte)
 
static long console_time_get_and_reset (void)
 
static void console_time_report (void)
 

Macro Definition Documentation

◆ __CONSOLE_ENABLE__

#define __CONSOLE_ENABLE__
Value:
((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE)) || \
(ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \
@ CONFIG
Definition: dsi_common.h:201
#define ENV_BOOTBLOCK
Definition: rules.h:148
#define ENV_LIBAGESA
Definition: rules.h:155
#define ENV_SMM
Definition: rules.h:151
#define ENV_RAMSTAGE
Definition: rules.h:150
#define ENV_ROMSTAGE
Definition: rules.h:149
#define ENV_SEPARATE_VERSTAGE
Definition: rules.h:152
#define ENV_POSTCAR
Definition: rules.h:154
#define DEBUG_SMI
Definition: smihandler.c:12

Definition at line 43 of file console.h.

◆ die_with_post_code

#define die_with_post_code (   value,
  fmt,
  ... 
)     do { post_code(value); die(fmt, ##__VA_ARGS__); } while (0)

Definition at line 21 of file console.h.

◆ RAM_DEBUG

#define RAM_DEBUG   (CONFIG(DEBUG_RAM_SETUP) ? BIOS_DEBUG : BIOS_NEVER)

Definition at line 13 of file console.h.

◆ RAM_SPEW

#define RAM_SPEW   (CONFIG(DEBUG_RAM_SETUP) ? BIOS_SPEW : BIOS_NEVER)

Definition at line 14 of file console.h.

Function Documentation

◆ arch_post_code()

void arch_post_code ( u8  value)

Definition at line 8 of file post.c.

References cmos_post_code(), CONFIG, ENV_SMM, outb(), svc_write_postcode(), and value.

Referenced by post_code().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ console_init()

static void console_init ( void  )
inlinestatic

Definition at line 78 of file console.h.

◆ console_log_level()

static int console_log_level ( int  msg_level)
inlinestatic

Definition at line 79 of file console.h.

◆ console_time_get_and_reset()

static long console_time_get_and_reset ( void  )
inlinestatic

Definition at line 85 of file console.h.

◆ console_time_report()

static void console_time_report ( void  )
inlinestatic

Definition at line 86 of file console.h.

◆ die()

void __noreturn die ( const char *  fmt,
  ... 
)

Definition at line 17 of file die.c.

References args, BIOS_EMERG, die_notify(), halt(), va_end, va_start, and vprintk().

Referenced by __alloc_dev(), __rc_ctrl_mode_switch(), _check_num(), acpi_resume(), add_more_links(), add_res_to_stack(), after_verstage(), agesa_ReadSpd_from_cbfs(), amd_create_struct(), aop_fw_load_reset(), arch_prog_run(), attach_iio_stacks(), board_ReadSpd_from_cbfs(), boot_device_init(), boot_device_ro(), bs_os_resume(), calculate_timings(), cannonlake_memcfg_init(), car_stage_entry(), cbfs_get_boot_device(), check_secrets_txt(), chipset_handle_reset(), chipset_teardown_car_main(), choose_reg178(), choose_tclk(), choose_training(), clock_index(), collect_dimm_config(), compute_derived_timings(), configure_descriptor(), configure_e7501_cas_latency(), configure_e7501_dram_timing(), configure_e7501_ram_addresses(), copy_secondary_start_to_lowest_1M(), copy_spd(), cpu_bus_scan(), cpu_initialize(), cpucp_fw_load_reset(), cse_handle_eop_error(), cse_set_and_boot_from_next_bp(), cse_trigger_vboot_recovery(), dbgp_ehci_info(), ddr3_read_io_init(), ddr3_select_clock_mux(), ddr3_write_io_init(), ddr_phy_pll_setting(), ddr_to_mhz(), decode_igd_gtt_size(), decode_igd_memory_size(), decode_spd_select_timings(), decode_tseg_size(), decompress_kernel_header(), derive_timings(), devtree_die(), die_on_spd_error(), do_arch_prog_run(), do_fsp_memory_init(), do_fsp_post_memory_init(), do_pci_scan_bridge(), do_raminit(), dqs_gw_fine_tune_calib(), dqsosc_shu_settings(), dram_find_common_params(), dram_find_spds_ddr3(), dramc_calibrate_all_channels(), dramc_duty_calibration(), dramc_engine2(), dramc_get_dly_range(), dramc_runtime_config(), dramc_rx_dqs_gating_cal(), dramc_rx_input_delay_tracking_init_by_freq(), dvfs_settings(), dw_i2c_soc_dev_to_bus(), early_ec_init(), enable_lapic(), enable_smbus(), espi_configure_decodes(), espi_set_alert_pin_config(), espi_set_initial_config(), espi_set_io_mode_config(), espi_set_op_freq_config(), exception_data_abort(), exception_fiq(), exception_irq(), exception_not_used(), exception_prefetch_abort(), exception_software_interrupt(), exception_undefined_instruction(), fill_ddr4_memory_params(), fill_fsps_irq_params(), fill_fsps_pse_params(), fill_spd_for_index(), find_cas_tck(), find_common_clock_cas(), find_dimm_config(), find_empty_pmp_entry(), find_ramconfig(), find_resource(), fsp_debug_after_memory_init(), fsp_find_bootloader_tolum(), fsp_find_reserved_memory(), fsp_notify(), fsp_set_runtime(), fsp_temp_ram_exit(), fsp_update_fih(), fsp_verify_memory_init_hobs(), fsps_load(), gather_common_timing(), get_alignment_by_resource_type(), get_fiamux_hob_data(), get_free_thread(), get_freq_group_clock(), get_FRQ(), get_fx_devs(), get_gmch_info(), get_hob_list(), get_index(), get_notify_phase_data(), get_pbus_smbus(), get_pmif_controller(), get_res_type(), get_sdram_config(), get_spd_data(), get_spd_pointer(), gpi_firmware_load(), gpio_family_number(), gpio_get_community(), gpio_group_index(), gpio_pm_configure(), graphics_get_gtt_base(), i2c_acpi_name(), i2c_clk_configure(), i82801ix_ehci_init(), i82801ix_function_disabled(), i82801ix_pcie_init(), i82801jx_ehci_init(), i82801jx_function_disabled(), i82801jx_pcie_init(), idle_thread_init(), init_dram_ddr3(), init_pmif_arb(), initialize_dram(), intel_txt_romstage_init(), isa_init(), jedec_init(), launch_dram(), locate_spd(), main(), mainboard_enable(), mainboard_fill_mrc_params(), mainboard_find_spd_data(), mainboard_get_spd(), mainboard_get_spd_data(), mainboard_machine_check(), mainboard_memory_init_params(), mainboard_romstage_entry(), mainboard_silicon_init_params(), mch_domain_read_resources(), mcupm_init(), mem_pll_phase_cali(), mem_populate_channel_data(), memalign(), memcfg_init(), meminit_cbfs_spd_index(), meminit_spd_data(), memmap_get_early_dram_usage(), memmap_stash_early_dram_usage(), memory_io_init(), mmu_create_subtable(), mt6315_buck_get_voltage(), mt6315_buck_set_voltage(), mt6358_init(), mt6359p_buck_get_voltage(), mt6359p_buck_set_voltage(), mt6359p_get_vm18_voltage(), mt6359p_set_vm18_voltage(), mt6366_init(), mt6391_init(), mt_fmeter_get_freq_khz(), mt_mem_init_run(), mt_set_emi(), mtrr_index_to_host_bridge_register_offset(), new_resource(), normalize_rec_timing(), northbridge_write_smram(), otp_read_word(), pch_get_ltt_value(), pch_setup_cir(), pci_calculate_irq(), pcidev_die(), perbit_window_cal(), perform_raminit(), phy_io_config(), platform_fsp_silicon_init_params_cb(), pmic_read_efuse(), pmic_set_vcn33_vol(), pmic_set_vmc_vol(), pmic_set_vmch_vol(), pmif_select(), prepare_and_run_postcar(), print_exception_and_die(), program_dll(), program_total_memory_map(), protect_ro_rgn_spi_flash(), pwm_regulator_configure(), pwrap_init_sidly(), qclib_load_and_run(), quick_ram_check_or_die(), qupv3_se_fw_load_and_init(), ram_check(), raminit(), raminit_rcomp_calibration(), raminit_read_vco_index(), rcomp_initialization(), rcven(), read_fsb_clock(), read_spd_md(), read_training_per_lane(), reg_cpu_cr_read(), reg_cpu_cr_write(), report_bist_failure(), reset_pmp(), rk808_configure_buck(), rk808_configure_ldo(), rk_mipi_dsi_write(), rkclk_configure_ddr(), rkclk_i2c_clock_for_bus(), run_bl31(), run_payload(), sata_enable(), save_hob_list(), schedule(), sdhci_alloc_adma64_descs(), sdhci_alloc_adma_descs(), sdram_detect_ram_speed(), sdram_enhancedmode(), sdram_init(), sdram_initialize(), sdram_jedec_enable(), sdram_program_memory_frequency(), sdram_program_pll_settings(), sdram_read_spds(), sdram_set_clock_enable_signal(), sdram_set_row_attributes(), search_write_leveling(), select_cas_dramfreq_ddr2(), select_cas_dramfreq_ddr3(), send_heci_uma_message(), set_dram_row_attributes(), set_range_uc(), setup_clock(), setup_memory(), setup_new_table(), setup_power(), setup_preram_cache(), setup_sdram_meminfo(), shrm_fw_load_reset(), smm_handler_start(), smp_resume(), soc_memory_init_params(), soc_silicon_init_params(), soc_validate_fspm_header(), software_i2c_attach(), software_i2c_detach(), sp_tx_edid_read(), spd_memory_init_params(), spd_read_from_cbfs(), spmi_cali_rd_clock_polarity(), start_rpm(), start_tzbsp(), timer_monotonic_get(), trap_handler(), try_timing_offsets(), tsc_freq_mhz(), ubsan_abort(), variant_memcfg_config(), variant_memory_params(), vb2ex_abort(), vboot_run_logic(), verify_ddr3_dimm(), verify_psp_transfer_buf(), write_pmpaddr(), write_pmpcfg(), write_training_per_group(), x86_exception(), and xhci_acpi_name().

Here is the call graph for this function:

◆ die_notify()

void die_notify ( void  )

Definition at line 12 of file die.c.

References ARRAY_SIZE, BIOS_EMERG, default_ec_err, err_code_entry::ec_err, ELGON_GPIO_ERROR_LED, ENV_POSTCAR, gpio_output(), gpio_set(), GPP_E8, h8_panic(), KB_ERR_CODE, mdelay(), NULL, post_code, post_code_err_map, printk, wilco_ec_mailbox(), WILCO_EC_MSG_DEFAULT, and wilco_ec_saved_post_code.

Referenced by die().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_putchar()

static void do_putchar ( unsigned char  byte)
inlinestatic

Definition at line 84 of file console.h.

◆ get_console_loglevel()

static int get_console_loglevel ( void  )
inlinestatic

Definition at line 37 of file console.h.

◆ get_log_level()

static int get_log_level ( void  )
inlinestatic

Definition at line 77 of file console.h.

◆ mainboard_post()

void mainboard_post ( u8  value)

Definition at line 12 of file post.c.

References nc_fpga_post(), value, and wilco_ec_save_post_code().

Referenced by post_code().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ post_code()

void post_code ( u8  value)

Definition at line 14 of file post.c.

References arch_post_code(), BIOS_INFO, CONFIG, mainboard_post(), printk, and value.

Here is the call graph for this function:

◆ printk()

static int printk ( int  LEVEL,
const char *  fmt,
  ... 
)
inlinestatic

Definition at line 82 of file console.h.

◆ vprintk()

static int vprintk ( int  LEVEL,
const char *  fmt,
va_list  args 
)
inlinestatic

Definition at line 83 of file console.h.