AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
earlycon.h
Go to the documentation of this file.
1#ifndef _EARLY_CONSOLE_H
2#define _EARLY_CONSOLE_H
3
4/*
5 * The early console: where the kernel's messages go from the first
6 * moment of boot, before any driver is up (the serial port, or the
7 * screen). Each architecture has its own (arch/ARCH/earlycon/).
8 */
9
11struct earlycon {
12 void (*init)(void);
13 int (*puts)(char *);
14 int (*putc)(char);
15};
16
18void earlycon_init(void);
19
22void earlycon_reinit(void);
23
30int earlycon_puts(char *s);
31
38int earlycon_putc(char c);
39
46int earlycon_on_screen(void);
47
48/* Stops writing the kernel's messages to the early console (core/printk.c). */
49void earlycon_disable(void);
50
51/* Registers a console that shows the kernel's messages from now on. */
52void printk_console(void (*write)(const char *s, size_t len));
53
54#endif
int earlycon_putc(char c)
Writes a character on the early console.
Definition earlycon.c:23
void earlycon_reinit(void)
Sets up the early console again, once the kernel's command line has been read, since it may choose an...
Definition earlycon.c:65
int earlycon_puts(char *s)
Writes a string on the early console.
Definition earlycon.c:38
void earlycon_init(void)
Sets up the early console at boot, before anything else.
Definition earlycon.c:59
int earlycon_on_screen(void)
Says whether the early console writes on the screen, rather than on a serial port.
Definition earlycon.c:52
void earlycon_disable()
Stops sending the kernel's messages to the early console, once a real console has taken over.
Definition printk.c:34
void printk_console(void(*write)(const char *s, size_t len))
Registers the console that the kernel's messages are written to, besides the message buffer.
Definition printk.c:47
An early console's operations.
Definition earlycon.h:11
void(*) init(void)
Definition earlycon.h:12
int(*) puts(char *)
Definition earlycon.h:13
int(*) putc(char)
Definition earlycon.h:14