Québec, Canada
Software tamer
From Simon Zeni to ~sircmpwn/helios-devel
Hello there, I have a few questions regarding implementing EFI support. What is the content of the `mods` field? Should it be only the content of the `modules` folder, or should it includes the kernel file in the first entry, then the content of the `modules` folder sorted? If I understand multiboot correctly, the "boot modules" are just any file specified to the bootloader in that specific order. From the README.md file > Additional boot modules are loaded from /modules/\* in alphabetical order; > the first one should be the init program.
From Simon Zeni to ~sircmpwn/helios-devel
--- Makefile | 3 ++- include/modules.h | 12 +++++++++ src/main.c | 14 ++++++++++ src/modules.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 include/modules.h create mode 100644 src/modules.c diff --git a/Makefile b/Makefile index 6c7db18..39a4de2 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ BOOT_OBJ=\ [message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
--- include/fs.h | 1 + src/fs.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/fs.h b/include/fs.h index 945ec94..ed8758b 100644 --- a/include/fs.h +++ b/include/fs.h @@ -10,5 +10,6 @@ efi_file_protocol *open(char16_t *filename, uint64_t mode, uint64_t attrs); size_t read(efi_file_protocol *f, void *buf, size_t n); void seek(efi_file_protocol *f, uint64_t pos); void close(efi_file_protocol *f); const efi_file_info *readdir(efi_file_protocol *file);[message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
--- include/wstr.h | 1 + src/wstr.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/wstr.h b/include/wstr.h index aea8dcc..229facc 100644 --- a/include/wstr.h +++ b/include/wstr.h @@ -5,5 +5,6 @@ char16_t *wconv(const char *str, char16_t *buf, size_t n); char *conv(const char16_t *str, char *buf, size_t n); int wstrcmp(const char16_t *str1, const char16_t *str2);[message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
--- include/wstr.h | 2 ++ src/wstr.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/include/wstr.h b/include/wstr.h index 13f11c6..aea8dcc 100644 --- a/include/wstr.h +++ b/include/wstr.h @@ -1,7 +1,9 @@ #ifndef WSTR_H #define WSTR_H #include <efi/types.h> // for char16_t [message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
For a reason that is yet to be found, calling the `init_mmu` function before ExitBootServices causes a GP fault on kernel entry on Intel. Moving the function call past ExitBootServices fixes the issue on Intel, and doesn't change anything on AMD. --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 164df5d..3e132bc 100644 --- a/src/main.c +++ b/src/main.c @@ -55,11 +55,11 @@ efi_main(efi_handle image, efi_system_table *systab) [message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
The bit is ignored in the PDPE, but must be set to 0 on the PML4E otherwise a general-protection fault is produced. --- src/mmu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mmu.c b/src/mmu.c index 829f6c2..6811143 100644 --- a/src/mmu.c +++ b/src/mmu.c @@ -10,9 +10,9 @@ #define IDENT_START 0xFFFFFF8000000000 #define IDENT_SIZE IDENT_PDS * 1024 * 1024 * 1024 [message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6442515..e72f1b0 100644 --- a/Makefile +++ b/Makefile @@ -47,13 +47,13 @@ nographic: boot.img -m 1G -no-reboot -no-shutdown \ -drive file=boot.img,format=raw \ -display none \ -serial stdio -enable-kvm -serial stdio[message trimmed]
From Simon Zeni to ~sircmpwn/helios-devel
--- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 164df5d..3e132bc 100644 --- a/src/main.c +++ b/src/main.c @@ -55,11 +55,11 @@ efi_main(efi_handle image, efi_system_table *systab) close(kernel); init_mmu(); [message trimmed]
From Simon Zeni to ~bl4ckb0ne/kaiju-dev
Thanks! Applied in 221ce6d