ref: 0d0ba1e68e6131986eef8a62431a9e8728792b83
parent: 9046c349090d70ca47df31cad35bec940f768d37
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Nov 4 01:42:39 EST 2014
acpi: fix pcibusno() when PCI0._ADR = 0 libaml comresses zero integer as nil, so remove the nil check. this makes interrupts work in vmware with efi.
--- a/sys/src/9/pc/archacpi.c
+++ b/sys/src/9/pc/archacpi.c
@@ -260,9 +260,7 @@
if((x = amlwalk(dot, "^_BBN")) == nil)
if((x = amlwalk(dot, "^_ADR")) == nil)
return -1;
- if((p = amlval(x)) == nil)
- return -1;
- adr = amlint(p);
+ adr = amlint(amlval(x));
/* if root bridge, then we are done here */
if(id != nil && (strcmp(id, "PNP0A03")==0 || strcmp(id, "PNP0A08")==0))
return adr;
--
⑨