Advertisement
Guest User

SSDT patch for macOS with VFIO GPU

a guest
Apr 24th, 2019
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. // This file (after compiling with MaciASL) gets put into /EFI/Clover/ACPI/patched
  2.  
  3. DefinitionBlock ("", "SSDT", 2, "hack", "GFX", 0x00000000)
  4. {
  5. External (_SB_.PCI0.PEGP, DeviceObj) // <--- This is the device that had the correct address for my passthrough GPU (0x001C0000); it just isn't correctly identified by macOS (needs GFX0 and DTGP). It may vary depending on your system configuration
  6. External (DTGP, MethodObj) // <--- This refers to a DTGP method added by Clover (Clover Configurator makes it easy to enable the option)
  7.  
  8. Scope (_SB.PCI0.PEGP)
  9. {
  10. Name (_PRW, Package (0x02)
  11. {
  12. 0x09,
  13. 0x05
  14. })
  15. Device (GFX0)
  16. {
  17. Name (_ADR, Zero)
  18. Method (_DSM, 4, NotSerialized)
  19. {
  20. Store (Package (0x0E)
  21. {
  22. "@0,connector-type",
  23. Buffer (0x04)
  24. {
  25. 0x00, 0x08, 0x00, 0x00
  26. },
  27.  
  28. "@1,connector-type",
  29. Buffer (0x04)
  30. {
  31. 0x00, 0x08, 0x00, 0x00
  32. },
  33.  
  34. "@2,connector-type",
  35. Buffer (0x04)
  36. {
  37. 0x00, 0x08, 0x00, 0x00
  38. },
  39.  
  40. "@3,connector-type",
  41. Buffer (0x04)
  42. {
  43. 0x00, 0x08, 0x00, 0x00
  44. },
  45.  
  46. "@4,connector-type",
  47. Buffer (0x04)
  48. {
  49. 0x00, 0x08, 0x00, 0x00
  50. },
  51.  
  52. "@5,connector-type",
  53. Buffer (0x04)
  54. {
  55. 0x00, 0x08, 0x00, 0x00
  56. },
  57.  
  58. "hda-gfx",
  59. Buffer (0x0A)
  60. {
  61. "onboard-1"
  62. }
  63. }, Local0)
  64. DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
  65. Return (Local0)
  66. }
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement