Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pc-drivers.dhall 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. let Genode = env:DHALL_GENODE
  2. let Prelude = Genode.Prelude
  3. let XML = Prelude.XML
  4. let Init = Genode.Init
  5. let Child = Init.Child
  6. let Resources = Init.Resources
  7. let ServiceRoute = Init.ServiceRoute
  8. let label =
  9. λ(label : Text)
  10. → { local = label, route = label } : Child.Attributes.Label
  11. let relabel =
  12. λ(local : Text)
  13. → λ(route : Text)
  14. → { local = local, route = route } : Child.Attributes.Label
  15. let drivers =
  16. Init::{
  17. , routes = [ ServiceRoute.parent "Timer" ]
  18. , services =
  19. [ ServiceRoute.child "Framebuffer" "dynamic"
  20. , ServiceRoute.child "Block" "dynamic"
  21. , ServiceRoute.child "Usb" "usb_drv"
  22. , ServiceRoute.child "Platform" "platform_drv"
  23. , ServiceRoute.child "Input" "event_filter"
  24. ]
  25. , children = toMap
  26. { rom_reporter =
  27. Child.flat
  28. Child.Attributes::{
  29. , binary = "rom_reporter"
  30. , config = Init.Config::{
  31. , content =
  32. [ XML.text
  33. ''
  34. <rom label="acpi"/>
  35. <rom label="pci_devices"/>
  36. <rom label="usb_devices"/>
  37. ''
  38. ]
  39. }
  40. , reportRoms =
  41. [ label "acpi", label "pci_devices", label "usb_devices" ]
  42. , routes =
  43. let routeReportToParent =
  44. λ(label : Text)
  45. → ServiceRoute.parentLabel
  46. "Report"
  47. (Some label)
  48. (Some label)
  49. in [ routeReportToParent "acpi"
  50. , routeReportToParent "pci_devices"
  51. , routeReportToParent "usb_devices"
  52. ]
  53. }
  54. , acpi_drv =
  55. Child.flat
  56. Child.Attributes::{
  57. , binary = "acpi_drv"
  58. , priority = 1
  59. , resources = Resources::{
  60. , caps = 350
  61. , ram = Genode.units.MiB 4
  62. }
  63. , romReports = [ label "acpi" ]
  64. , routes =
  65. [ ServiceRoute.parent "IO_MEM"
  66. , ServiceRoute.parentLabel
  67. "Report"
  68. (Some "smbios_table")
  69. (Some "smbios_table")
  70. ]
  71. }
  72. , platform_drv =
  73. Child.flat
  74. Child.Attributes::{
  75. , binary = "platform_drv"
  76. , resources = Resources::{
  77. , caps = 400
  78. , ram = Genode.units.MiB 4
  79. , constrainPhys = True
  80. }
  81. , provides = [ "Acpi", "Platform" ]
  82. , reportRoms = [ label "acpi" ]
  83. , romReports = [ relabel "pci" "pci_devices" ]
  84. , routes =
  85. [ ServiceRoute.parent "IRQ"
  86. , ServiceRoute.parent "IO_MEM"
  87. , ServiceRoute.parent "IO_PORT"
  88. , ServiceRoute.parentLabel
  89. "ROM"
  90. (Some "system")
  91. (Some "system")
  92. ]
  93. , config = Init.Config::{
  94. , attributes = toMap { system = "yes" }
  95. , content =
  96. [ XML.text
  97. ''
  98. <report pci="yes"/>
  99. <policy label_prefix="ps2_drv">
  100. <device name="PS2"/>
  101. </policy>
  102. <policy label_prefix="dynamic -> vesa_fb_drv">
  103. <pci class="VGA"/>
  104. </policy>
  105. <policy label_prefix="dynamic -> ahci_drv">
  106. <pci class="AHCI"/>
  107. </policy>
  108. <policy label_prefix="dynamic -> nvme_drv">
  109. <pci class="NVME"/>
  110. </policy>
  111. <policy label_prefix="usb_drv">
  112. <pci class="USB"/>
  113. </policy>
  114. <policy label_prefix="dynamic -> intel_fb_drv">
  115. <pci class="VGA"/>
  116. <pci bus="0" device="0" function="0"/>
  117. <pci class="ISABRIDGE"/>
  118. </policy>
  119. <policy label_suffix="-> wifi">
  120. <pci class="WIFI"/>
  121. </policy>
  122. <policy label_suffix="-> nic">
  123. <pci class="ETHERNET"/>
  124. </policy>
  125. <policy label_suffix="-> audio">
  126. <pci class="AUDIO"/>
  127. <pci class="HDAUDIO"/>
  128. </policy>
  129. <policy label="acpica"/>
  130. ''
  131. ]
  132. }
  133. }
  134. , usb_drv =
  135. Child.flat
  136. Child.Attributes::{
  137. , binary = "usb_drv"
  138. , priority = 1
  139. , resources = Resources::{
  140. , caps = 200
  141. , ram = Genode.units.MiB 16
  142. }
  143. , provides = [ "Input", "Usb" ]
  144. , reportRoms = [ relabel "config" "usb_drv.config" ]
  145. , romReports = [ relabel "devices" "usb_devices" ]
  146. , routes =
  147. [ ServiceRoute.child "Platform" "platform_drv"
  148. , ServiceRoute.parentLabel
  149. "Report"
  150. (Some "config")
  151. (Some "usb_active_config")
  152. ]
  153. }
  154. , ps2_drv =
  155. Child.flat
  156. Child.Attributes::{
  157. , binary = "ps2_drv"
  158. , provides = [ "Input" ]
  159. , routes = [ ServiceRoute.child "Platform" "platform_drv" ]
  160. }
  161. , event_filter =
  162. Child.flat
  163. Child.Attributes::{
  164. , binary = "event_filter"
  165. , priority = 1
  166. , resources = Resources::{ ram = Genode.units.MiB 2 }
  167. , provides = [ "Input" ]
  168. , routes =
  169. [ ServiceRoute.parentLabel
  170. "ROM"
  171. (Some "config")
  172. (Some "event_filter.config")
  173. , ServiceRoute.childLabel
  174. "Input"
  175. "ps2_drv"
  176. (Some "ps2")
  177. (None Text)
  178. , ServiceRoute.childLabel
  179. "Input"
  180. "usb_drv"
  181. (Some "usb")
  182. (None Text)
  183. ]
  184. }
  185. , driver_manager =
  186. Child.flat
  187. Child.Attributes::{
  188. , binary = "driver_manager"
  189. , priority = 1
  190. , reportRoms =
  191. [ label "ahci_ports"
  192. , label "nvme_ns"
  193. , label "pci_devices"
  194. , label "usb_devices"
  195. ]
  196. , romReports =
  197. [ relabel "init.config" "dynamic.config"
  198. , label "usb_drv.config"
  199. ]
  200. , routes =
  201. [ ServiceRoute.parentLabel
  202. "Report"
  203. (Some "block_devices")
  204. (Some "block_devices")
  205. , ServiceRoute.parentLabel
  206. "ROM"
  207. (Some "usb_policy")
  208. (Some "usb_policy")
  209. ]
  210. }
  211. , dynamic =
  212. Child.flat
  213. Child.Attributes::{
  214. , binary = "init"
  215. , priority = 1
  216. , resources = Resources::{
  217. , caps = 1400
  218. , ram = Genode.units.MiB 64
  219. }
  220. , provides = [ "Framebuffer", "Block" ]
  221. , romReports = [ label "ahci_ports", label "nvme_ns" ]
  222. , reportRoms = [ relabel "config" "dynamic.config" ]
  223. , routes =
  224. [ ServiceRoute.child "Platform" "platform_drv"
  225. , ServiceRoute.child "Usb" "usb_drv"
  226. , ServiceRoute.parent "Timer"
  227. , ServiceRoute.parent "Report"
  228. , ServiceRoute.parent "IO_MEM"
  229. , ServiceRoute.parent "IO_PORT"
  230. ]
  231. }
  232. }
  233. }
  234. in drivers