summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-05-23 13:07:22 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-05-23 13:07:22 -0400
commit7a83abd8443b2a655b49f9e726ecf0ca987a08ad (patch)
tree1319d255429e1d133b1f9d12445a234edde74660
parent6220ad872ed8db016d6649fa1edadbe8da72d849 (diff)
check for interrupt support
-rw-r--r--C++/bdd.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/C++/bdd.cxx b/C++/bdd.cxx
index 18bd288..e8ff1c6 100644
--- a/C++/bdd.cxx
+++ b/C++/bdd.cxx
@@ -246,6 +246,8 @@ NTSTATUS BASIC_DISPLAY_DRIVER::StartDevice(_In_ DXGK_START_INFO* pDxgkStartIn
_Out_ ULONG* pNumberOfChildren)
{
UINT32 mem_range_index = QXL_RAM_RANGE_INDEX;
+ BOOL interrupts_exist = FALSE;
+
PAGED_CODE();
LogMessage("%s", __FUNCTION__);
BDD_ASSERT(pDxgkStartInfo != NULL);
@@ -280,14 +282,20 @@ NTSTATUS BASIC_DISPLAY_DRIVER::StartDevice(_In_ DXGK_START_INFO* pDxgkStartIn
{
PCM_FULL_RESOURCE_DESCRIPTOR res = &res_list->List[i];
- LogMessage("%s: res %lu, PartialResourceList.Count %lu\n",
- __FUNCTION__, i, res->PartialResourceList.Count);
+ LogMessage("%s: res %lu, interface-type %d PartialResourceList.Count %lu\n",
+ __FUNCTION__, i, res->InterfaceType, res->PartialResourceList.Count);
for (j = 0; j < res->PartialResourceList.Count; j++) {
PCM_PARTIAL_RESOURCE_DESCRIPTOR prt_res = &res->PartialResourceList.PartialDescriptors[j];
LogMessage("%s: partial res %lu, type %u, flags %u share %u\n",
__FUNCTION__, j, prt_res->Type, prt_res->Flags, prt_res->ShareDisposition);
switch (prt_res->Type) {
+ case CmResourceTypeInterrupt:
+ interrupts_exist = prt_res->u.Interrupt.Level || prt_res->u.Interrupt.Vector;
+ LogMessage("%s: Interrupt level %lu vector %lu\n", __FUNCTION__,
+ prt_res->u.Interrupt.Level,
+ prt_res->u.Interrupt.Vector);
+ break;
case CmResourceTypePort:
LogMessage("%s: port start %X\n", __FUNCTION__, prt_res->u.Port.Start.QuadPart);
LogMessage("%s: port size %lu\n", __FUNCTION__, prt_res->u.Port.Length);
@@ -332,6 +340,10 @@ NTSTATUS BASIC_DISPLAY_DRIVER::StartDevice(_In_ DXGK_START_INFO* pDxgkStartIn
}
}
+ if (!interrupts_exist) {
+ LogMessage("%s: no interrupt\n", __FUNCTION__);
+ return STATUS_UNSUCCESSFUL;
+ }
Status = CheckHardware();
if (!NT_SUCCESS(Status))
{