e820.h 705 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __ASM_E820_H
  2. #define __ASM_E820_H
  3. #define E820MAP 0x2d0 /* our map */
  4. #define E820MAX 128 /* number of entries in E820MAP */
  5. #define E820NR 0x1e8 /* # entries in E820MAP */
  6. #define E820_RAM 1
  7. #define E820_RESERVED 2
  8. #define E820_ACPI 3
  9. #define E820_NVS 4
  10. #ifndef __ASSEMBLY__
  11. struct e820entry {
  12. __u64 addr; /* start of memory segment */
  13. __u64 size; /* size of memory segment */
  14. __u32 type; /* type of memory segment */
  15. } __attribute__((packed));
  16. struct e820map {
  17. __u32 nr_map;
  18. struct e820entry map[E820MAX];
  19. };
  20. #endif /* __ASSEMBLY__ */
  21. #ifdef __KERNEL__
  22. #ifdef CONFIG_X86_32
  23. # include "e820_32.h"
  24. #else
  25. # include "e820_64.h"
  26. #endif
  27. #endif /* __KERNEL__ */
  28. #endif /* __ASM_E820_H */