diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-11 19:04:26 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-11 19:04:26 -0400 |
commit | f466364b8a3858e7b3f19258d142851cb4a7e6d6 (patch) | |
tree | a22819dc585c44a6dd0cdd5c6856420443a031eb /device | |
parent | c4f8ef91f18d854a4ede7a94e95b2eab898d6963 (diff) | |
download | jove-kernel-main.tar.gz jove-kernel-main.tar.bz2 jove-kernel-main.zip |
remove _initData, replace with enum indexesmain
Diffstat (limited to 'device')
-rw-r--r-- | device/initrd.c | 5 | ||||
-rw-r--r-- | device/portio_uart.c | 4 | ||||
-rw-r--r-- | device/uart.c | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/device/initrd.c b/device/initrd.c index 1a04338..b2e615e 100644 --- a/device/initrd.c +++ b/device/initrd.c @@ -87,13 +87,10 @@ initrd_setup(void) klogf("Initrd found at %p\n", initrd_addr); tar_parse((tar_block_t*)initrd_addr); - size_t initrd_diri = _initDirectory.self.data++; - _initDirectory.entries[initrd_diri] = (objdir_entry_t) { + _initDirectory.entries[INIT_OBJECT_INITRD_DIR] = (objdir_entry_t) { .type = KO_OBJECT_DIRECTORY, .data = (uintptr_t)&s_initrd_dir }; - //Add initrd dir to init object - _initData.initrd_dir = initrd_diri; } int diff --git a/device/portio_uart.c b/device/portio_uart.c index 00800b5..58314d5 100644 --- a/device/portio_uart.c +++ b/device/portio_uart.c @@ -49,12 +49,10 @@ portio_uart_setup(void) s_set_fcr(PORTIO_UART_COM1, 1 | 2 | 8); s_set_mcr(PORTIO_UART_COM1, 1 | 2 | 4 | 8); - uint64_t serial_i = _initDirectory.self.data++; - _initDirectory.entries[serial_i] = (struct jove_ObjectDirectoryEntry) { + _initDirectory.entries[INIT_OBJECT_LOG] = (struct jove_ObjectDirectoryEntry) { .type = KO_DEV_UART, .data = PORTIO_UART_COM1 }; - _initData.log_object = serial_i; } void diff --git a/device/uart.c b/device/uart.c index 5c65207..0a8945d 100644 --- a/device/uart.c +++ b/device/uart.c @@ -3,9 +3,9 @@ #include "object.h" void -uart_write(objdir_t *dir, path_byte_t *path, const char *s, size_t w) +uart_write(objdir_t *dir, size_t pathw, path_byte_t *path, const char *s, size_t w) { - objdir_entry_t *entry = objdir_seek(dir, path, 1); + objdir_entry_t *entry = objdir_seek(dir, path, pathw); if(entry == NULL || entry->type != KO_DEV_UART) return; #ifdef ENABLE_PORTIO_UART |