70static void fb_putc(
int row,
int col,
char c)
76 for (
int i = 0; i < 16; ++i) {
77 for (
int j = 0; j < 8; ++j) {
80 if (
font_8x16[(
unsigned) c * 16 + i] & (1 << (7 - j)))
103 if ((
unsigned) c < 128) {
static void earlycon_fb_scroll(int n)
Scrolls the screen up by n lines of text, clearing the bottom.
static int earlycon_fb_putc(char c)
Writes a character at the cursor, scrolling when it goes past the last line.
static void fb_putc(int row, int col, char c)
Draws a character at a row and a column of text.
static void earlycon_fb_init()
Maps the framebuffer in the kernel's address space, and sizes the text screen from its resolution.
static int earlycon_fb_puts(char *s)
Writes a string.
static uintptr_t fb_paddr
static uint32_t fb_scanline
static struct vm_entry fb_vmr
void earlycon_fb_register(uintptr_t paddr, uint32_t scanline, uint32_t yres, uint32_t xres, uint32_t depth)
Registers the boot loader's framebuffer, for the early console.
#define ARCH_EARLYFB_BASE
8x16 font, the characters of code page 437 in order: generated by mkfont.py from unscii-16 by Viznut ...
const unsigned char font_8x16[256 *16]
int earlycon_fb_available(void)
Says whether the boot loader's framebuffer can be the early console.
struct earlycon earlycon_fb
void * memmove(void *dst, const void *src, size_t n)
Copies n bytes; dst and src may overlap.
void * memset(void *dst, int c, size_t n)
Sets n bytes to c.
An early console's operations.
A mapping (map entry): a range of an address space, its permissions, and where its pages come from.
uint32_t flags
its permissions and flags (VM_*)
paddr_t paddr
physical memory to map all at once (vm_map()), or 0 for pages that come in on page faults
vaddr_t base
where the mapping starts in its address space
An arena: a range, and its segments.
int vm_map(struct vm_space *vm_space, struct vm_entry *vm_entry)
Maps a map entry's whole range at once: its physical memory (paddr), or new pages of memory if it has...
struct vm_space kvm_space
#define VM_KRW
kernel read/write