win-pvdrivers

changeset 332:52533409dbbd

get things compiling again under DDK
author Andy Grover <andy.grover@oracle.com>
date Thu Jun 19 17:20:16 2008 -0700 (2008-06-19)
parents 44b84d00172a
children d7a848ae1a39 72acaf6e4668
files common/include/xen_windows.h xenpci/hypercall_x86.h xenpci/memory.c xenpci/sources xenpci/xenpci.h
line diff
     1.1 --- a/common/include/xen_windows.h	Thu Jun 19 16:52:21 2008 -0700
     1.2 +++ b/common/include/xen_windows.h	Thu Jun 19 17:20:16 2008 -0700
     1.3 @@ -67,7 +67,7 @@ typedef unsigned long xenbus_transaction
     1.4  #define wmb() KeMemoryBarrier()
     1.5  #define mb() KeMemoryBarrier()
     1.6  
     1.7 -static inline char **
     1.8 +static __inline char **
     1.9  SplitString(char *String, char Split, int MaxParts, int *Count)
    1.10  {
    1.11    char **RetVal;
    1.12 @@ -102,7 +102,7 @@ SplitString(char *String, char Split, in
    1.13    return RetVal;
    1.14  }
    1.15  
    1.16 -static inline VOID
    1.17 +static __inline VOID
    1.18  FreeSplitString(char **Bits, int Count)
    1.19  {
    1.20    int i;
    1.21 @@ -142,19 +142,19 @@ AllocatePagesExtra(int Pages, int ExtraS
    1.22    return Mdl;
    1.23  }
    1.24  
    1.25 -static inline PMDL
    1.26 +static __inline PMDL
    1.27  AllocatePages(int Pages)
    1.28  {
    1.29    return AllocatePagesExtra(Pages, 0);
    1.30  }
    1.31  
    1.32 -static inline PMDL
    1.33 +static __inline PMDL
    1.34  AllocatePage()
    1.35  {
    1.36    return AllocatePagesExtra(1, 0);
    1.37  }
    1.38  
    1.39 -static inline PMDL
    1.40 +static __inline PMDL
    1.41  AllocateUncachedPage()
    1.42  {
    1.43    PMDL mdl;
    1.44 @@ -167,7 +167,7 @@ AllocateUncachedPage()
    1.45    return mdl;
    1.46  }  
    1.47  
    1.48 -static inline VOID
    1.49 +static __inline VOID
    1.50  FreeUncachedPage(PMDL mdl)
    1.51  {
    1.52    PVOID buf = MmGetMdlVirtualAddress(mdl);
    1.53 @@ -176,7 +176,7 @@ FreeUncachedPage(PMDL mdl)
    1.54    MmFreeNonCachedMemory(buf, PAGE_SIZE);
    1.55  }
    1.56  
    1.57 -static inline VOID
    1.58 +static __inline VOID
    1.59  FreePages(PMDL Mdl)
    1.60  {
    1.61    PVOID Buf = MmGetMdlVirtualAddress(Mdl);
     2.1 --- a/xenpci/hypercall_x86.h	Thu Jun 19 16:52:21 2008 -0700
     2.2 +++ b/xenpci/hypercall_x86.h	Thu Jun 19 17:20:16 2008 -0700
     2.3 @@ -1,3 +1,5 @@
     2.4 +#ifndef HYPERCALL_X86_H
     2.5 +#define HYPERCALL_X86_H
     2.6  /*
     2.7  PV Drivers for Windows Xen HVM Domains
     2.8  Copyright (C) 2007 James Harper
     2.9 @@ -150,3 +152,4 @@ HYPERVISOR_event_channel_op(PXENPCI_DEVI
    2.10    return __res;
    2.11  }
    2.12  
    2.13 +#endif
     3.1 --- a/xenpci/memory.c	Thu Jun 19 16:52:21 2008 -0700
     3.2 +++ b/xenpci/memory.c	Thu Jun 19 17:20:16 2008 -0700
     3.3 @@ -1,10 +1,9 @@
     3.4  #include "xenpci.h"
     3.5 -#include <hypercall.h>
     3.6  
     3.7 -static pgentry_t *demand_map_pgt;
     3.8 +//static pgentry_t *demand_map_pgt;
     3.9  static void *demand_map_area_start;
    3.10  
    3.11 -static NTSTATUS
    3.12 +NTSTATUS
    3.13  hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd)
    3.14  {
    3.15    DWORD32 cpuid_output[4];
    3.16 @@ -39,14 +38,15 @@ hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd)
    3.17    return STATUS_SUCCESS;
    3.18  }
    3.19  
    3.20 -static NTSTATUS
    3.21 +NTSTATUS
    3.22  hvm_free_stubs(PXENPCI_DEVICE_DATA xpdd)
    3.23  {
    3.24    ExFreePoolWithTag(xpdd->hypercall_stubs, XENPCI_POOL_TAG);
    3.25  
    3.26    return STATUS_SUCCESS;
    3.27  }
    3.28 -
    3.29 +
    3.30 +#if 0
    3.31  PVOID
    3.32  map_frames(PULONG f, ULONG n)
    3.33  {
    3.34 @@ -81,3 +81,4 @@ map_frames(PULONG f, ULONG n)
    3.35      return (PVOID)(ULONG)((ULONG)demand_map_area_start + x * PAGE_SIZE);
    3.36    }
    3.37  }
    3.38 +#endif
     4.1 --- a/xenpci/sources	Thu Jun 19 16:52:21 2008 -0700
     4.2 +++ b/xenpci/sources	Thu Jun 19 17:20:16 2008 -0700
     4.3 @@ -5,4 +5,4 @@ INF_NAME=$(TARGETNAME)
     4.4  MISCFILES=..\Target\$(DDK_TARGET_OS)\$(INF_NAME).inf
     4.5  TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\wdmsec.lib
     4.6  AMD64_SOURCES=hypercall.asm swint.asm
     4.7 -SOURCES=xenpci.c xenpci_fdo.c xenpci_pdo.c evtchn.c gnttbl.c xenbus.c
     4.8 \ No newline at end of file
     4.9 +SOURCES=xenpci.c xenpci_fdo.c xenpci_pdo.c evtchn.c gnttbl.c xenbus.c memory.c
    4.10 \ No newline at end of file
     5.1 --- a/xenpci/xenpci.h	Thu Jun 19 16:52:21 2008 -0700
     5.2 +++ b/xenpci/xenpci.h	Thu Jun 19 17:20:16 2008 -0700
     5.3 @@ -322,6 +322,11 @@ XenPci_FreeMem(PVOID Ptr)
     5.4  }
     5.5  
     5.6  NTSTATUS
     5.7 +hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd);
     5.8 +NTSTATUS
     5.9 +hvm_free_stubs(PXENPCI_DEVICE_DATA xpdd);
    5.10 +
    5.11 +NTSTATUS
    5.12  XenPci_Power_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
    5.13  NTSTATUS
    5.14  XenPci_Dummy_Fdo(PDEVICE_OBJECT device_object, PIRP irp);