Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/efi/loader/bootinfo.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
#include <efi.h> | #include <efi.h> | ||||
#include <efilib.h> | #include <efilib.h> | ||||
#include "bootstrap.h" | #include "bootstrap.h" | ||||
#include "loader_efi.h" | #include "loader_efi.h" | ||||
#if defined(__amd64__) | #if defined(__amd64__) | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include "framebuffer.h" | |||||
#endif | #endif | ||||
#include "framebuffer.h" | |||||
#if defined(LOADER_FDT_SUPPORT) | #if defined(LOADER_FDT_SUPPORT) | ||||
#include <fdt_platform.h> | #include <fdt_platform.h> | ||||
#endif | #endif | ||||
int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); | int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); | ||||
extern EFI_SYSTEM_TABLE *ST; | extern EFI_SYSTEM_TABLE *ST; | ||||
▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | bi_load_efi_data(struct preloaded_file *kfp) | ||||
EFI_PHYSICAL_ADDRESS addr; | EFI_PHYSICAL_ADDRESS addr; | ||||
EFI_STATUS status; | EFI_STATUS status; | ||||
size_t efisz; | size_t efisz; | ||||
UINTN efi_mapkey; | UINTN efi_mapkey; | ||||
UINTN mmsz, pages, retry, sz; | UINTN mmsz, pages, retry, sz; | ||||
UINT32 mmver; | UINT32 mmver; | ||||
struct efi_map_header *efihdr; | struct efi_map_header *efihdr; | ||||
#if defined(__amd64__) | #if defined(__amd64__) || defined(__aarch64__) | ||||
struct efi_fb efifb; | struct efi_fb efifb; | ||||
if (efi_find_framebuffer(&efifb) == 0) { | if (efi_find_framebuffer(&efifb) == 0) { | ||||
printf("EFI framebuffer information:\n"); | printf("EFI framebuffer information:\n"); | ||||
printf("addr, size 0x%lx, 0x%lx\n", efifb.fb_addr, | printf("addr, size 0x%jx, 0x%jx\n", efifb.fb_addr, | ||||
efifb.fb_size); | efifb.fb_size); | ||||
printf("dimensions %d x %d\n", efifb.fb_width, | printf("dimensions %d x %d\n", efifb.fb_width, | ||||
efifb.fb_height); | efifb.fb_height); | ||||
printf("stride %d\n", efifb.fb_stride); | printf("stride %d\n", efifb.fb_stride); | ||||
printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", | printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", | ||||
efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, | efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, | ||||
efifb.fb_mask_reserved); | efifb.fb_mask_reserved); | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |