sys.h 555 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_enable_paging(page_directory_entry* pd_addr);
  8. phys_ptr_t current_pd(void);
  9. // the limit should be set on the higher 16bit
  10. // e.g. (n * sizeof(segment_descriptor) - 1) << 16
  11. // the lower bit off the limit is either 0 or 1
  12. // indicating whether or not to enable interrupt
  13. // after loading gdt
  14. void asm_load_gdt(uint32_t limit, phys_ptr_t addr);
  15. void asm_load_tr(uint16_t index);
  16. extern void* __real_kernel_end;
  17. #ifdef __cplusplus
  18. }
  19. #endif