Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 May 2005 14:07:50 +0200 (CEST)
From:      "Walter C. Pelissero" <walter@pelissero.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Danny Braniss <danny@cs.huji.ac.il>, Larry Baird <lab@gta.com>, Florent Thoumie <flz@xbsd.org>
Subject:   i386/81358: PC Engines WRAP support
Message-ID:  <200505221207.j4MC7oO2001483@zaphod.home.loc>
Resent-Message-ID: <200505221210.j4MCA2rX089246@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         81358
>Category:       i386
>Synopsis:       PC Engines WRAP support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 22 12:10:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Walter C. Pelissero
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD zaphod.home.loc 5.4-STABLE FreeBSD 5.4-STABLE #0: Sat May 7 16:41:16 CEST 2005 root@zaphod.home.loc:/usr/src/sys/i386/compile/TYAN-TIGER-MP i386

	PC Engines WRAP.1E (but could as well apply to WRAP.1D, 2B, 2C)
	
>Description:
	FreeBSD 5.x supports Geode-based single board PCs in
	/sys/i386/i386/geode.c, enabling some special features
	available only on those platforms, like front panel LEDs or
	hardware watchdog.  Among the supported boards there is the PC
	Engines WRAP.1C.

	Apparently new versions of that board (the 1E, for instance)
	have moved the BIOS id string somewhere different than the
	original 0xf9000 address.  The result is that geode_probe()
	fails to fully recognise the board and thus doesn't enable the
	LEDs devices (/dev/led/led*).
>How-To-Repeat:
	Boot FreeBSD 5.x on a recent WRAP.1E and do a:

	ls /dev/led

	The command should fail because the directory is not populated
	by geode_probe().
>Fix:

	The following tiny patch makes geode_probe() work even with
	recent WRAP boards:

Index: geode.c
===================================================================
RCS file: /usr/src.cvs/src/sys/i386/i386/geode.c,v
retrieving revision 1.5
diff -c -r1.5 geode.c
*** geode.c	16 Jun 2004 09:47:07 -0000	1.5
--- geode.c	22 May 2005 11:38:37 -0000
***************
*** 145,152 ****
  			led1b = 20;
  			led1 = led_create(led_func, &led1b, "error");
  		} else if (NULL !=
! 		    bios_string(0xf9000, 0xf9000, "PC Engines WRAP.1C ", 0)) {
! 			printf("PC Engines WRAP.1C platfrom\n");
  			led1b = -2;
  			led2b = -3;
  			led3b = -18;
--- 145,152 ----
  			led1b = 20;
  			led1 = led_create(led_func, &led1b, "error");
  		} else if (NULL !=
! 		    bios_string(0xf9000, 0xf9100, "PC Engines WRAP", 0)) {
! 			printf("PC Engines WRAP platform\n");
  			led1b = -2;
  			led2b = -3;
  			led3b = -18;


	The patch relaxes the requirements on the matched string
	because, although the BIOS id string didn't appear to be
	changed from WRAP.1C to WRAP.1E (it's still "PC Engines
	WRAP1.C"), it may change in the future.

	Almost identical patches were kept in the drawer by Danny
	Braniss and Larry Baird, so chances are good this patch has
	been fully tested.

	This also fixes the typo pointed out by Florent Thoumie.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505221207.j4MC7oO2001483>