SsdtRos.asl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /** @file
  2. * Secondary System Description Table Fields (SSDT)
  3. *
  4. * Copyright (c) 2020-2021, Arm Ltd. All rights reserved.
  5. *
  6. * SPDX-License-Identifier: BSD-2-Clause-Patent
  7. *
  8. **/
  9. #include "SgiPlatform.h"
  10. #include "SgiAcpiHeader.h"
  11. DefinitionBlock ("SsdtRosTable.aml", "SSDT", 2, "ARMLTD", "ARMSGI",
  12. EFI_ACPI_ARM_OEM_REVISION) {
  13. Scope (_SB) {
  14. // UART PL011
  15. Device (COM0) {
  16. Name (_HID, "ARMH0011")
  17. Name (_CID, "ARMH0011")
  18. Name (_UID, Zero)
  19. Name (_STA, 0xF)
  20. Name (_CRS, ResourceTemplate () {
  21. Memory32Fixed (
  22. ReadWrite,
  23. FixedPcdGet64 (PcdSerialRegisterBase),
  24. 0x1000
  25. )
  26. Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { FixedPcdGet32 (PL011UartInterrupt) }
  27. })
  28. }
  29. Device (COM1) {
  30. Name (_HID, "ARMH0011")
  31. Name (_CID, "ARMH0011")
  32. Name (_UID, One)
  33. Name (_STA, 0xF)
  34. Name (_CRS, ResourceTemplate () {
  35. Memory32Fixed (
  36. ReadWrite,
  37. FixedPcdGet64 (PcdSerialDbgRegisterBase),
  38. 0x1000
  39. )
  40. Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { FixedPcdGet32 (PcdSerialDbgInterrupt) }
  41. })
  42. }
  43. // VIRTIO DISK
  44. Device (VR00) {
  45. Name (_HID, "LNRO0005")
  46. Name (_UID, 0)
  47. Name (_CCA, 1) // mark the device coherent
  48. Name (_CRS, ResourceTemplate() {
  49. Memory32Fixed (
  50. ReadWrite,
  51. FixedPcdGet32 (PcdVirtioBlkBaseAddress),
  52. FixedPcdGet32 (PcdVirtioBlkSize)
  53. )
  54. Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
  55. FixedPcdGet32 (PcdVirtioBlkInterrupt)
  56. }
  57. })
  58. }
  59. // VIRTIO NET
  60. Device (VR01) {
  61. Name (_HID, "LNRO0005")
  62. Name (_UID, 1)
  63. Name (_CCA, 1) // mark the device coherent
  64. Name (_CRS, ResourceTemplate() {
  65. Memory32Fixed (ReadWrite,
  66. FixedPcdGet32 (PcdVirtioNetBaseAddress),
  67. FixedPcdGet32 (PcdVirtioNetSize)
  68. )
  69. Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
  70. FixedPcdGet32 (PcdVirtioNetInterrupt)
  71. }
  72. })
  73. }
  74. } // Scope(_SB)
  75. }