From owner-freebsd-i386@FreeBSD.ORG Sun May 22 12:10:03 2005 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E49016A41F for ; Sun, 22 May 2005 12:10:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A672A43D4C for ; Sun, 22 May 2005 12:10:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4MCA2xG089247 for ; Sun, 22 May 2005 12:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4MCA2rX089246; Sun, 22 May 2005 12:10:02 GMT (envelope-from gnats) Resent-Date: Sun, 22 May 2005 12:10:02 GMT Resent-Message-Id: <200505221210.j4MCA2rX089246@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, walter@pelissero.de Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5736E16A41C for ; 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 ; 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" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Danny Braniss , Larry Baird , Florent Thoumie Subject: i386/81358: PC Engines WRAP support X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: walter@pelissero.de List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2005 12:10:03 -0000 >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: