~kris/9p

9hist

43bb6f5fe4eedaff301f8f15b1e71b55eb450abe — David du Colombier 29 years ago 081f14e
Plan 9 from Bell Labs 1997-07-11
1 files changed, 4 insertions(+), 2 deletions(-)

M pc/pci.c
M pc/pci.c => pc/pci.c +4 -2
@@ 410,10 410,12 @@ pcimemmap(int tbdf, int rno, ulong *paddr)
	v = 0xFFFFFFFF;
	pcicfgrw32(tbdf, rno, v, 0);
	v = pcicfgrw32(tbdf, rno, 0, 1);
	/* clear out bottom bits and negate to find size */
	/*
	 * Clear out bottom bits and negate to find size.
	 * If none can be found could try for UPA memory here.
	 */
	size = -(v & ~0x0F);
	v = umbmalloc(0, size, size);
print("rno %uX, size %uX, v %uX\n", rno, size, v);
	p = PADDR(v);
	if(paddr)
		*paddr = p;