Files
mango/kexts/drivers/tty/serialcon/include/socks/serialcon.h
Max Wash b0c021d4e9 kernel: add kernel.early-console and kernel.console boot args
kernel.early-console is used to specify which output device the
kernel boot log should be written to. the first thing the kernel
does on boot after initialising the bootstrap processor is initialise
the early console, making it useful for debugging problems that
occur early in the boot process. this arg accepts a list of hard-coded
values for output devices, such as tty0 for the display or ttyS0
for the serial port. the exact values supported will depend on the
platform.

once all drivers are loaded, the kernel switches to the device specified
by kernel.console for output. unlike kernel.early-console, this arg
specifies the name of a tty device in /dev/tty. this means that, not
only are more devices supported (any device provided by a tty driver),
but the kernel can also get input from the user using this console too
(not used by the kernel itself, but will be used by the user to interact
with userspace programs, like the shell).
2023-12-30 09:09:18 +00:00

28 lines
498 B
C

#ifndef ARCH_SERIAL_H_
#define ARCH_SERIAL_H_
#ifdef __cplusplus
extern "C" {
#endif
#define SERIAL_PORT_A 0x3F8
#define SERIAL_PORT_B 0x2F8
#define SERIAL_PORT_C 0x3E8
#define SERIAL_PORT_D 0x2E8
extern void serial_putchar(int port, char ch);
extern void serial_wait(int device);
extern void serial_send_byte(int device, char out);
extern char serial_recv_byte(int device);
extern int serial_rcvd(int device);
extern void early_serialcon_init(int baud);
#ifdef __cplusplus
}
#endif
#endif