win-pvdrivers

changeset 487:8a0a695cdd97

new config method
author James Harper <james.harper@bendigoit.com.au>
date Mon Dec 08 23:32:55 2008 +1100 (2008-12-08)
parents efb43e8b47ec
children 1c56a1caed9f
files xenvbd/xenvbd.c xenvbd/xenvbd.inx
line diff
     1.1 --- a/xenvbd/xenvbd.c	Mon Dec 08 23:32:47 2008 +1100
     1.2 +++ b/xenvbd/xenvbd.c	Mon Dec 08 23:32:55 2008 +1100
     1.3 @@ -1368,10 +1368,24 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     1.4    ULONG status;
     1.5    HW_INITIALIZATION_DATA HwInitializationData;
     1.6    PCONFIGURATION_INFORMATION conf_info;
     1.7 +  PVOID driver_extension;
     1.8 +  PUCHAR ptr;
     1.9  
    1.10 -  KdPrint((__DRIVER_NAME " --> "__FUNCTION__ "\n"));
    1.11 +  FUNCTION_ENTER();
    1.12    KdPrint((__DRIVER_NAME "     IRQL = %d\n", KeGetCurrentIrql()));
    1.13  
    1.14 +  IoAllocateDriverObjectExtension(DriverObject, UlongToPtr(XEN_INIT_DRIVER_EXTENSION_MAGIC), PAGE_SIZE, &driver_extension);
    1.15 +  ptr = driver_extension;
    1.16 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_RUN, NULL, NULL);
    1.17 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_RING, "ring-ref", NULL);
    1.18 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_EVENT_CHANNEL_IRQ, "event-channel", NULL);
    1.19 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_FRONT, "device-type", NULL);
    1.20 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "mode", NULL);
    1.21 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "sectors", NULL);
    1.22 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "sector-size", NULL);
    1.23 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_GRANT_ENTRIES, NULL, UlongToPtr(144));
    1.24 +  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_END, NULL, NULL);       
    1.25 +
    1.26    /* RegistryPath == NULL when we are invoked as a crash dump driver */
    1.27    if (!RegistryPath)
    1.28    {
    1.29 @@ -1430,7 +1444,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
    1.30      KdPrint((__DRIVER_NAME " ScsiPortInitialize failed with status 0x%08x\n", status));
    1.31    }
    1.32  
    1.33 -  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    1.34 +  FUNCTION_EXIT();
    1.35  
    1.36    return status;
    1.37  }
     2.1 --- a/xenvbd/xenvbd.inx	Mon Dec 08 23:32:47 2008 +1100
     2.2 +++ b/xenvbd/xenvbd.inx	Mon Dec 08 23:32:55 2008 +1100
     2.3 @@ -26,11 +26,9 @@ CopyFiles=XenVbd.CopyFiles
     2.4  
     2.5  [XenVbd.CopyFiles]
     2.6  xenvbd.sys
     2.7 -xenconfig.sys
     2.8  
     2.9  [XenVbd_Inst.NT.Services]
    2.10  AddService=XenVbd,2,XenVbd_Service, XenVbd_EventLog
    2.11 -AddService=XenConfig,0,XenConfig_Service
    2.12  
    2.13  [XenVbd_Service]
    2.14  DisplayName    = %XenVbd.SVCDESC%                            
    2.15 @@ -55,38 +53,8 @@ AddReg = XenVbd_EventLog_AddReg
    2.16  HKR,,EventMessageFile,0x00020000,"%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\XenVbd.sys"
    2.17  HKR,,TypesSupported,0x00010001,7
    2.18  
    2.19 -[XenVbd_Inst.NT.HW]
    2.20 -AddReg = XenVbd_XenConfig_AddReg, XenVbd_UpperFilter_AddReg
    2.21 -
    2.22 -[XenVbd_XenConfig_AddReg]
    2.23 -HKR,"XenConfig\ring-ref", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_RING%
    2.24 -HKR,"XenConfig\event-channel", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_EVENT_CHANNEL_IRQ%
    2.25 -HKR,"XenConfig\device-type", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_READ_STRING_FRONT%
    2.26 -HKR,"XenConfig\mode", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_READ_STRING_BACK%
    2.27 -HKR,"XenConfig\sectors", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_READ_STRING_BACK%
    2.28 -HKR,"XenConfig\sector-size", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_READ_STRING_BACK%
    2.29 -HKR,"XenConfig\vectors", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_VECTORS%
    2.30 -HKR,"XenConfig\grants", "type", %FLG_ADDREG_TYPE_DWORD%, %XEN_INIT_TYPE_GRANT_ENTRIES%
    2.31 -HKR,"XenConfig\grants", "value", %FLG_ADDREG_TYPE_DWORD%, 144
    2.32 -
    2.33 -[XenVbd_UpperFilter_AddReg]
    2.34 -HKR,,UpperFilters,0x10000,XenConfig
    2.35 -
    2.36 -[XenConfig_Service]
    2.37 -DisplayName    = %XenConfig.SVCDESC%                            
    2.38 -ServiceType    = 1
    2.39 -StartType      = 0
    2.40 -ErrorControl   = 1
    2.41 -LoadOrderGroup = System Bus Extender
    2.42 -ServiceBinary  = %12%\xenconfig.sys                            
    2.43 -AddReg = XenConfig_Service_AddReg
    2.44 -
    2.45 -[XenConfig_Service_AddReg]
    2.46 -HKR,"Parameters\PnpInterface", "0", 0x00010001, 0x00000001
    2.47 -
    2.48  [SourceDisksFiles]
    2.49  xenvbd.sys=1
    2.50 -xenconfig.sys=1
    2.51  
    2.52  [SourceDisksNames.x86]
    2.53  1 = %DISK_NAME%,,,.\i386
    2.54 @@ -98,7 +66,6 @@ 1 = %DISK_NAME%,,,.\amd64
    2.55  XenGplPv = "Xen GPL PV Driver Developers"
    2.56  XenVbd.SVCDESC = "Xen Block Device Driver"
    2.57  XenVbd.DRVDESC = "Xen Block Device Driver"
    2.58 -XenConfig.SVCDESC = "Xen Config Resource Generator"
    2.59  DISK_NAME = "Xen Block Device Driver Install Disk"
    2.60  FLG_ADDREG_TYPE_DWORD = 0x00010001
    2.61  XEN_INIT_TYPE_END = 0