Small adjustments, pi program #5
@@ -39,7 +39,7 @@ Tada! You now have a working BlankOS USB stick. Go ahead and try it out!
|
||||
|
||||
## Documentation
|
||||
|
||||
Two other documents are available to help you understand the project better. One is the User's Manual, labelled [USERS.md](docs/USERS.md), and the other one is the Developer's Manual, labelled [DEVELOPERS.md](docs/DEVELOPERS.md). They are full of useful resources around Blank OS. You'll learn how to use the system and how to contribute to it. *(The docs might not always be up-to-date)*
|
||||
Two other documents are available to help you understand the project better. One is the User's Manual, labelled [USERS.md](docs/USERS.md), and the other one is the Developer's Manual, labelled [DEVELOPERS.md](docs/DEVELOPERS.md). They are full of useful resources: you'll learn how to use the system and how to contribute to it. *(The docs might not always be up-to-date)*
|
||||
|
||||
### Resources
|
||||
|
||||
@@ -56,11 +56,12 @@ Two other documents are available to help you understand the project better. One
|
||||
|
||||
- [X] Booting with GRUB
|
||||
- [X] Common basic structures (IDT, GDT, ISRs, IRQs)
|
||||
- [X] Common drivers (framebuffer, keyboard, serial, timer)
|
||||
- [X] Common drivers (framebuffer, keyboard, serial, timer, RTC, ATA PIO)
|
||||
- [X] Kernel-space utilities (shell, simple programs)
|
||||
- [ ] Filesystem (FAT32 or VFS ramdisk)
|
||||
- [ ] Changing the default VGA font
|
||||
- [X] Paging/Page Frame Allocation
|
||||
- [ ] Dynamic memory allocator (get memmap from GRUB?)
|
||||
- [ ] Paging/Page Frame Allocation
|
||||
- [ ] TCP/IP Network stack
|
||||
- [ ] Getting to Ring-3 (userspace)
|
||||
- [ ] Multitasking (via round robin scheduling)
|
||||
|
||||
@@ -7,13 +7,14 @@ global loader
|
||||
|
||||
section .multiboot_header
|
||||
|
||||
mb_start:
|
||||
align 8
|
||||
|
||||
; ASM macros
|
||||
|
||||
MAGIC_NUMBER equ 0xe85250d6 ; multiboot2 magic
|
||||
FLAGS equ 0x0 ; 32-bit protected mode for i386
|
||||
HEADER_LEN equ 44 ; Tags=2+2+4+4+4+4+2+2+4=28
|
||||
HEADER_LEN equ mb_end-mb_start
|
||||
CHECKSUM equ -(MAGIC_NUMBER + FLAGS + HEADER_LEN)
|
||||
|
||||
; Multiboot 2 header, according to specification (16bytes)
|
||||
@@ -42,6 +43,7 @@ CHECKSUM equ -(MAGIC_NUMBER + FLAGS + HEADER_LEN)
|
||||
dd 8 ; 4
|
||||
|
||||
; End of Multiboot 2 header
|
||||
mb_end:
|
||||
|
||||
section .text:
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ void get_cpuid()
|
||||
printf("CPU information\n\tvendor: %s\n\tfamily: %u\n\tmodel: %u\n\tfeatures: 0x%x\n", vendor, family, model, edx);
|
||||
}
|
||||
|
||||
// Not really working anymore as it was made for multiboot1, now using multiboot2
|
||||
void get_meminfo(unsigned int multiboot_info_address, int verbose)
|
||||
{
|
||||
// RAM
|
||||
@@ -56,13 +57,15 @@ void get_meminfo(unsigned int multiboot_info_address, int verbose)
|
||||
|
||||
while ((unsigned int)mmap < multiboot_info_address + *((unsigned int*)(multiboot_info_address + 40)))
|
||||
{
|
||||
/*
|
||||
if (mmap->length_high != 0 && mmap->length_low != 0)
|
||||
{
|
||||
{*/
|
||||
printf("0x%x%x | 0x%x%x | %u\n",
|
||||
mmap->base_addr_high, mmap->base_addr_low,
|
||||
mmap->length_high, mmap->length_low,
|
||||
mmap->type);
|
||||
}
|
||||
//}
|
||||
|
||||
mmap = (multiboot_memory_map_t*)((unsigned int)mmap + mmap->size + sizeof(unsigned int));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user