Turnstone Operating System
|
EFI entry point. More...
#include "setup.h"
#include <strings.h>
#include <linker.h>
#include <systeminfo.h>
#include <cpu.h>
#include <cpu/sync.h>
#include <buffer.h>
#include <data.h>
#include <zpack.h>
#include <xxhash.h>
#include <tosdb/tosdb.h>
#include <memory/paging.h>
#include <memory/frame.h>
#include <stdbufs.h>
#include <random.h>
Classes | |
struct | efi_tosdb_context_t |
EFI tosdb context. More... | |
Typedefs | |
typedef int8_t(* | kernel_start_t) (system_info_t *sysinfo) |
kernel start function type More... | |
typedef struct efi_tosdb_context_t | efi_tosdb_context_t |
typedef for efi_tosdb_context_t | |
Functions | |
MODULE ("turnstone.efi") | |
efi_status_t | efi_setup_heap (void) |
setup EFI heap More... | |
efi_status_t | efi_setup_graphics (video_frame_buffer_t **vfb_res) |
setup EFI graphics More... | |
efi_status_t | efi_print_variable_names (void) |
prints efi variable names. More... | |
efi_status_t | efi_is_pxe_boot (boolean_t *result) |
check is current boot is PXE boot. More... | |
EFIAPI efi_status_t | efi_main (efi_handle_t image, efi_system_table_t *system_table) |
EFI main function. More... | |
efi_status_t | efi_open_local_tosdb (efi_block_io_t *bio, efi_tosdb_context_t **tdb_ctx) |
helper function for local tosdb loading More... | |
efi_status_t | efi_load_local_tosdb (efi_tosdb_context_t **tdb_ctx) |
loads tosdb from disk if current boot is not PXE boot. More... | |
efi_status_t | efi_load_pxe_tosdb (efi_tosdb_context_t **tdb_ctx) |
loads tosdb from PXE if current boot is PXE boot. More... | |
efi_status_t | efi_tosdb_read_config (efi_tosdb_context_t *tdb_ctx, const char_t *config_key, void **config_value) |
reads config value for system from tosdb. More... | |
Variables | |
efi_system_table_t * | ST |
efi_boot_services_t * | BS |
efi_runtime_services_t * | RS |
EFI entry point.
This file contains EFI entry point and other EFI related methods.
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
kernel_start_t |
kernel start function type
this function is called by EFI entry point to start kernel.
[in] | sysinfo | system information |
efi_status_t efi_is_pxe_boot | ( | boolean_t * | result | ) |
check is current boot is PXE boot.
for checking PXE boot, this method checks if EFI variable "BootCurrent" contains mac address.
[out] | result | true if current boot is PXE boot, false otherwise. |
efi_status_t efi_load_local_tosdb | ( | efi_tosdb_context_t ** | tdb_ctx | ) |
loads tosdb from disk if current boot is not PXE boot.
[out] | tdb_ctx | tosdb context |
efi_status_t efi_load_pxe_tosdb | ( | efi_tosdb_context_t ** | tdb_ctx | ) |
loads tosdb from PXE if current boot is PXE boot.
[out] | tdb_ctx | tosdb context |
EFIAPI efi_status_t efi_main | ( | efi_handle_t | image, |
efi_system_table_t * | system_table | ||
) |
EFI main function.
this function is called by EFI entry point. Also this function should be EFIAPI because of EFI calling convention.
[in] | image | image handle |
[in] | system_table | system table |
efi_status_t efi_open_local_tosdb | ( | efi_block_io_t * | bio, |
efi_tosdb_context_t ** | tdb_ctx | ||
) |
helper function for local tosdb loading
[in] | bio | block io interface |
[out] | tdb_ctx | tosdb context |
efi_status_t efi_print_variable_names | ( | void | ) |
prints efi variable names.
efi_status_t efi_setup_graphics | ( | video_frame_buffer_t ** | vfb_res | ) |
setup EFI graphics
this method sets up graphics mode and returns video frame buffer. Min resolution is 1092x1080.
[out] | vfb_res | video frame buffer |
efi_status_t efi_setup_heap | ( | void | ) |
setup EFI heap
efi_status_t efi_tosdb_read_config | ( | efi_tosdb_context_t * | tdb_ctx, |
const char_t * | config_key, | ||
void ** | config_value | ||
) |
reads config value for system from tosdb.
[in] | tdb_ctx | tosdb context |
[in] | config_key | config key |
[out] | config_value | config value |
MODULE | ( | "turnstone.efi" | ) |
module name
EFI boot services global variable
EFI runtime services global variable
EFI system table global variable