Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _LINUX_FW_CFG_H
     20 #define _LINUX_FW_CFG_H
     21 #include <linux/types.h>
     22 #define FW_CFG_ACPI_DEVICE_ID "QEMU0002"
     23 #define FW_CFG_SIGNATURE 0x00
     24 #define FW_CFG_ID 0x01
     25 #define FW_CFG_UUID 0x02
     26 #define FW_CFG_RAM_SIZE 0x03
     27 #define FW_CFG_NOGRAPHIC 0x04
     28 #define FW_CFG_NB_CPUS 0x05
     29 #define FW_CFG_MACHINE_ID 0x06
     30 #define FW_CFG_KERNEL_ADDR 0x07
     31 #define FW_CFG_KERNEL_SIZE 0x08
     32 #define FW_CFG_KERNEL_CMDLINE 0x09
     33 #define FW_CFG_INITRD_ADDR 0x0a
     34 #define FW_CFG_INITRD_SIZE 0x0b
     35 #define FW_CFG_BOOT_DEVICE 0x0c
     36 #define FW_CFG_NUMA 0x0d
     37 #define FW_CFG_BOOT_MENU 0x0e
     38 #define FW_CFG_MAX_CPUS 0x0f
     39 #define FW_CFG_KERNEL_ENTRY 0x10
     40 #define FW_CFG_KERNEL_DATA 0x11
     41 #define FW_CFG_INITRD_DATA 0x12
     42 #define FW_CFG_CMDLINE_ADDR 0x13
     43 #define FW_CFG_CMDLINE_SIZE 0x14
     44 #define FW_CFG_CMDLINE_DATA 0x15
     45 #define FW_CFG_SETUP_ADDR 0x16
     46 #define FW_CFG_SETUP_SIZE 0x17
     47 #define FW_CFG_SETUP_DATA 0x18
     48 #define FW_CFG_FILE_DIR 0x19
     49 #define FW_CFG_FILE_FIRST 0x20
     50 #define FW_CFG_FILE_SLOTS_MIN 0x10
     51 #define FW_CFG_WRITE_CHANNEL 0x4000
     52 #define FW_CFG_ARCH_LOCAL 0x8000
     53 #define FW_CFG_ENTRY_MASK (~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL))
     54 #define FW_CFG_INVALID 0xffff
     55 #define FW_CFG_CTL_SIZE 0x02
     56 #define FW_CFG_MAX_FILE_PATH 56
     57 #define FW_CFG_SIG_SIZE 4
     58 #define FW_CFG_VERSION 0x01
     59 #define FW_CFG_VERSION_DMA 0x02
     60 struct fw_cfg_file {
     61   __be32 size;
     62   __be16 select;
     63   __u16 reserved;
     64   char name[FW_CFG_MAX_FILE_PATH];
     65 };
     66 #define FW_CFG_DMA_CTL_ERROR 0x01
     67 #define FW_CFG_DMA_CTL_READ 0x02
     68 #define FW_CFG_DMA_CTL_SKIP 0x04
     69 #define FW_CFG_DMA_CTL_SELECT 0x08
     70 #define FW_CFG_DMA_CTL_WRITE 0x10
     71 #define FW_CFG_DMA_SIGNATURE 0x51454d5520434647ULL
     72 struct fw_cfg_dma_access {
     73   __be32 control;
     74   __be32 length;
     75   __be64 address;
     76 };
     77 #define FW_CFG_VMCOREINFO_FILENAME "etc/vmcoreinfo"
     78 #define FW_CFG_VMCOREINFO_FORMAT_NONE 0x0
     79 #define FW_CFG_VMCOREINFO_FORMAT_ELF 0x1
     80 struct fw_cfg_vmcoreinfo {
     81   __le16 host_format;
     82   __le16 guest_format;
     83   __le32 size;
     84   __le64 paddr;
     85 };
     86 #endif
     87