Subject: port-amd64/36657: more iomem_ex entries needed on Intel S3000AHLX board
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock@nagler-company.com>
List: netbsd-bugs
Date: 07/16/2007 10:45:00
>Number:         36657
>Category:       port-amd64
>Synopsis:       more iomem_ex entries needed on Intel S3000AHLX board
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 16 10:45:00 +0000 2007
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 3.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:
	
	
System: NetBSD s201 3.1 NetBSD 3.1 (NSW-S201) #27: Fri Jun 1 14:08:59 CEST 2007 wgstuken@s012:/export/NetBSD-3.1/N+C-build/.OBJDIR_amd64/export/NetBSD-3.1/src/sys/arch/amd64/compile/NSW-S201 amd64
Architecture: x86_64
Machine: amd64
>Description:
	In some configurations with PCI-card on an Intel S3000AHLX board 9
	memory segments appears and the last one cannot be mapped. There are
	only 8 segments allocated in the static setup in
	/usr/src/sys/arch/x86/x86/bus_space.c.
>How-To-Repeat:
	Have a config where more thann 8 segments are needed and boot the
	systen. The message for each segment starting with segment 9 is
	printed onto the console.
	remark: the message will not be visible in the dmes-buffer, because
	that is not initialized at this time ..
>Fix:
The static size of 8 is fixed in /usr/src/sys/arch/x86/x86/bus_space.c.
The followin patch will increase this size to 12.
Attention: This fix will affect all x86 ports!

diff -c -r1.1 bus_space.c
*** bus_space.c 2007/07/16 09:21:29     1.1
--- bus_space.c 2007/07/16 09:22:07
***************
*** 65,71 ****
   * routines need access to them for bus address space allocation.
   */
  static        long ioport_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)];
! static        long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)];
  struct        extent *ioport_ex;
  struct        extent *iomem_ex;
  static        int ioport_malloc_safe;
--- 65,71 ----
   * routines need access to them for bus address space allocation.
   */
  static        long ioport_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)];
! static        long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(12) / sizeof(long)];
  struct        extent *ioport_ex;
  struct        extent *iomem_ex;
  static        int ioport_malloc_safe;