mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
Make asm-x86/bootparam.h includable from userspace.
To actually write a bootloader (or, say, the lguest launcher) currently requires duplication of these structures. Making them includable from userspace is much nicer. We merge the common userspace-required definitions of e820_32/64.h into e820.h for export. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9525ca0286
commit
ee8e7cfe9d
13 changed files with 229 additions and 225 deletions
|
@ -67,113 +67,113 @@
|
|||
#define EDD_INFO_USE_INT13_FN50 (1 << 7)
|
||||
|
||||
struct edd_device_params {
|
||||
u16 length;
|
||||
u16 info_flags;
|
||||
u32 num_default_cylinders;
|
||||
u32 num_default_heads;
|
||||
u32 sectors_per_track;
|
||||
u64 number_of_sectors;
|
||||
u16 bytes_per_sector;
|
||||
u32 dpte_ptr; /* 0xFFFFFFFF for our purposes */
|
||||
u16 key; /* = 0xBEDD */
|
||||
u8 device_path_info_length; /* = 44 */
|
||||
u8 reserved2;
|
||||
u16 reserved3;
|
||||
u8 host_bus_type[4];
|
||||
u8 interface_type[8];
|
||||
__u16 length;
|
||||
__u16 info_flags;
|
||||
__u32 num_default_cylinders;
|
||||
__u32 num_default_heads;
|
||||
__u32 sectors_per_track;
|
||||
__u64 number_of_sectors;
|
||||
__u16 bytes_per_sector;
|
||||
__u32 dpte_ptr; /* 0xFFFFFFFF for our purposes */
|
||||
__u16 key; /* = 0xBEDD */
|
||||
__u8 device_path_info_length; /* = 44 */
|
||||
__u8 reserved2;
|
||||
__u16 reserved3;
|
||||
__u8 host_bus_type[4];
|
||||
__u8 interface_type[8];
|
||||
union {
|
||||
struct {
|
||||
u16 base_address;
|
||||
u16 reserved1;
|
||||
u32 reserved2;
|
||||
__u16 base_address;
|
||||
__u16 reserved1;
|
||||
__u32 reserved2;
|
||||
} __attribute__ ((packed)) isa;
|
||||
struct {
|
||||
u8 bus;
|
||||
u8 slot;
|
||||
u8 function;
|
||||
u8 channel;
|
||||
u32 reserved;
|
||||
__u8 bus;
|
||||
__u8 slot;
|
||||
__u8 function;
|
||||
__u8 channel;
|
||||
__u32 reserved;
|
||||
} __attribute__ ((packed)) pci;
|
||||
/* pcix is same as pci */
|
||||
struct {
|
||||
u64 reserved;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) ibnd;
|
||||
struct {
|
||||
u64 reserved;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) xprs;
|
||||
struct {
|
||||
u64 reserved;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) htpt;
|
||||
struct {
|
||||
u64 reserved;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) unknown;
|
||||
} interface_path;
|
||||
union {
|
||||
struct {
|
||||
u8 device;
|
||||
u8 reserved1;
|
||||
u16 reserved2;
|
||||
u32 reserved3;
|
||||
u64 reserved4;
|
||||
__u8 device;
|
||||
__u8 reserved1;
|
||||
__u16 reserved2;
|
||||
__u32 reserved3;
|
||||
__u64 reserved4;
|
||||
} __attribute__ ((packed)) ata;
|
||||
struct {
|
||||
u8 device;
|
||||
u8 lun;
|
||||
u8 reserved1;
|
||||
u8 reserved2;
|
||||
u32 reserved3;
|
||||
u64 reserved4;
|
||||
__u8 device;
|
||||
__u8 lun;
|
||||
__u8 reserved1;
|
||||
__u8 reserved2;
|
||||
__u32 reserved3;
|
||||
__u64 reserved4;
|
||||
} __attribute__ ((packed)) atapi;
|
||||
struct {
|
||||
u16 id;
|
||||
u64 lun;
|
||||
u16 reserved1;
|
||||
u32 reserved2;
|
||||
__u16 id;
|
||||
__u64 lun;
|
||||
__u16 reserved1;
|
||||
__u32 reserved2;
|
||||
} __attribute__ ((packed)) scsi;
|
||||
struct {
|
||||
u64 serial_number;
|
||||
u64 reserved;
|
||||
__u64 serial_number;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) usb;
|
||||
struct {
|
||||
u64 eui;
|
||||
u64 reserved;
|
||||
__u64 eui;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) i1394;
|
||||
struct {
|
||||
u64 wwid;
|
||||
u64 lun;
|
||||
__u64 wwid;
|
||||
__u64 lun;
|
||||
} __attribute__ ((packed)) fibre;
|
||||
struct {
|
||||
u64 identity_tag;
|
||||
u64 reserved;
|
||||
__u64 identity_tag;
|
||||
__u64 reserved;
|
||||
} __attribute__ ((packed)) i2o;
|
||||
struct {
|
||||
u32 array_number;
|
||||
u32 reserved1;
|
||||
u64 reserved2;
|
||||
__u32 array_number;
|
||||
__u32 reserved1;
|
||||
__u64 reserved2;
|
||||
} __attribute__ ((packed)) raid;
|
||||
struct {
|
||||
u8 device;
|
||||
u8 reserved1;
|
||||
u16 reserved2;
|
||||
u32 reserved3;
|
||||
u64 reserved4;
|
||||
__u8 device;
|
||||
__u8 reserved1;
|
||||
__u16 reserved2;
|
||||
__u32 reserved3;
|
||||
__u64 reserved4;
|
||||
} __attribute__ ((packed)) sata;
|
||||
struct {
|
||||
u64 reserved1;
|
||||
u64 reserved2;
|
||||
__u64 reserved1;
|
||||
__u64 reserved2;
|
||||
} __attribute__ ((packed)) unknown;
|
||||
} device_path;
|
||||
u8 reserved4;
|
||||
u8 checksum;
|
||||
__u8 reserved4;
|
||||
__u8 checksum;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct edd_info {
|
||||
u8 device;
|
||||
u8 version;
|
||||
u16 interface_support;
|
||||
u16 legacy_max_cylinder;
|
||||
u8 legacy_max_head;
|
||||
u8 legacy_sectors_per_track;
|
||||
__u8 device;
|
||||
__u8 version;
|
||||
__u16 interface_support;
|
||||
__u16 legacy_max_cylinder;
|
||||
__u8 legacy_max_head;
|
||||
__u8 legacy_sectors_per_track;
|
||||
struct edd_device_params params;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
@ -184,8 +184,9 @@ struct edd {
|
|||
unsigned char edd_info_nr;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
extern struct edd edd;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /*!__ASSEMBLY__ */
|
||||
|
||||
#endif /* _LINUX_EDD_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue