From a8a4f0710210ed91097a30fc26308c50be73d4de Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Tue, 9 Oct 2018 23:11:46 +1100 Subject: Added the f_inode element to struct file as a pointer to the file's inode in memory. Added a jump instruction in front of the multiboot header so that the kernel may be run as a binary image. The jump instruction will skip over the multiboot header to the beginning of the kernel's startup procedure in kboot. Moved the call to initialize the timer to earlier in the boot sequence. This is to allow for some drivers that may require it's functionality during the startup to function properly. Added functionality for the 'fast-gate' to the enable_a20 subroutine. Now, if the keyboard controller method fails when enabling the gate, an attempt is made to enable the A20 gate using the PS/2's fast-gate interface. If this also fails, the kernel will panic. Implemented TTY output for the console. The console is now TTY device 0 (the default for new userspace programs). --- include/kernel/con.h | 4 ++++ include/kernel/fs.h | 2 +- include/kernel/hd.h | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include/kernel') diff --git a/include/kernel/con.h b/include/kernel/con.h index 9dd9dbe..6bc24da 100644 --- a/include/kernel/con.h +++ b/include/kernel/con.h @@ -7,6 +7,10 @@ #ifndef _CON_H #define _CON_H +#include + +extern struct tty_struct tty_con; + void con_init(void); void con_clear(void); diff --git a/include/kernel/fs.h b/include/kernel/fs.h index a2b0086..a752ddf 100644 --- a/include/kernel/fs.h +++ b/include/kernel/fs.h @@ -15,7 +15,7 @@ struct file { uint16_t f_mode; uint16_t f_flags; - /* TODO: inode pointer here */ + struct m_inode *f_inode; off_t f_pos; }; diff --git a/include/kernel/hd.h b/include/kernel/hd.h index 2a2f3c6..7244c92 100644 --- a/include/kernel/hd.h +++ b/include/kernel/hd.h @@ -1,7 +1,6 @@ #ifndef _HD_H #define _HD_H -#include #include void hd_init(void); -- cgit v1.3