aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs
diff options
context:
space:
mode:
authorMarvin Borner2020-04-26 20:12:05 +0200
committerMarvin Borner2020-04-26 20:12:05 +0200
commit31f671f2137bc09e62de09142bea232c1975c76b (patch)
tree60729693e4a70d2b3d449ed396ba860d3fa33071 /src/kernel/fs
parentd3047efc1085d3e2f5524f629e55dc456a2f5065 (diff)
Complete rewrite of paging and allocation libs
-> This was REALLY needed.
Diffstat (limited to 'src/kernel/fs')
-rw-r--r--src/kernel/fs/ata.c2
-rw-r--r--src/kernel/fs/elf.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/fs/ata.c b/src/kernel/fs/ata.c
index d5c758c..2a1ab6f 100644
--- a/src/kernel/fs/ata.c
+++ b/src/kernel/fs/ata.c
@@ -117,4 +117,4 @@ void read_abs_sectors(uint32_t lba, uint8_t sector_count, uint16_t buf[])
asm("rep insw" ::"c"(SECTOR_SIZE / 2), "d"(sel_base_port + DATA), "D"(buf + i));
i += SECTOR_SIZE / 2;
}
-} \ No newline at end of file
+}
diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c
index b9ea22a..fe024e3 100644
--- a/src/kernel/fs/elf.c
+++ b/src/kernel/fs/elf.c
@@ -43,9 +43,9 @@ void elf_load(char *path)
seg_begin = program_header->vaddr;
seg_end = seg_begin + program_header->memsz;
- for (uint32_t z = 0; z < seg_end - seg_begin; z += 4096)
- paging_map((uint32_t)seg_begin + z, (uint32_t)seg_begin + z,
- PT_PRESENT | PT_RW | PT_USED | PT_ALL_PRIV);
+ /* for (uint32_t z = 0; z < seg_end - seg_begin; z += 4096) */
+ /* paging_map((uint32_t)seg_begin + z, (uint32_t)seg_begin + z, */
+ /* PT_PRESENT | PT_RW | PT_USED | PT_ALL_PRIV); */
memcpy((void *)seg_begin, file + program_header->offset,
program_header->filesz);
@@ -68,8 +68,8 @@ void elf_load(char *path)
set_kernel_stack(sp);
// paging_switch_directory(1);
- uint32_t esp = paging_alloc_pages(0x1000);
- asm("mov %0, %%esp" ::"r"(esp + 0x1000));
+ /* uint32_t esp = paging_alloc_pages(0x1000); */
+ /* asm("mov %0, %%esp" ::"r"(esp + 0x1000)); */
log("Jumping to usermode!");
asm volatile("\