From: John Hodge Date: Wed, 25 Dec 2013 00:42:05 +0000 (+0800) Subject: Kernel/pci - Catch non-assigned BARs with an error X-Git-Tag: rel0.15~45 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=398d01ee119404d9d811f33341dcf474a0794411;p=tpg%2Facess2.git Kernel/pci - Catch non-assigned BARs with an error --- diff --git a/KernelLand/Kernel/drv/pci.c b/KernelLand/Kernel/drv/pci.c index e926f94f..3a4ec865 100644 --- a/KernelLand/Kernel/drv/pci.c +++ b/KernelLand/Kernel/drv/pci.c @@ -544,7 +544,11 @@ Uint64 PCI_GetValidBAR(tPCIDev ID, int BARNum, tPCI_BARType Type) break; } ASSERT(ret != -1); - ASSERT(ret); + if( ret == 0 ) { + Log_Error("PCI", "PCI%i BAR%i correct type, but unallocated (0x%x)", + ID, BARNum, bar_val); + return 0; + } return ret; }