From ca2d8e27f4a2352d41a7b74d2203cc856486874a Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Wed, 2 Mar 2022 17:55:14 +1100 Subject: [PATCH 1/3] Fix typo --- mentos/src/process/scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mentos/src/process/scheduler.c b/mentos/src/process/scheduler.c index 9e874f4..bed5656 100644 --- a/mentos/src/process/scheduler.c +++ b/mentos/src/process/scheduler.c @@ -352,7 +352,7 @@ int sys_setgid(pid_t gid) } if (curr->gid == curr->pid) - pr_debug("Process %d is already a session leader.", task->pid); + pr_debug("Process %d is already a session leader.", curr->pid); curr->gid = curr->pid; return 0; From c31a6780753d4a3d7c941fc597593387ce6ce70a Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Wed, 2 Mar 2022 17:55:14 +1100 Subject: [PATCH 2/3] Do not flag MULTIBOOT_VIDEO_INFO in multiboot header We do not populate the video mode fields in the multiboot header, therefore we should not request the boot loader to go looking for this information. This is required to boot MentOS using GRUB. Tested with v2.04. --- mentos/src/boot.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mentos/src/boot.S b/mentos/src/boot.S index fffbe63..d48bf19 100644 --- a/mentos/src/boot.S +++ b/mentos/src/boot.S @@ -23,7 +23,7 @@ MULTIBOOT_VIDEO_MODE equ 0x00000004 ; This is the flag combination that we prepare for Grub ; to read at kernel load time. -MULTIBOOT_HEADER_FLAGS equ (MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE) +MULTIBOOT_HEADER_FLAGS equ (MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO) ; Grub reads this value to make sure it loads a kernel ; and not just garbage. MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) From 0f9175e11c1079375895f68c769a0d9ed9925115 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Tue, 1 Mar 2022 09:00:08 +1100 Subject: [PATCH 3/3] Do not declare 'gdt_bits_t' variable --- mentos/inc/descriptor_tables/gdt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mentos/inc/descriptor_tables/gdt.h b/mentos/inc/descriptor_tables/gdt.h index 7cfeabc..b7a1b48 100644 --- a/mentos/inc/descriptor_tables/gdt.h +++ b/mentos/inc/descriptor_tables/gdt.h @@ -93,7 +93,7 @@ enum gdt_bits_t { GDT_GRANULARITY = 128U, /// @brief `0b01000000U` (Size): If 0 the selector defines 16 bit protected mode. If 1 it defines 32 bit protected mode. You can have both 16 bit and 32 bit selectors at once. GDT_OPERAND_SIZE = 64U, -} gdt_bits_t; +}; /// @brief Used in IDT for padding. #define IDT_PADDING 14U // `0b00001110U