From walter.pelissero@iesy.net  Sun May 22 12:07:57 2005
Return-Path: <walter.pelissero@iesy.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5736E16A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 May 2005 12:07:57 +0000 (GMT)
	(envelope-from walter.pelissero@iesy.net)
Received: from smtp.iesy.net (mta002.iesy.net [81.210.131.41])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C77AA43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 May 2005 12:07:55 +0000 (GMT)
	(envelope-from walter.pelissero@iesy.net)
Received: from zaphod.home.loc (unknown [81.210.131.48])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.iesy.net (Postfix) with ESMTP id A0863B532;
	Sun, 22 May 2005 14:07:53 +0200 (CEST)
Received: from zaphod.home.loc (localhost [127.0.0.1])
	by zaphod.home.loc (8.13.3/8.13.3) with ESMTP id j4MC7rJm001485;
	Sun, 22 May 2005 14:07:53 +0200 (CEST)
	(envelope-from wcp@zaphod.home.loc)
Received: (from wcp@localhost)
	by zaphod.home.loc (8.13.3/8.13.1/Submit) id j4MC7oO2001483;
	Sun, 22 May 2005 14:07:50 +0200 (CEST)
	(envelope-from wcp)
Message-Id: <200505221207.j4MC7oO2001483@zaphod.home.loc>
Date: Sun, 22 May 2005 14:07:50 +0200 (CEST)
From: "Walter C. Pelissero" <walter@pelissero.de>
Reply-To: walter@pelissero.de
To: FreeBSD-gnats-submit@freebsd.org
Cc: Larry Baird <lab@gta.com>, Danny Braniss <danny@cs.huji.ac.il>,
	Florent Thoumie <flz@xbsd.org>
Subject: PC Engines WRAP support
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         81358
>Category:       i386
>Synopsis:       [geode] [patch] add PC Engines WRAP support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 22 12:10:01 GMT 2005
>Closed-Date:    Mon Mar 12 07:14:42 GMT 2007
>Last-Modified:  Mon Mar 12 07:14:42 GMT 2007
>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:
Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Tue Feb 20 22:10:19 UTC 2007 
Responsible-Changed-Why:  
This issue appears to be resolved by one of Poul-Hennings commit not 
long after the PR had been submitted. I asked for a double verification 
(the commitlog and the code suggest that this had been fixed) prior to 
closing this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81358 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Mon Mar 12 07:14:40 UTC 2007 
State-Changed-Why:  
feedback timeout (found to be fixed as stated in my previous message) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81358 
>Unformatted:
