diff options
author | Marvin Borner | 2019-11-30 21:07:22 +0100 |
---|---|---|
committer | Marvin Borner | 2019-11-30 21:07:22 +0100 |
commit | 50f949d994c33ab23d63bdb9e8a438560ab0b4c4 (patch) | |
tree | 35089087979bd8cee4693c71264b1c537336e4dd | |
parent | ac947d45c288f62e927895afe7cd6a722ffdd8f8 (diff) |
Working userspace!
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/kernel/boot.asm | 12 | ||||
-rw-r--r-- | src/kernel/fs/install.c | 14 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.asm | 12 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.c | 21 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.h | 4 | ||||
-rw-r--r-- | src/kernel/graphics/font.c | 2 | ||||
-rw-r--r-- | src/kernel/interrupts/idt.asm | 35 | ||||
-rw-r--r-- | src/kernel/interrupts/idt.c | 16 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.asm | 337 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c | 4 | ||||
-rw-r--r-- | src/kernel/kernel.c | 19 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_write.c | 9 | ||||
-rw-r--r-- | src/kernel/syscall/syscall.c | 45 | ||||
-rw-r--r-- | src/kernel/syscall/syscall.h | 35 | ||||
-rw-r--r-- | src/kernel/system.c | 1 | ||||
-rw-r--r-- | src/userspace/main.asm | 12 | ||||
-rw-r--r-- | src/userspace/main.c | 6 |
18 files changed, 196 insertions, 391 deletions
@@ -19,7 +19,7 @@ build: clean nasm -f elf ./src/kernel/boot.asm -o ./build/boot.o || exit; \ # Make all C files - find ./src/kernel/ ./src/userspace/ ./src/mlibc/ -name \*.c >./build/tmp; \ + find ./src/kernel/ ./src/mlibc/ -name \*.c >./build/tmp; \ while read -r line; do \ stripped=$$(echo "$${line}" | sed -r 's/\//_/g'); \ stripped=$${stripped#??????}; \ @@ -40,6 +40,7 @@ build: clean nasm ./src/bootloader/cd.asm -f bin -o ./iso/boot/cd.bin || exit; \ nasm ./src/bootloader/hdd1.asm -f bin -o ./iso/boot/hdd1.bin || exit; \ nasm ./src/bootloader/hdd2.asm -f bin -o ./iso/boot/hdd2.bin || exit; \ + nasm ./src/userspace/main.asm -f bin -o ./iso/user.bin || exit; \ cp ./build/font.bin ./iso/font.bin || exit; \ genisoimage -quiet -input-charset utf-8 -no-emul-boot -b boot/cd.bin -o ./build/melvix.iso ./iso; diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm index 28e3c38..fc5a859 100644 --- a/src/kernel/boot.asm +++ b/src/kernel/boot.asm @@ -36,10 +36,10 @@ section .text %include "src/kernel/interact.asm" - global switch_to_user - extern test_user - switch_to_user: - sti + global jump_userspace + jump_userspace: + mov ebx, dword [esp+4] + mov ax, 0x23 mov ds, ax mov es, ax @@ -50,8 +50,10 @@ section .text push 0x23 push eax pushf + push 0x1B - push test_user + push ebx + mov ebp, ebx iret section .end_section diff --git a/src/kernel/fs/install.c b/src/kernel/fs/install.c index 4df1f7f..358bd98 100644 --- a/src/kernel/fs/install.c +++ b/src/kernel/fs/install.c @@ -50,7 +50,7 @@ void install_melvix() kfree(stage2_e); // Copy the kernel - info("Copying the kernel... "); + info("Copying the kernel..."); char *kernel_p[] = {"BOOT", "KERNEL.BIN"}; struct iso9660_entity *kernel_e = ISO9660_get(kernel_p, 2); if (!kernel_e) @@ -61,6 +61,17 @@ void install_melvix() kfree(kernel); kfree(kernel_e); + // Copy the userspace binary + info("Copying userspace... "); + char *userspace_p[] = {"USER.BIN"}; + struct iso9660_entity *userspace_e = ISO9660_get(userspace_p, 1); + if (!userspace_e) + panic("Userspace not found!"); + uint8_t *userspace = ISO9660_read(userspace_e); + marfs_new_file(userspace_e->length, userspace, 0, 0, 0); + kfree(userspace_e); + + // Copy the global font binary info("Copying font... "); char *font_p[] = {"FONT.BIN"}; struct iso9660_entity *font_e = ISO9660_get(font_p, 1); @@ -77,4 +88,5 @@ void install_melvix() serial_write("Installation successful!\nRebooting...\n"); timer_wait(200); acpi_poweroff(); + halt_loop(); }
\ No newline at end of file diff --git a/src/kernel/gdt/gdt.asm b/src/kernel/gdt/gdt.asm index 6cb2b7d..51ce444 100644 --- a/src/kernel/gdt/gdt.asm +++ b/src/kernel/gdt/gdt.asm @@ -9,12 +9,6 @@ gdt_flush: mov fs, ax mov gs, ax mov ss, ax - jmp 0x08:flush2 ; Code segment offset -flush2: - ret ; Returns to C code - -global tss_flush -tss_flush: - mov ax, 0x2B - ltr ax - ret
\ No newline at end of file + jmp 0x08:flush ; Code segment offset +flush: + ret ; Returns to C code
\ No newline at end of file diff --git a/src/kernel/gdt/gdt.c b/src/kernel/gdt/gdt.c index 70d5b7f..94ce06b 100644 --- a/src/kernel/gdt/gdt.c +++ b/src/kernel/gdt/gdt.c @@ -2,7 +2,7 @@ #include <kernel/gdt/gdt.h> #include <kernel/system.h> #include <kernel/lib/lib.h> -#include <kernel/io/io.h> +#include <mlibc/stdlib/liballoc.h> struct gdt_entry { unsigned short limit_low; @@ -55,8 +55,6 @@ struct tss_entry_struct tss_entry; extern void gdt_flush(); -extern void tss_flush(); - void gdt_set_gate(int32_t num, uint32_t base, uint32_t limit, uint8_t access, uint8_t gran) { // Set descriptor base address @@ -95,32 +93,31 @@ void gdt_install() gdt_set_gate(4, 0, 0xFFFFFFFF, 0xF2, 0xCF); // Write TSS - tss_write(5, 0x10, 0x0); + tss_write(5, 0x10); // Remove old GDT and install the new changes! gdt_flush(); - tss_flush(); vga_log("Installed Global Descriptor Table", 1); } -void tss_write(int32_t num, uint16_t ss0, uint32_t esp0) +void tss_write(int32_t num, uint16_t ss0) { uint32_t base = (uint32_t) &tss_entry; - uint32_t limit = base + sizeof(tss_entry); + uint32_t limit = base + sizeof(struct tss_entry_struct); gdt_set_gate(num, base, limit, 0xE9, 0x00); memset(&tss_entry, 0, sizeof(tss_entry)); tss_entry.ss0 = ss0; - tss_entry.esp0 = esp0; - + tss_entry.iomap_base = sizeof(struct tss_entry_struct); tss_entry.cs = 0x0b; tss_entry.ss = tss_entry.ds = tss_entry.es = tss_entry.fs = tss_entry.gs = 0x13; } -void set_kernel_stack(uint32_t stack) +void tss_flush(void) { - tss_entry.esp0 = stack; -} + tss_entry.esp0 = 4096 + (uint32_t) kmalloc(4096); + asm volatile ("ltr %%ax": : "a" (0x2A)); +}
\ No newline at end of file diff --git a/src/kernel/gdt/gdt.h b/src/kernel/gdt/gdt.h index 0fffc20..da36445 100644 --- a/src/kernel/gdt/gdt.h +++ b/src/kernel/gdt/gdt.h @@ -6,6 +6,8 @@ */ void gdt_install(); -void tss_write(int32_t num, uint16_t ss0, uint32_t esp0); +void tss_write(int32_t num, uint16_t ss0); + +void tss_flush(); #endif diff --git a/src/kernel/graphics/font.c b/src/kernel/graphics/font.c index a7e5096..458669b 100644 --- a/src/kernel/graphics/font.c +++ b/src/kernel/graphics/font.c @@ -16,7 +16,7 @@ void font_install() if (boot_drive_id != 0xE0) { struct ata_interface *primary_master = new_ata(1, 0x1F0); marfs_init(primary_master); - marfs_read_whole_file(4, (uint8_t *) font); + marfs_read_whole_file(5, (uint8_t *) font); } else { char *font_p[] = {"FONT.BIN"}; struct iso9660_entity *font_e = ISO9660_get(font_p, 1); diff --git a/src/kernel/interrupts/idt.asm b/src/kernel/interrupts/idt.asm index 90eab47..f30ead1 100644 --- a/src/kernel/interrupts/idt.asm +++ b/src/kernel/interrupts/idt.asm @@ -4,3 +4,38 @@ extern idtp idt_load: lidt [idtp] ret + +global idt_syscall +extern syscall_handler +idt_syscall: + push ds + push es + push fs + push gs + pushad + + push ecx + push edx + push esi + push edi + push eax + + mov ax, 0x10 + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + + call syscall_handler + + lea ebx, [5 * 4] + add esp, ebx + + mov dword [esp + (7*4)], eax + + popad + pop gs + pop fs + pop es + pop ds + iret diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c index b06a52a..f405ca9 100644 --- a/src/kernel/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c @@ -2,11 +2,11 @@ #include <kernel/system.h> struct idt_entry { - unsigned short base_lo; - unsigned short sel; // Kernel segment - unsigned char always0; // Always 0 - unsigned char flags; - unsigned short base_hi; + uint16_t base_low; + uint16_t sel; // Kernel segment + uint8_t always0; // Always 0 + uint8_t flags; + uint16_t base_high; } __attribute__((packed)); struct idt_ptr { @@ -24,13 +24,13 @@ extern void idt_load(); void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags) { // Specify the interrupt routine's base address - idt[num].base_lo = (base & 0xFFFF); - idt[num].base_hi = (base >> 16) & 0xFFFF; + idt[num].base_low = (base & 0xFFFF); + idt[num].base_high = (base >> 16) & 0xFFFF; // Set selector/segment of IDT entry idt[num].sel = sel; idt[num].always0 = 0; - idt[num].flags = flags; + idt[num].flags = flags | 0x60; } // Install IDT diff --git a/src/kernel/interrupts/isr.asm b/src/kernel/interrupts/isr.asm index cf75157..adabac6 100644 --- a/src/kernel/interrupts/isr.asm +++ b/src/kernel/interrupts/isr.asm @@ -1,277 +1,74 @@ -global isr0 -global isr1 -global isr2 -global isr3 -global isr4 -global isr5 -global isr6 -global isr7 -global isr8 -global isr9 -global isr10 -global isr11 -global isr12 -global isr13 -global isr14 -global isr15 -global isr16 -global isr17 -global isr18 -global isr19 -global isr20 -global isr21 -global isr22 -global isr23 -global isr24 -global isr25 -global isr26 -global isr27 -global isr28 -global isr29 -global isr30 -global isr31 - -; 0: Divide By Zero Exception -isr0: - cli - push byte 0 - push byte 0 - jmp isr_common_stub - -; 1: Debug Exception -isr1: - cli - push byte 0 - push byte 1 - jmp isr_common_stub - -; 2: Non Maskable Interrupt Exception -isr2: - cli - push byte 0 - push byte 2 - jmp isr_common_stub - -; 3: Int 3 Exception -isr3: - cli - push byte 0 - push byte 3 - jmp isr_common_stub - -; 4: INTO Exception -isr4: - cli - push byte 0 - push byte 4 - jmp isr_common_stub - -; 5: Out of Bounds Exception -isr5: - cli - push byte 0 - push byte 5 - jmp isr_common_stub - -; 6: Invalid Opcode Exception -isr6: - cli - push byte 0 - push byte 6 - jmp isr_common_stub - -; 7: Coprocessor Not Available Exception -isr7: - cli - push byte 0 - push byte 7 - jmp isr_common_stub - -; 8: Double Fault Exception (With Error Code!) -isr8: - cli - push byte 8 - jmp isr_common_stub - -; 9: Coprocessor Segment Overrun Exception -isr9: - cli - push byte 0 - push byte 9 - jmp isr_common_stub - -; 10: Bad TSS Exception (With Error Code!) -isr10: - cli - push byte 10 - jmp isr_common_stub - -; 11: Segment Not Present Exception (With Error Code!) -isr11: - cli - push byte 11 - jmp isr_common_stub - -; 12: Stack Fault Exception (With Error Code!) -isr12: - cli - push byte 12 - jmp isr_common_stub - -; 13: General Protection Fault Exception (With Error Code!) -isr13: - cli - push byte 13 - jmp isr_common_stub - -; 14: Page Fault Exception (With Error Code!) -isr14: - cli - push byte 14 - jmp isr_common_stub - -; 15: Reserved Exception -isr15: - cli - push byte 0 - push byte 15 - jmp isr_common_stub - -; 16: Floating Point Exception -isr16: - cli - push byte 0 - push byte 16 - jmp isr_common_stub - -; 17: Alignment Check Exception -isr17: - cli - push byte 0 - push byte 17 - jmp isr_common_stub - -; 18: Machine Check Exception -isr18: - cli - push byte 0 - push byte 18 - jmp isr_common_stub - -; 19: Reserved -isr19: - cli - push byte 0 - push byte 19 - jmp isr_common_stub - -; 20: Reserved -isr20: - cli - push byte 0 - push byte 20 - jmp isr_common_stub - -; 21: Reserved -isr21: - cli - push byte 0 - push byte 21 - jmp isr_common_stub - -; 22: Reserved -isr22: - cli - push byte 0 - push byte 22 - jmp isr_common_stub - -; 23: Reserved -isr23: - cli - push byte 0 - push byte 23 - jmp isr_common_stub - -; 24: Reserved -isr24: - cli - push byte 0 - push byte 24 - jmp isr_common_stub - -; 25: Reserved -isr25: - cli - push byte 0 - push byte 25 - jmp isr_common_stub - -; 26: Reserved -isr26: - cli - push byte 0 - push byte 26 - jmp isr_common_stub - -; 27: Reserved -isr27: - cli - push byte 0 - push byte 27 - jmp isr_common_stub - -; 28: Reserved -isr28: - cli - push byte 0 - push byte 28 - jmp isr_common_stub - -; 29: Reserved -isr29: - cli - push byte 0 - push byte 29 - jmp isr_common_stub - -; 30: Reserved -isr30: - cli - push byte 0 - push byte 30 - jmp isr_common_stub - -; 31: Reserved -isr31: - cli - push byte 0 - push byte 31 - jmp isr_common_stub +%macro ISR_NOERRCODE 1 + global isr%1 + isr%1: + cli + push byte 0 + push %1 + jmp isr_common_stub +%endmacro + +%macro ISR_ERRCODE 1 + global isr%1 + isr%1: + cli + push byte %1 + jmp isr_common_stub +%endmacro + +ISR_NOERRCODE 0 +ISR_NOERRCODE 1 +ISR_NOERRCODE 2 +ISR_NOERRCODE 3 +ISR_NOERRCODE 4 +ISR_NOERRCODE 5 +ISR_NOERRCODE 6 +ISR_NOERRCODE 7 +ISR_ERRCODE 8 +ISR_NOERRCODE 9 +ISR_ERRCODE 10 +ISR_ERRCODE 11 +ISR_ERRCODE 12 +ISR_ERRCODE 13 +ISR_ERRCODE 14 +ISR_NOERRCODE 15 +ISR_NOERRCODE 16 +ISR_NOERRCODE 17 +ISR_NOERRCODE 18 +ISR_NOERRCODE 19 +ISR_NOERRCODE 20 +ISR_NOERRCODE 21 +ISR_NOERRCODE 22 +ISR_NOERRCODE 23 +ISR_NOERRCODE 24 +ISR_NOERRCODE 25 +ISR_NOERRCODE 26 +ISR_NOERRCODE 27 +ISR_NOERRCODE 28 +ISR_NOERRCODE 29 +ISR_NOERRCODE 30 +ISR_NOERRCODE 31 extern fault_handler - -; Stores the ISR in the stack and calls the C fault handler isr_common_stub: - pusha - push ds +push ds push es push fs - push gs - mov ax, 0x10 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov eax, esp - push eax - mov eax, fault_handler - call eax - pop eax - pop gs + push gs + pusha + + mov ax, 0x10 + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + + push esp + call fault_handler + add esp, 4 + + popa + pop gs pop fs pop es - pop ds - popa - add esp, 8 - iret + pop ds + iret
\ No newline at end of file diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index 8b42a24..106cac8 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -170,6 +170,8 @@ void fault_handler(struct regs *r) serial_write_hex(r->ecx); serial_write("\nEDX: "); serial_write_hex(r->edx); + serial_write("\nESP: "); + serial_write_hex(r->esp); serial_write("\nFaulting address: "); serial_write_hex(faulting_address); serial_write("\nError flags: "); @@ -180,7 +182,7 @@ void fault_handler(struct regs *r) serial_write_hex(r->int_no); serial_write("\nInterrupt message: "); serial_write(exception_messages[r->int_no]); - halt_loop(); // Idk loop? + // halt_loop(); // Idk loop? char *message = (char *) exception_messages[r->int_no]; strcat(message, " Exception"); panic(message); diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index ef58ade..eb78257 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -6,13 +6,13 @@ #include <kernel/paging/paging.h> #include <kernel/input/input.h> #include <kernel/acpi/acpi.h> -#include <kernel/syscall/syscall.h> #include <kernel/smbios/smbios.h> #include <kernel/fs/install.h> #include <kernel/lib/lib.h> -#include <mlibc/stdio.h> +#include <kernel/syscall/syscall.h> +#include <kernel/fs/marfs/marfs.h> -extern void switch_to_user(); +extern void jump_userspace(); void kernel_main() { @@ -41,21 +41,22 @@ void kernel_main() get_smbios(); // Print total memory - info("Total memory found: %dMiB", memory_get_all() >> 10); + info("Total memory found: %dMiB", (memory_get_all() >> 10) + 1); uint8_t boot_drive_id = (uint8_t) (*((uint8_t *) 0x9000)); - if (boot_drive_id == 0xE0) { + if (boot_drive_id == 0xE0) install_melvix(); - } // User mode! - /* COMMENTED FOR DEVELOPMENT OF KERNEL info("Switching to user mode..."); syscalls_install(); - switch_to_user(); + tss_flush(); + uint32_t userspace = paging_alloc_pages(2); + paging_set_user(userspace, 2); + marfs_read_whole_file(4, (uint8_t *) (userspace + 4096)); + jump_userspace(userspace + 4096); panic("This should NOT happen!"); - */ // asm ("div %0" :: "r"(0)); // Exception testing x/0 loop: diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c new file mode 100644 index 0000000..c537d12 --- /dev/null +++ b/src/kernel/syscall/actions/sys_write.c @@ -0,0 +1,9 @@ +#include <stdint-gcc.h> +#include <mlibc/stdio.h> + +uint32_t sys_write(char *buf, uint32_t count) +{ + for (uint32_t i = 0; i < count; i++) + writec(*(buf++)); + return count; +}
\ No newline at end of file diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 5acd525..289274b 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -1,42 +1,19 @@ #include <stdint.h> #include <kernel/syscall/syscall.h> #include <kernel/interrupts/interrupts.h> -#include <kernel/graphics/vesa.h> -#include <kernel/io/io.h> -DEFN_SYSCALL1(serial_write, 0, const char *); - -static void *syscalls[3] = { - &serial_write -}; -uint32_t num_syscalls = 3; - -void syscall_handler(struct regs *r) +void syscalls_install() { - serial_write("SYSCALL"); - if (r->eax >= num_syscalls) - return; - - void *location = syscalls[r->eax]; - - int ret; - asm (" \ - push %1; \ - push %2; \ - push %3; \ - push %4; \ - push %5; \ - call *%6; \ - pop %%ebx; \ - pop %%ebx; \ - pop %%ebx; \ - pop %%ebx; \ - pop %%ebx; \ - " : "=a" (ret) : "r" (r->edi), "r" (r->esi), "r" (r->edx), "r" (r->ecx), "r" (r->ebx), "r" (location)); - r->eax = ret; + // 11100111 + idt_set_gate(0x80, (unsigned) idt_syscall, 0x08, 0xEE); } -void syscalls_install() +uint32_t syscall_handler(uint32_t id, uint32_t arg0, uint32_t arg1, uint32_t arg2) { - irq_install_handler(0x80, syscall_handler); -} + switch (id) { + case 1: + return sys_write((char *) arg0, arg1); + } + + return -1; +}
\ No newline at end of file diff --git a/src/kernel/syscall/syscall.h b/src/kernel/syscall/syscall.h index 78a1ab5..7fe7862 100644 --- a/src/kernel/syscall/syscall.h +++ b/src/kernel/syscall/syscall.h @@ -1,40 +1,9 @@ #ifndef MELVIX_SYSCALL_H #define MELVIX_SYSCALL_H -#include <kernel/interrupts/interrupts.h> - +extern void idt_syscall(); void syscalls_install(); -void syscall_handler(struct regs *r); - -#define DECL_SYSCALL0(fn) int syscall_##fn(); -#define DECL_SYSCALL1(fn, p1) int syscall_##fn(p1); -#define DECL_SYSCALL2(fn, p1, p2) int syscall_##fn(p1,p2); -#define DECL_SYSCALL3(fn, p1, p2, p3) int syscall_##fn(p1,p2,p3); -#define DECL_SYSCALL4(fn, p1, p2, p3, p4) int syscall_##fn(p1,p2,p3,p4); -#define DECL_SYSCALL5(fn, p1, p2, p3, p4, p5) int syscall_##fn(p1,p2,p3,p4,p5); - -#define DEFN_SYSCALL0(fn, num) \ -int syscall_##fn() { \ - int a; \ - asm volatile("int $0x80" : "=a" (a) : "0" (num)); \ - return a; \ -} - -#define DEFN_SYSCALL1(fn, num, P1) \ -int syscall_##fn(P1 p1) { \ - int a; \ - asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1)); \ - return a; \ -} - -#define DEFN_SYSCALL2(fn, num, P1, P2) \ -int syscall_##fn(P1 p1, P2 p2) { \ - int a; \ - asm volatile("int $0x80" : "=a" (a) : "0" (num), "b" ((int)p1), "c" ((int)p2)); \ - return a; \ -} - -DECL_SYSCALL1(serial_write, const char *) +uint32_t sys_write(char *buf, uint32_t count); #endif diff --git a/src/kernel/system.c b/src/kernel/system.c index c5cf4ce..7d57f66 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -106,6 +106,7 @@ void assert(int x) void halt_loop() { serial_write("\n!!! HALT !!!\n"); + asm ("cli"); loop: asm ("hlt"); goto loop; diff --git a/src/userspace/main.asm b/src/userspace/main.asm new file mode 100644 index 0000000..4369f10 --- /dev/null +++ b/src/userspace/main.asm @@ -0,0 +1,12 @@ +bits 32 +mov esp, ebp + +mov eax, 1 +lea edi, [ebp+welcome] +mov esi, welcome_sz +int 0x80 + +jmp $ + +welcome db "Welcome to the userspace!", 0x0A, 0x0A +welcome_sz equ $ - welcome
\ No newline at end of file diff --git a/src/userspace/main.c b/src/userspace/main.c deleted file mode 100644 index 73e937f..0000000 --- a/src/userspace/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <kernel/syscall/syscall.h> - -void test_user() -{ - syscall_serial_write("Hello, user world!\n"); -}
\ No newline at end of file |