mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
riscv: enable EFI framebuffer
Pass framebuffer information from loader(8) to the kernel via the MODINFOMD_EFI_FB metadata field. Enable the vt_efifb driver. A small tweak is required to work around the lack of VM_MEMATTR_WRITE_COMBINING on this platform; we use VM_MEMATTR_UNCACHEABLE instead. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48884
This commit is contained in:
parent
a2e2178402
commit
e2a08ac9ce
4 changed files with 10 additions and 3 deletions
|
|
@ -182,7 +182,7 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs)
|
|||
struct efi_map_header *efihdr;
|
||||
bool do_vmap;
|
||||
|
||||
#if defined(__amd64__) || defined(__aarch64__) || defined(__i386__)
|
||||
#ifdef MODINFOMD_EFI_FB
|
||||
struct efi_fb efifb;
|
||||
|
||||
efifb.fb_addr = gfx_state.tg_fb.fb_addr;
|
||||
|
|
|
|||
|
|
@ -96,9 +96,11 @@ vt_efifb_init(struct vt_device *vd)
|
|||
{
|
||||
struct fb_info *info;
|
||||
struct efi_fb *efifb;
|
||||
int memattr;
|
||||
vm_memattr_t memattr;
|
||||
int roff, goff, boff;
|
||||
char attr[16];
|
||||
|
||||
#ifdef VM_MEMATTR_WRITE_COMBINING
|
||||
char attr[16];
|
||||
|
||||
/*
|
||||
* XXX TODO: I think there's more nuance here than we're acknowledging,
|
||||
|
|
@ -122,6 +124,9 @@ vt_efifb_init(struct vt_device *vd)
|
|||
memattr = VM_MEMATTR_UNCACHEABLE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
memattr = VM_MEMATTR_UNCACHEABLE;
|
||||
#endif
|
||||
|
||||
info = vd->vd_softc;
|
||||
if (info == NULL)
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ device uart_ns8250 # ns8250-type UART driver
|
|||
|
||||
# Console
|
||||
device vt
|
||||
device vt_efifb
|
||||
device kbdmux
|
||||
|
||||
# RTC
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#define MODINFOMD_DTBP 0x1001
|
||||
#define MODINFOMD_EFI_MAP 0x1002
|
||||
#define MODINFOMD_EFI_FB 0x1003
|
||||
|
||||
struct efi_map_header {
|
||||
size_t memory_size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue