Advertisement
iocoder

class.h

Jan 25th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.77 KB | None | 0 0
  1. /*
  2.         +----------------------------------------------------------+
  3.         | +------------------------------------------------------+ |
  4.         | |  Quafios Kernel 1.0.1.               | |
  5.         | |  -> Device Classification System.            | |
  6.         | +------------------------------------------------------+ |
  7.         +----------------------------------------------------------+
  8.  
  9. */
  10.  
  11. // This file is part of Quafios 1.0.1 source code.
  12. // Copyright (C) 2012  Mostafa Abd El-Aziz Mohamed.
  13.  
  14. // This program is free software: you can redistribute it and/or modify
  15. // it under the terms of the GNU General Public License as published by
  16. // the Free Software Foundation, either version 3 of the License, or
  17. // (at your option) any later version.
  18.  
  19. // This program is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. // GNU General Public License for more details.
  23.  
  24. // You should have received a copy of the GNU General Public License
  25. // along with Quafios.  If not, see <http://www.gnu.org/licenses/>.
  26.  
  27. // Visit http://www.quafios.com/ for contact information.
  28.  
  29. /* ============================================================== */
  30. /*                          Bus Codes                             */
  31. /* ============================================================== */
  32.  
  33. #define BUS_GENESIS         0x00
  34. #define BUS_HOST            0x01
  35. #define BUS_MEMORY          0x02
  36. #define BUS_PCI             0x03
  37. #define BUS_ISA             0x04
  38. #define BUS_IDE             0x05
  39. #define BUS_IDE_CHANNEL         0x06
  40. #define BUS_SCSI            0x07
  41. #define BUS_DISK            0x08
  42. #define BUS_PCMCIA          0x09
  43. #define BUS_CARDBUS         0x0A
  44. #define BUS_UNDEFINED           0xFF
  45.  
  46. /* ============================================================== */
  47. /*                       PCI Class Codes                          */
  48. /* ============================================================== */
  49.  
  50. #define BASE_PCI_PRE2           0x00
  51. #define  SUB_PCI_PRE2_NOTVGA        0x00
  52. #define  SUB_PCI_PRE2_VGA       0x01
  53.  
  54. #define BASE_PCI_STORAGE        0x01
  55. #define  SUB_PCI_STORAGE_SCSI       0x00
  56. #define  SUB_PCI_STORAGE_IDE        0x01
  57. #define  SUB_PCI_STORAGE_FLOPPY     0x02
  58. #define  SUB_PCI_STORAGE_IPI        0x03
  59. #define  SUB_PCI_STORAGE_RAID       0x04
  60. #define  SUB_PCI_STORAGE_OTHER      0x80
  61.  
  62. #define BASE_PCI_NETWORK        0x02
  63. #define  SUB_PCI_NETWORK_ETHERNET   0x00
  64. #define  SUB_PCI_NETWORK_TOKEN_RING     0x01
  65. #define  SUB_PCI_NETWORK_FDDI       0x02
  66. #define  SUB_PCI_NETWORK_ATM        0x03
  67. #define  SUB_PCI_NETWORK_OTHER      0x80
  68.  
  69. #define BASE_PCI_DISPLAY        0x03
  70. #define  SUB_PCI_DISPLAY_VGA        0x00
  71. #define  SUB_PCI_DISPLAY_XGA        0x01
  72. #define  SUB_PCI_DISPLAY_OTHER      0x80
  73.  
  74. #define BASE_PCI_MULTIMEDIA     0x04
  75. #define  SUB_PCI_MULTIMEDIA_VIDEO   0x00
  76. #define  SUB_PCI_MULTIMEDIA_AUDIO   0x01
  77. #define  SUB_PCI_MULTIMEDIA_OTHER   0x80
  78.  
  79. #define BASE_PCI_MEMORY         0x05
  80. #define  SUB_PCI_MEMORY_RAM     0x00
  81. #define  SUB_PCI_MEMORY_FLASH       0x01
  82. #define  SUB_PCI_MEMORY_OTHER       0x80
  83.  
  84. #define BASE_PCI_BRIDGE         0x06
  85. #define  SUB_PCI_BRIDGE_HOST_TO_PCI 0x00
  86. #define  SUB_PCI_BRIDGE_PCI_TO_ISA  0x01
  87. #define  SUB_PCI_BRIDGE_PCI_TO_EISA 0x02
  88. #define  SUB_PCI_BRIDGE_PCI_TO_MICRO    0x03
  89. #define  SUB_PCI_BRIDGE_PCI_TO_PCI  0x04
  90. #define  SUB_PCI_BRIDGE_PCI_TO_PCMCIA   0x05
  91. #define  SUB_PCI_BRIDGE_PCI_TO_NUBUS    0x06
  92. #define  SUB_PCI_BRIDGE_PCI_TO_CARDBUS  0x07
  93. #define  SUB_PCI_BRIDGE_OTHER       0x80
  94.  
  95. #define BASE_PCI_COMMUNICATION      0x07
  96. #define  SUB_PCI_COMMUNICATION_SERIAL   0x00
  97. #define  SUB_PCI_COMMUNICATION_PARALLEL 0x01
  98. #define  SUB_PCI_COMMUNICATION_OTHER    0x80
  99.  
  100. #define BASE_PCI_PERIPHERALS        0x08
  101. #define  SUB_PCI_PERIPHERALS_PIC    0x00
  102. #define  SUB_PCI_PERIPHERALS_DMA    0x01
  103. #define  SUB_PCI_PERIPHERALS_TIMER  0x02
  104. #define  SUB_PCI_PERIPHERALS_RTC    0x03
  105. #define  SUB_PCI_PERIPHERALS_OTHER  0x80
  106.  
  107. #define BASE_PCI_INPUT          0x09
  108. #define  SUB_PCI_INPUT_KEYBOARD     0x00
  109. #define  SUB_PCI_INPUT_DIGITIZER    0x01
  110. #define  SUB_PCI_INPUT_MOUSE        0x02
  111. #define  SUB_PCI_INPUT_OTHER        0x80
  112.  
  113. #define BASE_PCI_DOCKING        0x0A
  114. #define  SUB_PCI_DOCKING_GENERIC    0x00
  115. #define  SUB_PCI_DOCKING_OTHER      0x80
  116.  
  117. #define BASE_PCI_PROCESSOR      0x0B
  118. #define  SUB_PCI_PROCESSOR_386      0x00
  119. #define  SUB_PCI_PROCESSOR_486      0x01
  120. #define  SUB_PCI_PROCESSOR_PENTIUM  0x02
  121. #define  SUB_PCI_PROCESSOR_ALPHA    0x10
  122. #define  SUB_PCI_PROCESSOR_POWERPC  0x20
  123. #define  SUB_PCI_PROCESSOR_COPROCESSOR  0x40
  124.  
  125. #define BASE_PCI_SERIALBUS      0x0C
  126. #define  SUB_PCI_SERIALBUS_FIREWIRE 0x00
  127. #define  SUB_PCI_SERIALBUS_ACCESS   0x01
  128. #define  SUB_PCI_SERIALBUS_SSA      0x02
  129. #define  SUB_PCI_SERIALBUS_USB      0x03
  130.  
  131. /* ============================================================== */
  132. /*                           Structutres                          */
  133. /* ============================================================== */
  134.  
  135. typedef struct {
  136.     unsigned int bus;   // bus type.
  137.     unsigned int base;  // base class.
  138.     unsigned int sub;   // sub class.
  139. } class_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement