Kevin O'Connor wrote:
Sebastian Herbszt: 20100731: EDD fixes
- Initial patch looked like it may break backwards compatibility; I haven't seen a new patch.
We could use an union to keep backwards compatibility. Something like the following (for Bochs):
typedef struct { Bit16u size; Bit16u infos; Bit32u cylinders; Bit32u heads; Bit32u spt; Bit32u sector_count1; Bit32u sector_count2; Bit16u blksize; Bit16u dpte_offset; Bit16u dpte_segment; Bit16u key; union { struct { Bit8u dpi_length; Bit8u reserved1; Bit16u reserved2; Bit8u host_bus[4]; Bit8u iface_type[8]; Bit8u iface_path[8]; Bit8u device_path[8]; Bit8u reserved3; Bit8u checksum; } phoenix; struct { Bit8u dpi_length; Bit8u reserved1; Bit16u reserved2; Bit8u host_bus[4]; Bit8u iface_type[8]; Bit8u iface_path[8]; Bit8u device_path[16]; Bit8u reserved3; Bit8u checksum; } t13; } dpi; } dpt_t;
Use dpi.phoenix for size = 66 and dpi.t13 for size = 74. Since the first part of phoenix and t13 is same the union could start at device_path.
Sebastian