tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Kernel code documentation and pci data structures (was: Problem with Intel WiFi card)



> Date: Thu, 18 May 2017 11:21:53 +0200
> From: "Rocky Hotas" <rockyhotas%post.com@localhost>
> 
> I'm trying to apply this patch
> 
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/ppb.c.diff?r1=1.35&r2=1.36
> 
> to NetBSD. The current version of OpenBSD kernel ppb.c file (which
> works in my laptop, where I tried to temporarily install OpenBSD)
> has some more lines and is based on the rev. 1.40.
> I write to you because you made much of the last commits on the
> NetBSD ppb.c sourcefile; I  write also to the list, to let the
> community know these updates.
> OpenBSD code is based upon the following members of the
> `struct pci_attach_args':
> 
> struct extent	*pa_ioex;
> struct extent	*pa_memex;

Wild guess: Doing

	extent_alloc(pa->pa_ioex, size, alignment, boundary, flags, &addr)

in OpenBSD, where addr is an unsigned long, is like doing

	bus_space_alloc(pa->pa_iot, 0, -1, size, alignment, boundary, flags,
	    &addr, NULL)

in NetBSD, where addr is a bus_addr_t, and likewise with OpenBSD
pa->pa_memex / NetBSD pa->pa_memt.


Home | Main Index | Thread Index | Old Index