PeachOS
PeachOS copied to clipboard
Simple kernel designed for a online course
In `task_return` function we push values from kernel EFLAGS but we should push saved flags instead. Also this PR initialize flags for user program
In the lecture 94, you have elf32_off defined as a int32_t. The manual I am looking at describes it as an unsigned 4 byte integer. Wouldn't that be uint32_t?
Inside the method ```static int fat16_get_fat_entry(struct disk *disk, int cluster)``` in fat16.c, there's the following line: ```res = diskstreamer_seek(stream, fat_table_position * (cluster * PEACHOS_FAT16_FAT_ENTRY_SIZE));``` However, and Daniel confirmed this as...
I have a confusion about a function at heap.c. Does following line at function heap_mark_blocks_taken() has "off by one" error? `if (i != end_block -1) { entry |= HEAP_BLOCK_HAS_NEXT; }`...
In lecture 94, Implementing the ELF Loader - Part 2, we create the funciton `static bool elf_is_executable(struct elf_header* header)` since we are only working with executable files, but later at...
To whom it may concern. I hope you are doing well and are in good health. Thank you for the great course content, I have been thoroughly enjoying it. I...
In the function `fat16_get_root_directory` we first calculate the `total_sectors` (https://github.com/nibblebits/PeachOS/blob/master/src/fs/fat/fat16.c#L215-L219): ```c int total_sectors = root_dir_size / disk->sector_size; if (root_dir_size % disk->sector_size) { total_sectors += 1; } ``` and then at...
Correct me if I'm wrong but we are just ORing the high and low bits here: https://github.com/nibblebits/PeachOS/blob/9518f7a15134c31d66a4efe5a67a8ffba67edf50/src/fs/fat/fat16.c#L355-L358 Shouldn't we shift the high bits like so: ```c return (item->high_16_bits_first_cluster low_16_bits_first_cluster; ```
In boot.asm: `ES` segment register is set to zero on line 41, At the end of procedure `ata_lba_read` on line 145 ``` ; We need to read 256 words at...
On boot.asm, you subtracted 1 from the size of the gdt. But not on the c version of it. Any reason for that? ine 80 of src/boot/boot.asm: gdt_descriptor: dw gdt_end...