Subject: Re: kern/3216: illegal use of bus_addr_t as bus_space_handle_t in if_le_isa.c
To: None <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 02/12/1997 15:52:33
On Wed, 12 Feb 1997 19:02:00 +0100 (MET)
Matthias Drochner <firstname.lastname@example.org> wrote:
> In sys/dev/isa/if_le_isa.c, function depca_isa_probe(), the second
> argument to bus_space_unmap() is the physical memory address, not the
> handle as
> returned by bus_space_map() before. For the i386, this causes a panic
> in extent_free()
> because the pmap_extract() in bus_space_unmap() returned a "0".
> Possible / future bugs:
> To check if this bug or similar ones occur in other drivers too, I made
> more abstract and compiled a "GENERIC" kernel. The following compiler
> warnings appeared:
> -sys/dev/isa/sb_isa.c: similar bug in sb_isa_match() (but without
> consequences up to now
> because handles and addresses are identical for ISA on i386)
Fixed that one, too.
> -sys/i386/isa/if_fea.c: in pdq_eisa_devinit(), arithmetics with handles
I've fixed this, too... that one just sort of slipped by me...
> -sys/i386/isa/isapnp_machdep.c: in isapnp_map() and isapnp_map_readport(),
> use of
> integer constants as handles
This is OK ... this is machine-dependent code, which is allowed to know
about the guts.
Thanks for pointing these out!
Jason R. Thorpe email@example.com
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939