Make stivale actually pass the command line to the kernel

This commit is contained in:
mintsuki 2020-03-31 10:48:24 +02:00
parent 6578b55c9f
commit 2ecd4a8016
4 changed files with 6 additions and 4 deletions

View File

@ -95,7 +95,7 @@ void main(int boot_drive) {
echfs_open(&f, drive, part, path);
if (!strcmp(proto, "stivale")) {
stivale_load(&f);
stivale_load(&f, cmdline);
} else if (!strcmp(proto, "qword")) {
echfs_read(&f, (void *)0x100000, 0, f.dir_entry.size);
// Boot the kernel.

View File

@ -40,7 +40,7 @@ struct stivale_struct {
struct stivale_struct stivale_struct = {0};
void stivale_load(struct echfs_file_handle *fd) {
void stivale_load(struct echfs_file_handle *fd, char *cmdline) {
uint64_t entry_point;
struct stivale_header stivale_hdr;
@ -117,6 +117,8 @@ void stivale_load(struct echfs_file_handle *fd) {
stivale_struct.rsdp = (uint64_t)(size_t)get_rsdp();
print("stivale: RSDP at %X\n", stivale_struct.rsdp);
stivale_struct.cmdline = (uint64_t)(size_t)cmdline;
stivale_struct.framebuffer_width = stivale_hdr.framebuffer_width;
stivale_struct.framebuffer_height = stivale_hdr.framebuffer_height;
stivale_struct.framebuffer_bpp = stivale_hdr.framebuffer_bpp;

View File

@ -3,6 +3,6 @@
#include <fs/echfs.h>
void stivale_load(struct echfs_file_handle *fd);
void stivale_load(struct echfs_file_handle *fd, char *cmdline);
#endif

View File

@ -1,4 +1,4 @@
TIMEOUT=0
TIMEOUT=3
KERNEL_PARTITION=0
KERNEL_PATH=test.elf