sys.h 525 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <kernel/mem.h>
  3. #include <types/types.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. void asm_enable_paging(page_directory_entry* pd_addr);
  8. // the limit should be set on the higher 16bit
  9. // e.g. (n * sizeof(segment_descriptor) - 1) << 16
  10. // the lower bit off the limit is either 0 or 1
  11. // indicating whether or not to enable interrupt
  12. // after loading gdt
  13. void asm_load_gdt(uint32_t limit, phys_ptr_t addr);
  14. void asm_load_tr(uint16_t index);
  15. extern void* __real_kernel_end;
  16. #ifdef __cplusplus
  17. }
  18. #endif