diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -182,7 +182,7 @@ 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; diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c --- a/sys/dev/vt/hw/efifb/efifb.c +++ b/sys/dev/vt/hw/efifb/efifb.c @@ -96,9 +96,11 @@ { 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 @@ memattr = VM_MEMATTR_UNCACHEABLE; } } +#else + memattr = VM_MEMATTR_UNCACHEABLE; +#endif info = vd->vd_softc; if (info == NULL) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -140,6 +140,7 @@ # Console device vt +device vt_efifb device kbdmux # RTC diff --git a/sys/riscv/include/metadata.h b/sys/riscv/include/metadata.h --- a/sys/riscv/include/metadata.h +++ b/sys/riscv/include/metadata.h @@ -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;