boot: fix crash on early memory allocations

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-08-11 18:29:51 -04:00
commit 1d1dad34ce
10 changed files with 120 additions and 32 deletions

View file

@ -3,6 +3,21 @@
#define _TTY_H_
#include <kernel/device.h>
#include <kernel/proc.h>
#include <lib/ringbuf.h>
#define NCCS 20
typedef u32 tcflag_t;
typedef char cc_t;
struct termios {
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
cc_t c_cc[NCCS];
};
struct tty_serial_ops {
void (*serial_putchar)(struct tty *tty, char c);
@ -11,8 +26,12 @@ struct tty_serial_ops {
struct tty {
dev_t dev;
void *priv;
void *priv;
struct tty_serial_ops serial_ops;
struct ringbuf *input_buf;
struct ringbuf *output_buf;
pid_t fg_proc;
};
struct tty *tty_create(const char *name, void *priv);