diff options
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/drivers/vga_text_buffer.h | 2 | ||||
-rw-r--r-- | kernel/include/kernel/io.h | 4 | ||||
-rw-r--r-- | kernel/include/mm/physical_mm.h | 15 |
3 files changed, 8 insertions, 13 deletions
diff --git a/kernel/include/drivers/vga_text_buffer.h b/kernel/include/drivers/vga_text_buffer.h index de498a3..74b77b9 100644 --- a/kernel/include/drivers/vga_text_buffer.h +++ b/kernel/include/drivers/vga_text_buffer.h @@ -68,6 +68,6 @@ bool vga_text_buffer_is_initialized(void); void vga_text_buffer_initialize(void); void vga_text_buffer_write_char(const char); void vga_text_buffer_write_string(const char *); -void vga_text_buffer_printf(const char *string, ...); +void vga_text_buffer_printf(const char *, ...); #endif diff --git a/kernel/include/kernel/io.h b/kernel/include/kernel/io.h index f58bd2d..952784d 100644 --- a/kernel/include/kernel/io.h +++ b/kernel/include/kernel/io.h @@ -21,7 +21,7 @@ #include <stdint.h> -uint8_t inb(uint16_t port); -void outb(uint16_t port, uint8_t val); +uint8_t inb(uint16_t); +void outb(uint16_t, uint8_t); #endif diff --git a/kernel/include/mm/physical_mm.h b/kernel/include/mm/physical_mm.h index 7bda283..8438286 100644 --- a/kernel/include/mm/physical_mm.h +++ b/kernel/include/mm/physical_mm.h @@ -23,20 +23,15 @@ #include <common.h> -/* - * A byte has 8 bits, hence we can store information for up to 8 blocks at a - * time - */ -#define BLOCKS_PER_BYTE 8 - /* TODO: Update this to 2MiB when PAE is enabled */ -#define BLOCK_SIZE 4 * KiB - -#define BLOCK_ALIGN BLOCK_SIZE +#define BLOCK_SIZE (4 * KiB) #define BITMAP_ENTRY_SIZE 32 +/* TODO: This is the maximum number of blocks for a 4GiB system. */ +#define MAX_BLOCKS 1048576 + void physical_mm_init(void); -uint32_t mmap_find_first_free(void); +uint32_t physical_mm_find_first_free_block(void); #endif |