1 Install Driver in a Windows VM
Bart House редактировал(а) эту страницу 2015-11-05 15:49:39 -08:00

Before installing the Render Only Sample driver you will need to modify the ACPI information of the VM to report the existence of a render only device. Here are the steps you need to follow to modify the ACPI information:

  1. Launch an administrator command prompt within the VM
  2. Turn on test signing by running:
    bcdedit -set testsigning on
  3. Get a copy of the asl.exe tool from WDK\Tools\x64\ACPIVerify
  4. Use asl.exe to get a copy of the DSDT.ASL source (this the ACPI file used to report devices) by running:
    asl.exe /tab=DSDT
  5. Modify the definition block in the DSDT.ASL bumping up version of the DSDT
    DefinitionBlock("DSDT.AM", "DSDT", 0x02, "MSFTVM", "MSFTVM02", 0x00000003)
  6. Modify DSDT.ASL to add the description of the ROSD device within the SB scope
Scope(\_SB_)
{
  Device(ROSD)
  {
    Name(_CID, "RenderOnlySample")
    Name(_HID, "RenderOnlySample")
    Name(_UID, 0x0)
    Name(_CRS, Buffer(0x5)
    {
      0x22,   // IRQ descriptor
      0x04,   // Low part of IRQ mask, IRQ 2
      0x00,   // High part of IRQ mask
      0x79,   // End tag
      0x00
    })
    Method(PMCD)   // Power Management Component Data *** THIS IS JUST A SAMPLE ***
    {
      Name(RBUF, Package()
      {
        1,         // Version
        1,         // Number of graphics power components
        Package()  // Power components package
        {
          Package()  // GPU component package
          {
            0,       // Component Index
            0,       // DXGK_POWER_COMPONENT_MAPPING.ComponentType (0 = DXGK_POWER_COMPONENT_ENGINE)
            0,       // DXGK_POWER_COMPONENT_MAPPING.NodeIndex
            Buffer() // DXGK_POWER_RUNTIME_COMPONENT.ComponentGuid
            {
              0xb5, 0x54, 0x2d, 0xf0, 0xa9, 0x0f, 0x80, 0x4a, // f02d54b5-0fa9-4a80-854d-37613ab836ea
              0x85, 0x4d, 0x37, 0x61, 0x3a, 0xb8, 0x36, 0xea
            },
            "3D_Engine_00", // DXGK_POWER_RUNTIME_COMPONENT.ComponentName
            3,              // DXGK_POWER_RUNTIME_COMPONENT.StateCount
            Package()       // DXGK_POWER_RUNTIME_COMPONENT.States[] package
            {
              Package()     // F0
              {
                 0,         // DXGK_POWER_RUNTIME_STATE.TransitionLatency
                 0,         // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement
                 8,         // DXGK_POWER_RUNTIME_STATE.NominalPower
              },
              Package()     // F1
              {
                 10000,     // DXGK_POWER_RUNTIME_STATE.TransitionLatency
                 0,         // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement
                 4,         // DXGK_POWER_RUNTIME_STATE.NominalPower
              },
              Package()     // F2
              {
                 20000,     // DXGK_POWER_RUNTIME_STATE.TransitionLatency
                 0,         // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement
                 2,         // DXGK_POWER_RUNTIME_STATE.NominalPower
              },
            }
          }
        }
      })
      Return(RBUF)
    }
  }
}

  NOTES:  
  0x22, 0x04, 0x00 adds an interrupt resource. 1st byte (0x22) is type of resource.  
  0x79, 0x00 indicates end of "Current Resource" _CRS table.  

Reference: http://www.baldwin.cx/~phoenix/reference/docs/acpi_impguide.pdf
7. Compile the modified DSDT.ASL to generate DSDT.AML by running:
asl.exe DSDT.ASL
8. Load the modified DSDT.AML into the registry for use in next boot by running:
asl /loadtable -v DSDT.AML


To install the driver:

  1. Force the use of WARP by XAML by running:
    reg.exe add HKLM\SOFTWARE\Microsoft\XAML /v ForceWARP /t REG_DWORD /d 1
  2. Copy ros.inf, roskmd.sys and rosumd.dll into a folder
  3. In the folder with the driver files run:
    devcon.exe update ros.inf ACPI\RENDERONLYSAMPLE
    NOTE: You can find devcon.exe in WDK\Tools\x64
    NOTE: When connecting to VM do not use "Enhanced session"