sys.h 446 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_switch_pd(pd_t pd_addr);
  8. void asm_enable_paging(pd_t pd_addr);
  9. pptr_t current_pd(void);
  10. // the limit should be set on the higher 16bit
  11. // e.g. (n * sizeof(segment_descriptor) - 1) << 16
  12. void asm_load_gdt(uint32_t limit, pptr_t addr);
  13. void asm_load_tr(uint16_t index);
  14. extern void* __real_kernel_end;
  15. #ifdef __cplusplus
  16. }
  17. #endif