17 #ifndef SIMPLEKERNEL_LOAD_ELF_H
18 #define SIMPLEKERNEL_LOAD_ELF_H
66 EFI_GRAPHICS_PIXEL_FORMAT _format = PixelBlueGreenRedReserved8BitPerColor,
81 EFI_GRAPHICS_OUTPUT_PROTOCOL *
gop =
nullptr;
137 explicit Elf(
wchar_t *_kernel_image_filename);
161 auto
load() const -> uintptr_t;
177 std::span<Elf64_Phdr>
phdr = {};
178 std::span<Elf64_Shdr>
shdr = {};
Elf(wchar_t *_kernel_image_filename)
auto operator=(const Elf &) -> Elf &=delete
auto check_elf_identity() const -> bool
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * file_system_protocol
void load_sections(const Elf64_Phdr &_phdr) const
auto get_file_size() const -> size_t
EFI_FILE * root_file_system
size_t elf_file_size
elf 文件大小
void load_program_sections() const
std::span< Elf64_Phdr > phdr
void * elf_file_buffer
elf 文件内容缓冲区
std::span< Elf64_Shdr > shdr
auto load_kernel_image() const -> uint64_t
std::array< uint8_t, SECTION_BUF_SIZE > shstrtab_buf
shstrtab 缓冲
auto operator=(Elf &&) -> Elf &=delete
auto load() const -> uintptr_t
std::span< uint8_t > file
elf 文件访问
static constexpr const size_t SECTION_BUF_SIZE
section 缓冲区大小
static constexpr const uint32_t DEFAULT_HEIGHT
void set_mode(EFI_GRAPHICS_PIXEL_FORMAT _format=PixelBlueGreenRedReserved8BitPerColor, uint32_t _width=DEFAULT_WIDTH, uint32_t _height=DEFAULT_HEIGHT) const
EFI_GRAPHICS_OUTPUT_PROTOCOL * gop
auto operator=(Graphics &&) -> Graphics &=delete
Graphics(const Graphics &)=delete
Graphics(Graphics &&)=delete
auto operator=(const Graphics &) -> Graphics &=delete
static constexpr const uint32_t DEFAULT_WIDTH
auto operator=(Memory &&) -> Memory &=delete
EFI_MEMORY_DESCRIPTOR * memory_map
Memory(const Memory &)=delete
auto operator=(const Memory &) -> Memory &=delete