rio.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Derived from include/asm-i386/mach-summit/mach_mpparse.h
  3. * and include/asm-i386/mach-default/bios_ebda.h
  4. *
  5. * Author: Laurent Vivier <Laurent.Vivier@bull.net>
  6. *
  7. */
  8. #ifndef __ASM_RIO_H
  9. #define __ASM_RIO_H
  10. #define RIO_TABLE_VERSION 3
  11. struct rio_table_hdr {
  12. u8 version; /* Version number of this data structure */
  13. u8 num_scal_dev; /* # of Scalability devices */
  14. u8 num_rio_dev; /* # of RIO I/O devices */
  15. } __attribute__((packed));
  16. struct scal_detail {
  17. u8 node_id; /* Scalability Node ID */
  18. u32 CBAR; /* Address of 1MB register space */
  19. u8 port0node; /* Node ID port connected to: 0xFF=None */
  20. u8 port0port; /* Port num port connected to: 0,1,2, or */
  21. /* 0xFF=None */
  22. u8 port1node; /* Node ID port connected to: 0xFF = None */
  23. u8 port1port; /* Port num port connected to: 0,1,2, or */
  24. /* 0xFF=None */
  25. u8 port2node; /* Node ID port connected to: 0xFF = None */
  26. u8 port2port; /* Port num port connected to: 0,1,2, or */
  27. /* 0xFF=None */
  28. u8 chassis_num; /* 1 based Chassis number (1 = boot node) */
  29. } __attribute__((packed));
  30. struct rio_detail {
  31. u8 node_id; /* RIO Node ID */
  32. u32 BBAR; /* Address of 1MB register space */
  33. u8 type; /* Type of device */
  34. u8 owner_id; /* Node ID of Hurricane that owns this */
  35. /* node */
  36. u8 port0node; /* Node ID port connected to: 0xFF=None */
  37. u8 port0port; /* Port num port connected to: 0,1,2, or */
  38. /* 0xFF=None */
  39. u8 port1node; /* Node ID port connected to: 0xFF=None */
  40. u8 port1port; /* Port num port connected to: 0,1,2, or */
  41. /* 0xFF=None */
  42. u8 first_slot; /* Lowest slot number below this Calgary */
  43. u8 status; /* Bit 0 = 1 : the XAPIC is used */
  44. /* = 0 : the XAPIC is not used, ie: */
  45. /* ints fwded to another XAPIC */
  46. /* Bits1:7 Reserved */
  47. u8 WP_index; /* instance index - lower ones have */
  48. /* lower slot numbers/PCI bus numbers */
  49. u8 chassis_num; /* 1 based Chassis number */
  50. } __attribute__((packed));
  51. enum {
  52. HURR_SCALABILTY = 0, /* Hurricane Scalability info */
  53. HURR_RIOIB = 2, /* Hurricane RIOIB info */
  54. COMPAT_CALGARY = 4, /* Compatibility Calgary */
  55. ALT_CALGARY = 5, /* Second Planar Calgary */
  56. };
  57. /*
  58. * there is a real-mode segmented pointer pointing to the
  59. * 4K EBDA area at 0x40E.
  60. */
  61. static inline unsigned long get_bios_ebda(void)
  62. {
  63. unsigned long address= *(unsigned short *)phys_to_virt(0x40Eul);
  64. address <<= 4;
  65. return address;
  66. }
  67. #endif /* __ASM_RIO_H */