Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
entry: add some asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Apr 2, 2021
1 parent fddb0d7 commit 2260f40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dainkrnl/src/arm64/entry.zig
Expand Up @@ -99,6 +99,8 @@ pub export fn daintree_mmu_start(entry_data: *dcommon.EntryData) noreturn {
l3.map(i, address, .table, flags);
address += PAGING.page_size;
}

entryAssert(address == daintree_end, "address != daintree_end");
}

hw.entry_uart.carefully(.{ "MAP: null at ", PAGING.kernelPageAddress(i), "\r\n" });
Expand Down
2 changes: 2 additions & 0 deletions dainkrnl/src/riscv64/entry.zig
Expand Up @@ -69,6 +69,8 @@ pub export fn daintree_mmu_start(entry_data: *dcommon.EntryData) noreturn {
l3.map(i, address, flags);
address += PAGING.page_size;
}

entryAssert(address == daintree_end, "address != daintree_end");
}

hw.entry_uart.carefully(.{ "MAP: null at ", PAGING.kernelPageAddress(i), "\r\n" });
Expand Down

0 comments on commit 2260f40

Please sign in to comment.