AquilaOS documentation
How it works, and its code
Toggle main menu visibility
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
11
struct
earlycon
{
12
void (*
init
)(void);
13
int (*
puts
)(
char
*);
14
int (*
putc
)(char);
15
};
16
18
void
earlycon_init
(
void
);
19
22
void
earlycon_reinit
(
void
);
23
30
int
earlycon_puts
(
char
*s);
31
38
int
earlycon_putc
(
char
c);
39
46
int
earlycon_on_screen
(
void
);
47
48
/* Stops writing the kernel's messages to the early console (core/printk.c). */
49
void
earlycon_disable
(
void
);
50
51
/* Registers a console that shows the kernel's messages from now on. */
52
void
printk_console
(
void
(*write)(
const
char
*s,
size_t
len));
53
54
#endif
earlycon_putc
int earlycon_putc(char c)
Writes a character on the early console.
Definition
earlycon.c:23
earlycon_reinit
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
earlycon_puts
int earlycon_puts(char *s)
Writes a string on the early console.
Definition
earlycon.c:38
earlycon_init
void earlycon_init(void)
Sets up the early console at boot, before anything else.
Definition
earlycon.c:59
earlycon_on_screen
int earlycon_on_screen(void)
Says whether the early console writes on the screen, rather than on a serial port.
Definition
earlycon.c:52
earlycon_disable
void earlycon_disable()
Stops sending the kernel's messages to the early console, once a real console has taken over.
Definition
printk.c:34
printk_console
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
earlycon
An early console's operations.
Definition
earlycon.h:11
earlycon::init
void(*) init(void)
Definition
earlycon.h:12
earlycon::puts
int(*) puts(char *)
Definition
earlycon.h:13
earlycon::putc
int(*) putc(char)
Definition
earlycon.h:14
kernel
include
console
earlycon.h
Generated by
1.18.0