Subject: Re: another question about bus_space_map
To: None <tech-kern@NetBSD.ORG>
From: Michael Richardson <>
List: tech-kern
Date: 02/05/1997 09:13:54
>>>>> "Chris" == Chris G Demetriou <> writes:
    >> I take it that the probe routines should call bus_space_unmap
    >> on allocated things if they fail to find a card?  What is an
    >> invalid value for bus_space_handle_t? 0? ~0?

    Chris> there are no defined valid or invalid values.  the only
    Chris> indication of 'validity' is the return value from
    Chris> bus_space_map().

  The desire is to have a cleanup section that reads:

  if(some_alloc_handle) bus_space_unmap(iot,some_alloc_handle,...);
  if(some_other_handle) bus_space_unmap(iot,some_other_handle,...);

    >> Should a probe routine unmap everything and let the attach
    >> routine map it back in?

    Chris> yes.  there should be no permanent allocations or
    Chris> initializations done in the match/probe routine, EVER.

  Thank you for this info. I'd like to know how Perry's 'section 9' of
the manual is going, and whether I can provide some input as I pick
the details up. Maybe having man pages written by someone learning the
particulars would be better than a gospel?

   :!mcr!:            |  Network security consulting and 
   Michael Richardson |      contract programming
 WWW: PGP key available.