win-pvdrivers

changeset 174:02a14f8e0298

Fixed a stupid off by one error which was preventing booting when /gplpv was not specified
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 05 22:18:20 2008 +1100 (2008-02-05)
parents 3583c73e078f
children c8d4df1e1d12
files common.inc xenhide/xenhide.c xenhide/xenhide.inx
line diff
     1.1 --- a/common.inc	Tue Feb 05 17:14:27 2008 +1100
     1.2 +++ b/common.inc	Tue Feb 05 22:18:20 2008 +1100
     1.3 @@ -1,4 +1,4 @@
     1.4 -VERSION=0.6.5.13
     1.5 +VERSION=0.6.5.15
     1.6  TARGETPATH=..\Target\$(DDK_TARGET_OS)
     1.7  KMDF_VERSION=1
     1.8  !IF $(_NT_TOOLS_VERSION) > 0x700
     2.1 --- a/xenhide/xenhide.c	Tue Feb 05 17:14:27 2008 +1100
     2.2 +++ b/xenhide/xenhide.c	Tue Feb 05 22:18:20 2008 +1100
     2.3 @@ -75,9 +75,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     2.4    }
     2.5    else
     2.6      ZwClose(RegHandle);
     2.7 -//  KdPrint((__DRIVER_NAME "     BufLen = %d\n", BufLen));
     2.8    KeyPartialValue = (PKEY_VALUE_PARTIAL_INFORMATION)Buf;
     2.9 -//  KdPrint((__DRIVER_NAME "     Buf = %ws\n", KeyPartialValue->Data));
    2.10    SystemStartOptions = (WCHAR *)KeyPartialValue->Data;
    2.11  
    2.12    AutoEnumerate = FALSE;
    2.13 @@ -138,12 +136,11 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
    2.14  
    2.15    KdPrint((__DRIVER_NAME "     AutoEnumerate = %d\n", AutoEnumerate));
    2.16  
    2.17 -  for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
    2.18 +  for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
    2.19      DriverObject->MajorFunction[i] = XenHide_Pass;
    2.20    if (AutoEnumerate)
    2.21      DriverObject->MajorFunction[IRP_MJ_PNP] = XenHide_Pnp;
    2.22    DriverObject->DriverExtension->AddDevice = XenHide_AddDevice;
    2.23 -//  DriverObject->DriverUnload = XenHide_Unload;
    2.24  
    2.25    KdPrint((__DRIVER_NAME " <-- DriverEntry\n"));
    2.26  
    2.27 @@ -291,10 +288,9 @@ XenHide_IoCompletion(PDEVICE_OBJECT Devi
    2.28  static NTSTATUS
    2.29  XenHide_Pass(PDEVICE_OBJECT DeviceObject, PIRP Irp)
    2.30  {
    2.31 -  PDEVICE_EXTENSION DeviceExtension;
    2.32 +  PDEVICE_EXTENSION DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
    2.33    NTSTATUS status;
    2.34      
    2.35 -  DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
    2.36    IoSkipCurrentIrpStackLocation(Irp);
    2.37    status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
    2.38    return status;
    2.39 @@ -319,17 +315,9 @@ XenHide_Pnp(PDEVICE_OBJECT DeviceObject,
    2.40      {
    2.41      case BusRelations:
    2.42        KdPrint((__DRIVER_NAME "       BusRelations\n"));
    2.43 -      if (AutoEnumerate)
    2.44 -      {
    2.45 -        IoCopyCurrentIrpStackLocationToNext(Irp);
    2.46 -        IoSetCompletionRoutine(Irp, XenHide_IoCompletion, NULL, TRUE, TRUE, TRUE);
    2.47 -        Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
    2.48 -      }
    2.49 -      else
    2.50 -      {
    2.51 -        IoSkipCurrentIrpStackLocation(Irp);
    2.52 -        Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
    2.53 -      }
    2.54 +      IoCopyCurrentIrpStackLocationToNext(Irp);
    2.55 +      IoSetCompletionRoutine(Irp, XenHide_IoCompletion, NULL, TRUE, TRUE, TRUE);
    2.56 +      Status = IoCallDriver(DeviceExtension->NextLowerDevice, Irp);
    2.57        break;  
    2.58      default:
    2.59        IoSkipCurrentIrpStackLocation(Irp);
     3.1 --- a/xenhide/xenhide.inx	Tue Feb 05 17:14:27 2008 +1100
     3.2 +++ b/xenhide/xenhide.inx	Tue Feb 05 22:18:20 2008 +1100
     3.3 @@ -27,7 +27,6 @@ DefaultDestDir = 12
     3.4  Include=machine.inf
     3.5  Needs=PCI_DRV_ROOT.NT
     3.6  CopyFiles=XenHide.CopyFiles
     3.7 -;AddReg=
     3.8  
     3.9  [XenHide_Inst.NT.HW]
    3.10  AddReg = XenHide_Inst_HW_AddReg
    3.11 @@ -52,21 +51,16 @@ 1 = %DISK_NAME%,,,\amd64
    3.12  [XenHide_Inst.NT.Services]
    3.13  AddService=XenHide,,XenHide_Service_Inst
    3.14  Include=Machine.inf
    3.15 -;Needs=PCI_DRV_ROOT.NT.Services
    3.16  Needs=PCI_DRV_ROOT.Services
    3.17  
    3.18  [XenHide_Service_Inst]
    3.19 -DisplayName    = %XenHide.SVCDESC%                            
    3.20 +DisplayName    = %XenHide.SVCDESC%
    3.21  ServiceType    = 1
    3.22  StartType      = 0
    3.23  ErrorControl   = 1
    3.24 -ServiceBinary  = %12%\xenhide.sys                          
    3.25 +ServiceBinary  = %12%\xenhide.sys
    3.26  LoadOrderGroup = Boot Bus Extender
    3.27  
    3.28 -[XenHide_Inst.NT.CoInstallers]
    3.29 -AddReg=CoInstaller_AddReg
    3.30 -CopyFiles=CoInstaller_CopyFiles
    3.31 -
    3.32  [Strings]
    3.33  JAMESHARPER = "James Harper"
    3.34  XenHide.SVCDESC = "Xen PCI Device Hider Driver"