kernel_main.h 442 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <types/types.h>
  3. static inline void __break_point(void)
  4. {
  5. asm volatile("xchgw %bx, %bx");
  6. }
  7. #define MAKE_BREAK_POINT() __break_point()
  8. #define KERNEL_STACK_SIZE (16 * 1024)
  9. #define KERNEL_STACK_SEGMENT (0x10)
  10. #define KERNEL_START_ADDR (0x00100000)
  11. void NORETURN kernel_main(void);
  12. #ifdef __cplusplus
  13. // in kernel_main.c
  14. extern "C" struct tss32_t tss;
  15. #else
  16. // in kernel_main.c
  17. extern struct tss32_t tss;
  18. #endif