Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

elf_boot.h 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef ELF_BOOT_H
  2. #define ELF_BOOT_H
  3. /* This defines the structure of a table of parameters useful for ELF
  4. * bootable images. These parameters are all passed and generated
  5. * by the bootloader to the booted image. For simplicity and
  6. * consistency the Elf Note format is reused.
  7. *
  8. * All of the information must be Position Independent Data.
  9. * That is it must be safe to relocate the whole ELF boot parameter
  10. * block without changing the meaning or correctnes of the data.
  11. * Additionally it must be safe to permute the order of the ELF notes
  12. * to any possible permutation without changing the meaning or correctness
  13. * of the data.
  14. *
  15. */
  16. #define ELF_BHDR_MAGIC 0x0E1FB007
  17. #ifndef ASSEMBLY
  18. #include <stdint.h>
  19. typedef uint16_t Elf_Half;
  20. typedef uint32_t Elf_Word;
  21. typedef struct Elf_Bhdr
  22. {
  23. Elf_Word b_signature; /* "0x0E1FB007" */
  24. Elf_Word b_size;
  25. Elf_Half b_checksum;
  26. Elf_Half b_records;
  27. } Elf_Bhdr;
  28. typedef struct Elf_Nhdr
  29. {
  30. Elf_Word n_namesz; /* Length of the note's name. */
  31. Elf_Word n_descsz; /* Length of the note's descriptor. */
  32. Elf_Word n_type; /* Type of the note. */
  33. } Elf_Nhdr;
  34. #endif /* ASSEMBLY */
  35. /* Standardized Elf image notes for booting... The name for all of these is ELFBoot */
  36. #define ELF_NOTE_BOOT "ELFBoot"
  37. #define EIN_PROGRAM_NAME 0x00000001
  38. /* The program in this ELF file */
  39. #define EIN_PROGRAM_VERSION 0x00000002
  40. /* The version of the program in this ELF file */
  41. #define EIN_PROGRAM_CHECKSUM 0x00000003
  42. /* ip style checksum of the memory image. */
  43. /* Notes that are passed to a loaded image */
  44. /* For standard notes n_namesz must be zero */
  45. #define EBN_FIRMWARE_TYPE 0x00000001
  46. /* ASCIZ name of the platform firmware. */
  47. #define EBN_BOOTLOADER_NAME 0x00000002
  48. /* This specifies just the ASCIZ name of the bootloader */
  49. #define EBN_BOOTLOADER_VERSION 0x00000003
  50. /* This specifies the version of the bootloader as an ASCIZ string */
  51. #define EBN_COMMAND_LINE 0x00000004
  52. /* This specifies a command line that can be set by user interaction,
  53. * and is provided as a free form ASCIZ string to the loaded image.
  54. */
  55. #define EBN_NOP 0x00000005
  56. /* A note nop note has no meaning, useful for inserting explicit padding */
  57. #define EBN_LOADED_IMAGE 0x00000006
  58. /* An ASCIZ string naming the loaded image */
  59. /* Etherboot specific notes */
  60. #define EB_PARAM_NOTE "Etherboot"
  61. #define EB_IA64_SYSTAB 0x00000001
  62. #define EB_IA64_MEMMAP 0x00000002
  63. #define EB_IA64_FPSWA 0x00000003
  64. #define EB_IA64_CONINFO 0x00000004
  65. #define EB_BOOTP_DATA 0x00000005
  66. #define EB_HEADER 0x00000006
  67. #define EB_IA64_IMAGE_HANDLE 0x00000007
  68. #define EB_I386_MEMMAP 0x00000008
  69. #endif /* ELF_BOOT_H */