boot.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/page_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+1)
  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 < (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2))
  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. #ifdef CONFIG_X86_64
  28. #define BOOT_HEAP_SIZE 0x7000
  29. #else
  30. #define BOOT_HEAP_SIZE 0x4000
  31. #endif
  32. #endif /* !CONFIG_KERNEL_BZIP2 */
  33. #ifdef CONFIG_X86_64
  34. #define BOOT_STACK_SIZE 0x4000
  35. #else
  36. #define BOOT_STACK_SIZE 0x1000
  37. #endif
  38. #endif /* __KERNEL__ */
  39. #endif /* _ASM_X86_BOOT_H */