coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/bsd/compression.h>
#include <commonlib/endian.h>
#include <console/console.h>
#include <string.h>
#include <symbols.h>
#include <cbfs.h>
#include <lib.h>
#include <bootmem.h>
#include <program_loading.h>
#include <timestamp.h>
#include <cbmem.h>
#include <types.h>
Go to the source code of this file.
Typedefs | |
typedef int(* | checker_t) (struct cbfs_payload_segment *cbfssegs, void *args) |
Functions | |
static void | cbfs_decode_payload_segment (struct cbfs_payload_segment *segment, const struct cbfs_payload_segment *src) |
static int | segment_targets_type (void *dest, unsigned long memsz, enum bootmem_type dest_type) |
static int | load_one_segment (uint8_t *dest, uint8_t *src, size_t len, size_t memsz, uint32_t compression, int flags) |
static int | last_loadable_segment (struct cbfs_payload_segment *seg) |
static int | check_payload_segments (struct cbfs_payload_segment *cbfssegs, enum bootmem_type dest_type) |
static int | load_payload_segments (struct cbfs_payload_segment *cbfssegs, uintptr_t *entry) |
__weak int | payload_arch_usable_ram_quirk (uint64_t start, uint64_t size) |
bool | selfload_mapped (struct prog *payload, void *mapping, enum bootmem_type dest_type) |
bool | selfload_check (struct prog *payload, enum bootmem_type dest_type) |
bool | selfload (struct prog *payload) |
typedef int(* checker_t) (struct cbfs_payload_segment *cbfssegs, void *args) |
Definition at line 17 of file selfboot.c.
|
static |
Definition at line 22 of file selfboot.c.
References cbfs_payload_segment::compression, cbfs_payload_segment::len, cbfs_payload_segment::load_addr, cbfs_payload_segment::mem_len, cbfs_payload_segment::offset, read_be32(), read_be64(), and cbfs_payload_segment::type.
Referenced by check_payload_segments(), and load_payload_segments().
|
static |
Definition at line 135 of file selfboot.c.
References BIOS_DEBUG, BM_MEM_INVALID, cbfs_decode_payload_segment(), cbfs_payload_segment::load_addr, cbfs_payload_segment::mem_len, PAYLOAD_SEGMENT_ENTRY, printk, segment_targets_type(), and cbfs_payload_segment::type.
Referenced by selfload_mapped().
|
static |
Definition at line 130 of file selfboot.c.
References PAYLOAD_SEGMENT_ENTRY, read_be32(), and type.
Referenced by load_payload_segments().
|
static |
Definition at line 56 of file selfboot.c.
References BIOS_DEBUG, BIOS_INFO, BIOS_SPEW, CBFS_COMPRESS_LZ4, CBFS_COMPRESS_LZMA, CBFS_COMPRESS_NONE, cbfs_payload_segment::compression, cbfs_payload_segment::len, memcpy(), memset(), printk, prog_segment_loaded(), timestamp_add_now(), TS_ULZ4F_END, TS_ULZ4F_START, TS_ULZMA_END, TS_ULZMA_START, ulz4fn(), and ulzman().
Referenced by load_payload_segments().
|
static |
Definition at line 159 of file selfboot.c.
References BIOS_DEBUG, BIOS_EMERG, CBFS_COMPRESS_NONE, cbfs_decode_payload_segment(), cbfs_payload_segment::compression, last_loadable_segment(), cbfs_payload_segment::len, cbfs_payload_segment::load_addr, load_one_segment(), cbfs_payload_segment::mem_len, cbfs_payload_segment::offset, PAYLOAD_SEGMENT_BSS, PAYLOAD_SEGMENT_CODE, PAYLOAD_SEGMENT_DATA, PAYLOAD_SEGMENT_ENTRY, printk, SEG_FINAL, and cbfs_payload_segment::type.
Referenced by selfload_mapped().
Definition at line 232 of file selfboot.c.
Referenced by segment_targets_type().
|
static |
Definition at line 33 of file selfboot.c.
References BIOS_ERR, bootmem_dump_ranges(), bootmem_region_targets_type(), ENV_RAMSTAGE, payload_arch_usable_ram_quirk(), and printk.
Referenced by check_payload_segments().
Definition at line 275 of file selfboot.c.
References BM_MEM_INVALID, and selfload_check().
Referenced by aop_fw_load_reset(), cpucp_fw_load_reset(), and shrm_fw_load_reset().
bool selfload_check | ( | struct prog * | payload, |
enum bootmem_type | dest_type | ||
) |
Definition at line 259 of file selfboot.c.
References prog::cbfs_type, cbfs_type_map(), CBFS_TYPE_SELF, cbfs_unmap(), NULL, prog_locate_hook(), prog_name(), and selfload_mapped().
Referenced by arch_prog_run(), run_bl31(), and selfload().
bool selfload_mapped | ( | struct prog * | payload, |
void * | mapping, | ||
enum bootmem_type | dest_type | ||
) |
Definition at line 237 of file selfboot.c.
References BIOS_SPEW, cbmem_find(), CBMEM_ID_CBTABLE, check_payload_segments(), load_payload_segments(), printk, and prog_set_entry().
Referenced by selfload_check().