setos

拙OS
Log | Files | Refs | LICENSE

commit ab03c3e52af66a7d0d94ec49596ee361ed15fbfe
parent 28f4ea9de7453cc8cb467b90422405bd35fcc269
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Sat, 30 Mar 2024 10:14:12 +0900

randomly pagefaults

Diffstat:
Mkernel.c | 4++--
Mutils.c | 2--
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel.c b/kernel.c @@ -9,13 +9,13 @@ void kernel_main(void *dummy0, void *dummy1, void *dummy2, EFI_GRAPHICS_OUTPUT_PROTOCOL *gop) { - uint32_t *fb_base = (uint8_t *)gop->Mode->FrameBufferBase; + uint32_t *fb_base = (uint32_t *)gop->Mode->FrameBufferBase; uint32_t hrez = gop->Mode->Info->HorizontalResolution; uint32_t vrez = gop->Mode->Info->VerticalResolution; uint32_t sl = gop->Mode->Info->PixelsPerScanLine; for (int i = 0; i < vrez; i++) { for (int j = 0; j < hrez; j++) { - fb_base[i * sl + j] = j % 0xff; + fb_base[i * sl + j] = (j % 0xff) << 8; } } for(;;); diff --git a/utils.c b/utils.c @@ -235,7 +235,6 @@ load_elf(EFI_FILE_PROTOCOL *elf, ElfHdr *ehdr, Phdr phdr[]) if (phdr[i].type != PT_LOAD) { continue; } -/* efi_printf("load_elf: allocate %d at %x\n", phdr[i].memsz, phdr[i].vaddr ); @@ -247,7 +246,6 @@ load_elf(EFI_FILE_PROTOCOL *elf, ElfHdr *ehdr, Phdr phdr[]) efi_printf("allocate pages: %d\n", stat); return stat; } -*/ efi_printf("load_elf: phdr[i].vaddr: %x\n", phdr[i].vaddr); stat = elf->SetPosition(elf, phdr[i].offset); if (stat != EFI_SUCCESS) {