zimage.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * (C) Copyright 2002
  3. * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _ASM_ZIMAGE_H_
  8. #define _ASM_ZIMAGE_H_
  9. #include <asm/bootparam.h>
  10. #include <asm/e820.h>
  11. /* linux i386 zImage/bzImage header. Offsets relative to
  12. * the start of the image */
  13. #define HEAP_FLAG 0x80
  14. #define BIG_KERNEL_FLAG 0x01
  15. /* magic numbers */
  16. #define KERNEL_MAGIC 0xaa55
  17. #define KERNEL_V2_MAGIC 0x53726448
  18. #define COMMAND_LINE_MAGIC 0xA33F
  19. /* limits */
  20. #define BZIMAGE_MAX_SIZE 15*1024*1024 /* 15MB */
  21. #define ZIMAGE_MAX_SIZE 512*1024 /* 512k */
  22. #define SETUP_MAX_SIZE 32768
  23. #define SETUP_START_OFFSET 0x200
  24. #define BZIMAGE_LOAD_ADDR 0x100000
  25. #define ZIMAGE_LOAD_ADDR 0x10000
  26. /* Implementation defined function to install an e820 map. */
  27. unsigned install_e820_map(unsigned max_entries, struct e820entry *);
  28. struct boot_params *load_zimage(char *image, unsigned long kernel_size,
  29. ulong *load_addressp);
  30. int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
  31. unsigned long initrd_addr, unsigned long initrd_size);
  32. #endif