boot.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _ASM_X86_BOOT_H
  2. #define _ASM_X86_BOOT_H
  3. /* Internal svga startup constants */
  4. #define NORMAL_VGA 0xffff /* 80x25 mode */
  5. #define EXTENDED_VGA 0xfffe /* 80x50 mode */
  6. #define ASK_VGA 0xfffd /* ask for it at bootup */
  7. #ifdef __KERNEL__
  8. #include <asm/pgtable_types.h>
  9. /* Physical address where kernel should be loaded. */
  10. #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
  11. + (CONFIG_PHYSICAL_ALIGN - 1)) \
  12. & ~(CONFIG_PHYSICAL_ALIGN - 1))
  13. /* Minimum kernel alignment, as a power of two */
  14. #ifdef CONFIG_X86_64
  15. #define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
  16. #else
  17. #define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_ORDER)
  18. #endif
  19. #define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
  20. #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
  21. (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
  22. #error "Invalid value for CONFIG_PHYSICAL_ALIGN"
  23. #endif
  24. #ifdef CONFIG_KERNEL_BZIP2
  25. #define BOOT_HEAP_SIZE 0x400000
  26. #else /* !CONFIG_KERNEL_BZIP2 */
  27. #define BOOT_HEAP_SIZE 0x8000
  28. #endif /* !CONFIG_KERNEL_BZIP2 */
  29. #ifdef CONFIG_X86_64
  30. #define BOOT_STACK_SIZE 0x4000
  31. #else
  32. #define BOOT_STACK_SIZE 0x1000
  33. #endif
  34. #endif /* __KERNEL__ */
  35. #endif /* _ASM_X86_BOOT_H */