![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <endian.h>
#include <stdlib.h>
#include <string.h>
#include <smbios.h>
#include <console/console.h>
#include <arch/io.h>
#include <acpi/acpi.h>
#include <commonlib/endian.h>
#include "fw_cfg.h"
#include "fw_cfg_if.h"
Go to the source code of this file.
Data Structures | |
struct | BiosLinkerLoaderEntry |
Macros | |
#define | FW_CFG_PORT_CTL 0x0510 |
#define | FW_CFG_PORT_DATA 0x0511 |
#define | FW_CFG_DMA_ADDR_HIGH 0x0514 |
#define | FW_CFG_DMA_ADDR_LOW 0x0518 |
#define | BIOS_LINKER_LOADER_FILESZ 56 |
Typedefs | |
typedef struct BiosLinkerLoaderEntry | BiosLinkerLoaderEntry |
Enumerations | |
enum | { BIOS_LINKER_LOADER_COMMAND_ALLOCATE = 0x1 , BIOS_LINKER_LOADER_COMMAND_ADD_POINTER = 0x2 , BIOS_LINKER_LOADER_COMMAND_ADD_CHECKSUM = 0x3 } |
enum | { BIOS_LINKER_LOADER_ALLOC_ZONE_HIGH = 0x1 , BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG = 0x2 } |
Variables | |
static int | fw_cfg_detected |
static uint8_t | fw_ver |
struct BiosLinkerLoaderEntry | __packed |
static const char * | type1_manufacturer |
static const char * | type1_product_name |
static const char * | type1_version |
static const char * | type1_serial_number |
static const char * | type1_family |
static u8 | type1_uuid [16] |
typedef struct BiosLinkerLoaderEntry BiosLinkerLoaderEntry |
anonymous enum |
anonymous enum |
Definition at line 226 of file fw_cfg.c.
References acpi_checksum(), ALIGN, BiosLinkerLoaderEntry::alloc, BIOS_DEBUG, BIOS_LINKER_LOADER_COMMAND_ADD_CHECKSUM, BIOS_LINKER_LOADER_COMMAND_ADD_POINTER, BIOS_LINKER_LOADER_COMMAND_ALLOCATE, BiosLinkerLoaderEntry::cksum, BiosLinkerLoaderEntry::command, free(), fw_cfg_check_file(), fw_cfg_get(), malloc(), BiosLinkerLoaderEntry::pointer, printk, read_le32(), read_le64(), s, FWCfgFile::select, FWCfgFile::size, BiosLinkerLoaderEntry::start, strcmp(), write_le32(), write_le64(), and write_le8().
int fw_cfg_check_file | ( | FWCfgFile * | file, |
const char * | name | ||
) |
Definition at line 85 of file fw_cfg.c.
References fw_cfg_find_file(), fw_cfg_present(), and name.
Referenced by cpu_pci_domain_read_resources(), fw_cfg_acpi_tables(), fw_cfg_smbios_tables(), and get_recovery_mode_switch().
Definition at line 512 of file fw_cfg.c.
References buf, dma, FW_CFG_DMA_ADDR_HIGH, FW_CFG_DMA_ADDR_LOW, FW_CFG_DMA_CTL_ERROR, and outl().
Referenced by fw_cfg_read().
|
static |
Definition at line 103 of file fw_cfg.c.
References fw_cfg_read().
Referenced by fw_cfg_tolud().
|
static |
Definition at line 92 of file fw_cfg.c.
References fw_cfg_find_file(), fw_cfg_present(), and fw_cfg_select().
Referenced by fw_cfg_tolud().
|
static |
Definition at line 64 of file fw_cfg.c.
References BIOS_INFO, count, FW_CFG_FILE_DIR, fw_cfg_read(), fw_cfg_select(), name, printk, and strcmp().
Referenced by fw_cfg_check_file(), and fw_cfg_e820_select().
Definition at line 58 of file fw_cfg.c.
References fw_cfg_read(), and fw_cfg_select().
Referenced by cpu_pci_domain_read_resources(), fw_cfg_acpi_tables(), fw_cfg_present(), fw_cfg_smbios_init(), fw_cfg_smbios_tables(), and get_recovery_mode_switch().
|
static |
Definition at line 25 of file fw_cfg.c.
References BIOS_INFO, fw_cfg_detected, fw_cfg_get(), FW_CFG_ID, FW_CFG_SIG_SIZE, FW_CFG_SIGNATURE, fw_ver, memcmp(), and printk.
Referenced by fw_cfg_check_file(), and fw_cfg_e820_select().
Definition at line 50 of file fw_cfg.c.
References fw_cfg_dma(), FW_CFG_DMA_CTL_READ, FW_CFG_PORT_DATA, FW_CFG_VERSION_DMA, fw_ver, and insb().
Referenced by fw_cfg_e820_read(), fw_cfg_find_file(), and fw_cfg_get().
Definition at line 45 of file fw_cfg.c.
References FW_CFG_PORT_CTL, and outw().
Referenced by fw_cfg_e820_select(), fw_cfg_find_file(), and fw_cfg_get().
Definition at line 351 of file fw_cfg.c.
References buf, count, FwCfgSmbios::fieldoffset, free(), fw_cfg_get(), FW_CFG_PORT_DATA, FW_CFG_SMBIOS_ENTRIES, FwCfgSmbios::headertype, insb(), FwCfgSmbios::length, malloc(), memcpy(), offsetof, SMBIOS_FIELD_ENTRY, strdup(), FwCfgSmbios::tabletype, type1_family, type1_manufacturer, type1_product_name, type1_serial_number, type1_uuid, type1_version, and version.
Referenced by smbios_mainboard_manufacturer(), smbios_mainboard_product_name(), smbios_mainboard_serial_number(), smbios_mainboard_version(), and smbios_system_set_uuid().
Definition at line 424 of file fw_cfg.c.
References BIOS_DEBUG, count, fw_cfg_check_file(), fw_cfg_get(), smbios_header::handle, header, printk, FWCfgFile::select, FWCfgFile::size, SMBIOS_BIOS_INFORMATION, SMBIOS_END_OF_TABLE, smbios_next(), and strcmp().
Definition at line 115 of file fw_cfg.c.
References FwCfgE820Entry::address, fw_cfg_e820_read(), fw_cfg_e820_select(), FwCfgE820Entry::length, and FwCfgE820Entry::type.
Referenced by cbmem_top_chipset().
const char* smbios_mainboard_manufacturer | ( | void | ) |
Definition at line 478 of file fw_cfg.c.
References fw_cfg_smbios_init(), and type1_manufacturer.
const char* smbios_mainboard_product_name | ( | void | ) |
Definition at line 484 of file fw_cfg.c.
References fw_cfg_smbios_init(), and type1_product_name.
const char* smbios_mainboard_serial_number | ( | void | ) |
Definition at line 496 of file fw_cfg.c.
References fw_cfg_smbios_init(), and type1_serial_number.
const char* smbios_mainboard_version | ( | void | ) |
Definition at line 490 of file fw_cfg.c.
References fw_cfg_smbios_init(), and type1_version.
Definition at line 502 of file fw_cfg.c.
References fw_cfg_smbios_init(), memcpy(), and type1_uuid.
struct BiosLinkerLoaderEntry __packed |
|
static |
Definition at line 20 of file fw_cfg.c.
Referenced by fw_cfg_present().
|
static |
Definition at line 21 of file fw_cfg.c.
Referenced by cse_get_sub_part_fw_version(), cse_sub_part_get_source_fw_version(), fw_cfg_present(), and fw_cfg_read().
|
static |
Definition at line 348 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init().
|
static |
Definition at line 344 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init(), and smbios_mainboard_manufacturer().
|
static |
Definition at line 345 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init(), and smbios_mainboard_product_name().
|
static |
Definition at line 347 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init(), and smbios_mainboard_serial_number().
|
static |
Definition at line 349 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init(), and smbios_system_set_uuid().
|
static |
Definition at line 346 of file fw_cfg.c.
Referenced by fw_cfg_smbios_init(), and smbios_mainboard_version().