sys.h 511 B

123456789101112131415161718192021222324252627
  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(page_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 const uint32_t kernel_size;
  15. extern char* const bss_addr;
  16. extern const uint32_t bss_len;
  17. #ifdef __cplusplus
  18. }
  19. #endif