Subject: problems with bus_space_map
To: None <current-users@NetBSD.ORG>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: current-users
Date: 05/09/1997 14:05:01
-----BEGIN PGP SIGNED MESSAGE-----


  I have a call to bus_space_map in my ISDN driver. It has a software
configurable base address. If allowed to pick one, it looks for some
space. 

    for(i=0; i<MAX_RAMBASES; i++) {
      printf("Trying base %08x\n", ram_addr[i]);
      if(!(err=bus_space_map(ia->ia_memt, ram_addr[i], memsize, 0, &sharedram)))
	break;
    }
	
  When this runs, I see:
	Trying base 000d0000
        extent 'iomem' (0x0 - 0xffffffff), flags = 0x3
		0x0 - 0x9ffff
		0xd0000 - 0xcffff
		0x100000 - 0xe06fff
	extent_free: start 0xd0000, end 0xcffff
	panic: extent_free: region not found

  What I don't get is what is going on.

  Reading arch/i386/i386/machdep.c, I see that there must be a problem
in bus_mem_add_mapping(), leading to the extent being removed again at
line 1706. However, why doesn't the extent get removed? It is clearly
THERE. Or is it not properly initialized yet?

  I'm building a DIAGNOSTIC kernel now...

   :!mcr!:            |  Network security consulting and 
   Michael Richardson |      contract programming
 WWW: mcr@sandelman.ottawa.on.ca. PGP key available.

  
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQB1AwUBM3NnOqZpLyXYhL+BAQG/9AL/T1WNRU9ftnuN8f7kIVbYvwdBzalJ4thL
Z/plIV/b8E/BnbxWnOBuQqWqvFWicTWG21pHAc1goC1gQqatw3+xLocQ0TUYIFH7
U7DR/P+v30gcMoxIQbhvCDiXa6GIOpyE
=f7fi
-----END PGP SIGNATURE-----