Final polishing to debugging system.

This commit is contained in:
Enrico Fraccaroli
2021-12-30 11:50:15 +01:00
parent 47276eb503
commit c6906d4f2d
288 changed files with 150 additions and 322 deletions
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file boot.h
/// @brief Bootloader structures
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file gdt.h
/// @brief Data structures concerning the Global Descriptor Table (GDT).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file idt.h
/// @brief Data structures concerning the Interrupt Descriptor Table (IDT).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file isr.h
/// @brief Data structures concerning the Interrupt Service Routines (ISRs).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file tss.h
/// @brief Data structures concerning the Task State Segment (TSS).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file fpu.h
/// @brief Floating Point Unit (FPU).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file pci.h
/// @brief Routines for interfacing with the Peripheral Component Interconnect (PCI).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ata.h
/// @brief Drivers for the Advanced Technology Attachment (ATA) devices.
/// @details
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file fdc.h
/// @brief Definitions about the floppy.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file keyboard.h
/// @brief Drivers for the Keyboard devices.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file keymap.h
/// @brief Keymap for keyboard.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file mouse.h
/// @brief Driver for *PS2* Mouses.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file rtc.h
/// @brief Real Time Clock (RTC) driver.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file elf.h
/// @brief Function for managing the Executable and Linkable Format (ELF).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-3
View File
@@ -1,8 +1,5 @@
/// @file ext2.h
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief EXT2 driver.
/// @version 0.1
/// @date 2021-12-13
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file initrd.h
/// @brief Headers of functions for initrd filesystem.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ioctl.h
/// @brief Declares device controlling operations.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file procfs.h
/// @brief Proc file system public functions and structures.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vfs.h
/// @brief Headers for Virtual File System (VFS).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vfs_types.h
/// @brief Virtual filesystem data types.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file cpuid.h
/// @brief Structures and functions to handle the CPUID.
/// @details
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file pic8259.h
/// @brief Data structures and functions required to manage the PIC8259.
/// @details
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file timer.h
/// @brief Programmable Interval Timer (PIT) definitions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file debug.h
/// @brief Debugging primitives.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file mm_io.h
/// @brief Memory Mapped IO functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file port_io.h
/// @brief Byte I/O on ports prototypes.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file proc_modules.h
/// @brief Contains functions for managing procfs filesystems.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+1 -2
View File
@@ -1,6 +1,5 @@
/// MentOS, The Mentoring Operating system project
/// @file vga.h
/// @brief FUnctions required to manage the Video Graphics Array (VGA).
/// @brief Functions required to manage the Video Graphics Array (VGA).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vga_font.h
/// @brief VGA fonts.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vga_model.h
/// @brief VGA models.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vga_palette.h
/// @brief VGA color palettes.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file video.h
/// @brief Video functions and costants.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file kernel.h
/// @brief Kernel generic data structure and functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file compiler.h
/// @brief Definition of memory barriers.
/// @details
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file hashmap.h
/// @brief Functions for managing a structure that can map keys to values.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file irqflags.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file list.h
/// @brief An implementation for generic list.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file list_head.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file mutex.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ndtree.h
/// @brief N-Dimensional tree.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file rbtree.h
/// @brief Red/Black tree.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file spinlock.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file stack_helper.h
/// @brief Couple of macros that help accessing the stack.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file stdatomic.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file link_access.h
/// @brief Set of macros that provide access to linking symbols.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file buddysystem.h
/// @brief Buddy System.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file gfp.h
/// @brief List of Get Free Pages (GFP) Flags.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file kheap.h
/// @brief Interface for kernel heap functions, also provides a placement
/// malloc() for use before the heap is initialised.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file paging.h
/// @brief Implementation of a memory paging management.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file slab.h
/// @brief Functions and structures for managing memory slabs.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vmem_map.h
/// @brief Virtual memory mapping routines.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file zone_allocator.h
/// @brief Implementation of the Zone Allocator
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file multiboot.h
/// @brief Data structures used for multiboot.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file proc_access.h
/// @brief Set of functions and flags used to manage processors registers.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file prio.h
/// @brief Defines processes priority value.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file process.h
/// @brief Process data structures and functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file scheduler.h
/// @brief Scheduler structures and functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file wait.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file errno.h
/// @brief Errors definition.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ipc.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file kernel_levels.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file module.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file reboot.h
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file types.h
/// @brief Collection of Kernel datatype
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file utsname.h
/// @brief Functions used to provide information about the machine & OS.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file panic.h
/// @brief Functions used to manage kernel panic.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file printk.h
/// @brief Functions for managing the kernel messages.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file signal.h
/// @brief Signals definition.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file syscall.h
/// @brief System Call handler definition.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file version.h
/// @brief Version information.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file exception.c
/// @brief Functions which manage the Interrupt Service Routines (ISRs).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[EXEPT ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "system/panic.h"
#include "descriptor_tables/isr.h"
#include "descriptor_tables/idt.h"
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file gdt.c
/// @brief Functions which manage the Global Descriptor Table (GDT).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[GDT ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "io/debug.h"
#include "descriptor_tables/gdt.h"
#include "descriptor_tables/tss.h"
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file idt.c
/// @brief Functions which manage the Interrupt Descriptor Table (IDT).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[IDT ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "descriptor_tables/idt.h"
#include "descriptor_tables/gdt.h"
#include "descriptor_tables/isr.h"
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file interrupt.c
/// @brief Functions which manage the Interrupt Service Routines (ISRs).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[IRQ ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "descriptor_tables/isr.h"
#include "process/scheduler.h"
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file tss.c
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[TSS ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "descriptor_tables/tss.h"
#include "string.h"
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file fpu.c
/// @brief Floating Point Unit (FPU).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[FPU ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "devices/fpu.h"
#include "descriptor_tables/isr.h"
#include "io/debug.h"
+7 -1
View File
@@ -1,10 +1,16 @@
/// MentOS, The Mentoring Operating system project
/// @file pci.c
/// @brief Routines for PCI initialization.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
///! @cond Doxygen_Suppress
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[PCI ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "devices/pci.h"
#include "io/debug.h"
#include "string.h"
+2 -3
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ata.c
/// @brief Advanced Technology Attachment (ATA) and Advanced Technology Attachment Packet Interface (ATAPI) drivers.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -6,8 +5,6 @@
/// @addtogroup ata
/// @{
#include "drivers/ata.h"
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
@@ -15,6 +12,8 @@
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "drivers/ata.h"
#include "descriptor_tables/isr.h"
#include "hardware/pic8259.h"
#include "klib/spinlock.h"
+7 -1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file fdc.c
/// @brief Floppy driver controller handling.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -6,6 +5,13 @@
/// @addtogroup fdc
/// @{
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[FDC ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "drivers/fdc.h"
#include "io/video.h"
#include "io/port_io.h"
+7 -1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file keyboard.c
/// @brief Keyboard handling.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -6,6 +5,13 @@
/// @addtogroup keyboard
/// @{
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[KEYBRD]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "drivers/keyboard/keyboard.h"
#include "io/port_io.h"
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file keymap.c
/// @brief Keymap for keyboard.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+7 -1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file mouse.c
/// @brief Driver for *PS2* Mouses.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -6,6 +5,13 @@
/// @addtogroup mouse
/// @{
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[MOUSE ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "drivers/mouse.h"
#include "descriptor_tables/isr.h"
#include "hardware/pic8259.h"
+7 -1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file rtc.c
/// @brief Real Time Clock (RTC) driver.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -6,6 +5,13 @@
/// @addtogroup rtc
/// @{
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[RTC ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "drivers/rtc.h"
#include "hardware/pic8259.h"
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file elf.c
/// @brief Function for multiboot support.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+1 -4
View File
@@ -1,8 +1,5 @@
/// @file ext2.c
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief EXT2 driver.
/// @version 0.1
/// @date 2021-12-13
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
@@ -13,7 +10,7 @@
// Change the header.
#define __DEBUG_HEADER__ "[EXT2 ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_DEBUG
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "process/scheduler.h"
#include "process/process.h"
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file initrd.c
/// @brief Headers of functions for initrd filesystem.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file ioctl.c
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file namei.c
/// @brief Implementation of functions fcntl() and open().
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file open.c
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file procfs.c
/// @brief Proc file system implementation.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file read_write.c
/// @brief Read and write functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file readdir.c
/// @brief Function for accessing directory entries.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file stat.c
/// @brief Stat functions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+1 -2
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file vfs.c
/// @brief Headers for Virtual File System (VFS).
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
@@ -11,7 +10,7 @@
// Change the header.
#define __DEBUG_HEADER__ "[VFS ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_DEBUG
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "process/scheduler.h"
#include "klib/spinlock.h"
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file cpuid.c
/// @brief CPUID-based function to detect CPU type.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
+7 -18
View File
@@ -1,67 +1,56 @@
/// MentOS, The Mentoring Operating system project
/// @file pic8259.c
/// @brief pic8259 definitions.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[PIC ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "hardware/pic8259.h"
#include "io/port_io.h"
#include "stddef.h"
/// End-of-interrupt command code.
#define EOI 0x20
/// IO base address for master PIC.
#define MASTER_PORT_COMMAND 0x20
/// I/O address for data to master.
#define MASTER_PORT_DATA (MASTER_PORT_COMMAND + 1)
/// IO base address for slave PIC.
#define SLAVE_PORT_COMMAND 0xA0
/// I/O address for data to slave.
#define SLAVE_PORT_DATA (SLAVE_PORT_COMMAND + 1)
/// ICW4 (not) needed.
#define ICW1_ICW4 0x01
/// Single (cascade) mode.
#define ICW1_SINGLE 0x02
/// Call address interval 4 (8).
#define ICW1_INTERVAL4 0x04
/// Level triggered (edge) mode.
#define ICW1_LEVEL 0x08
/// Initialization - required.
#define ICW1_INIT 0x10
/// 8086/88 (MCS-80/85) mode
#define ICW4_8086 0x01
/// Auto (normal) EOI.
#define ICW4_AUTO 0x02
/// Buffered mode/slave.
#define ICW4_BUF_SLAVE 0x08
/// Buffered mode/master.
#define ICW4_BUF_MASTER 0x0C
/// Special fully nested (not).
#define ICW4_SFNM 0x10
/// OCW3 irq ready next CMD read.
#define PIC_READ_IRR 0x0A
/// OCW3 irq service next CMD read.
#define PIC_READ_ISR 0x0B
/// The current mask of the master.
static byte_t master_cur_mask;
/// The current mask of the slave.
static byte_t slave_cur_mask;
+7 -1
View File
@@ -1,9 +1,15 @@
/// MentOS, The Mentoring Operating system project
/// @file timer.c
/// @brief Timer implementation.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
// Include the kernel log levels.
#include "sys/kernel_levels.h"
// Change the header.
#define __DEBUG_HEADER__ "[TIMER ]"
// Set the log level.
#define __DEBUG_LEVEL__ LOGLEVEL_NOTICE
#include "hardware/timer.h"
#include "klib/irqflags.h"
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file debug.c
/// @brief Debugging primitives.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file mm_io.c
/// @brief Memory Mapped IO functions implementation.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
-1
View File
@@ -1,4 +1,3 @@
/// MentOS, The Mentoring Operating system project
/// @file port_io.c
/// @brief Byte I/O on ports prototypes.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.

Some files were not shown because too many files have changed in this diff Show More