From owner-freebsd-embedded@FreeBSD.ORG Sun Oct 26 23:38:22 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E9471065676 for ; Sun, 26 Oct 2008 23:38:22 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 57B798FC29 for ; Sun, 26 Oct 2008 23:38:22 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id m9QN1XSD097708; Sun, 26 Oct 2008 19:01:34 -0400 (EDT) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id m9QN1XqM077618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Oct 2008 19:01:33 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <200810262301.m9QN1XqM077618@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sun, 26 Oct 2008 19:01:38 -0400 To: Espartano , freebsd-embedded@freebsd.org From: Mike Tancsa In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: Re: Problem with CPU Geode panic: CPU class not configured :( X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 23:38:22 -0000 At 04:35 PM 10/26/2008, Espartano wrote: >hi people, first and foremost apologize me for my bad english. I have >an alix2c3 machine with this features: Hi, Not sure about 7.0R, but 7.1PRE-RELEASE or RELENG_7 works well with the file geode.c from HEAD. (diff below) For CPU options, I use machine i386 cpu I486_CPU cpu I586_CPU option CPU_GEODE option CPU_ELAN option CPU_SOEKRIS (Not sure if the ELAN part is needed, probably not) The glxsb works well as does the watchdogd driver # cat /var/run/dmesg.boot Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.1-PRERELEASE #1: Fri Oct 24 16:14:31 EDT 2008 mdtancsa@buildhost.sentex.ca:/usr/obj/nanobsd.alix/usr/src/sys/nano5501 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Geode(TM) Integrated Processor by AMD PCS (498.05-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x5a2 Stepping = 2 Features=0x88a93d AMD Features=0xc0400000 real memory = 268435456 (256 MB) avail memory = 253198336 (241 MB) pnpbios: Bad PnP BIOS data checksum K6-family MTRR support enabled (2 registers) cryptosoft0: on motherboard pcib0: pcibus 0 on motherboard pci0: on pcib0 Geode LX: PC Engines ALIX.2 v0.99 tinyBIOS V1.4a (C)1997-2007 glxsb0: mem 0xefff4000-0xefff7fff irq 9 at device 1.2 on pci0 vr0: port 0x1000-0x10ff mem 0xe0000000-0xe00000ff irq 10 at device 9.0 on pci0 vr0: Quirks: 0x6 vr0: Revision: 0x96 miibus0: on vr0 ukphy0: PHY 1 on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr0: Ethernet address: 00:0d:b9:15:6c:48 vr0: [ITHREAD] vr1: port 0x1400-0x14ff mem 0xe0040000-0xe00400ff irq 11 at device 10.0 on pci0 vr1: Quirks: 0x6 vr1: Revision: 0x96 miibus1: on vr1 ukphy1: PHY 1 on miibus1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr1: Ethernet address: 00:0d:b9:15:6c:49 vr1: [ITHREAD] isab0: port 0x6000-0x6007,0x6100-0x61ff,0x6200-0x623f,0x9d00-0x9d7f,0x9c00-0x9c3f at device 15.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 15.2 on pci0 ata0: on atapci0 ata0: [ITHREAD] ata1: on atapci0 ata1: [ITHREAD] ohci0: mem 0xefffe000-0xefffefff irq 15 at device 15.4 on pci0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 4 ports with 4 removable, self powered ehci0: mem 0xefffd000-0xefffdfff irq 15 at device 15.5 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb1: EHCI version 1.0 usb1: companion controller, 4 ports each: usb0 usb1: on ehci0 usb1: USB revision 2.0 uhub1: on usb1 uhub1: 4 ports with 4 removable, self powered cpu0 on motherboard orm0: at iomem 0xe0000-0xea7ff pnpid ORM0000 on isa0 uart4: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 uart4: [FILTER] uart4: console (9600,n,8,1) RTC BIOS diagnostic error 80 Timecounter "TSC" frequency 498052729 Hz quality 800 Timecounters tick every 1.000 msec IPsec: Initialized Security Association Processing. ad0: 1953MB at ata0-master PIO4 Trying to mount root from ufs:/dev/ad0s1a --- sys/i386/i386/geode.c 2007-09-18 05:19:44.000000000 -0400 +++ sys/i386/i386/geode.c.good 2008-09-12 17:13:18.000000000 -0400 @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/geode.c,v 1.10 2007/09/18 09:19:44 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/geode.c,v 1.11 2008/02/10 19:14:42 phk Exp $"); #include #include @@ -40,41 +40,50 @@ #include static struct bios_oem bios_soekris = { - { 0xf0000, 0xf1000 }, - { - { "Soekris", 0, 8 }, /* Soekris Engineering. */ - { "net4", 0, 8 }, /* net45xx */ - { "comBIOS", 0, 54 }, /* comBIOS ver. 1.26a 20040819 ... */ - { NULL, 0, 0 }, - } + { 0xf0000, 0xf1000 }, + { + { "Soekris", 0, 8 }, /* Soekris Engineering. */ + { "net4", 0, 8 }, /* net45xx */ + { "comBIOS", 0, 54 }, /* comBIOS ver. 1.26a 20040819 ... */ + { NULL, 0, 0 }, + } }; static struct bios_oem bios_soekris_55 = { - { 0xf0000, 0xf1000 }, - { - { "Soekris", 0, 8 }, /* Soekris Engineering. */ - { "net5", 0, 8 }, /* net5xxx */ - { "comBIOS", 0, 54 }, /* comBIOS ver. 1.26a 20040819 ... */ - { NULL, 0, 0 }, - } + { 0xf0000, 0xf1000 }, + { + { "Soekris", 0, 8 }, /* Soekris Engineering. */ + { "net5", 0, 8 }, /* net5xxx */ + { "comBIOS", 0, 54 }, /* comBIOS ver. 1.26a 20040819 ... */ + { NULL, 0, 0 }, + } }; static struct bios_oem bios_pcengines = { - { 0xf9000, 0xfa000 }, - { - { "PC Engines WRAP", 0, 28 }, /* PC Engines WRAP.1C v1.03 */ - { "tinyBIOS", 0, 28 }, /* tinyBIOS V1.4a (C)1997-2003 */ - { NULL, 0, 0 }, - } + { 0xf9000, 0xfa000 }, + { + { "PC Engines WRAP", 0, 28 }, /* PC Engines WRAP.1C v1.03 */ + { "tinyBIOS", 0, 28 }, /* tinyBIOS V1.4a (C)1997-2003 */ + { NULL, 0, 0 }, + } +}; + +static struct bios_oem bios_pcengines_55 = { + { 0xf9000, 0xfa000 }, + { + { "PC Engines ALIX", 0, 28 }, /* PC Engines ALIX */ + { "tinyBIOS", 0, 28 }, /* tinyBIOS V1.4a (C)1997-2005 */ + { NULL, 0, 0 }, + } }; static struct bios_oem bios_advantech = { - { 0xfe000, 0xff000 }, - { - { "**** PCM-582", 5, 33 }, /* PCM-5823 BIOS V1.12 ... */ - { "GXm-Cx5530", -11, 35 }, /* 06/07/2002-GXm-Cx5530... */ - { NULL, 0, 0 }, - } + { 0xfe000, 0xff000 }, + { + { "**** PCM-582", 5, 33 }, /* PCM-5823 BIOS V1.12 ... */ + { "GXm-Cx5530", -11, 35 }, /* 06/07/2002-GXm-Cx5530... */ + { NULL, 0, 0 }, + } }; static unsigned cba; @@ -117,6 +126,11 @@ } a = rdmsr(0x5140000c); + if (bit >= 16) { + a += 0x80; + bit -= 16; + } + if (onoff) outl(a, 1 << bit); else @@ -256,11 +270,13 @@ * by the bios, see p161 in data sheet. */ cba = pci_read_config(self, 0x64, 4); - printf("Geode CBA@ 0x%x\n", cba); + if (bootverbose) + printf("Geode CBA@ 0x%x\n", cba); geode_counter = cba + 0x08; outl(cba + 0x0d, 2); - printf("Geode rev: %02x %02x\n", - inb(cba + 0x3c), inb(cba + 0x3d)); + if (bootverbose) + printf("Geode rev: %02x %02x\n", + inb(cba + 0x3c), inb(cba + 0x3d)); tc_init(&geode_timecounter); EVENTHANDLER_REGISTER(watchdog_list, geode_watchdog, NULL, 0); @@ -270,13 +286,14 @@ case 0x0510100b: gpio = pci_read_config(self, PCIR_BAR(0), 4); gpio &= ~0x1f; - printf("Geode GPIO@ = %x\n", gpio); - if ( bios_oem_strings(&bios_soekris, - bios_oem, BIOS_OEM_MAXLEN) > 0 ) { + if (bootverbose) + printf("Geode GPIO@ = %x\n", gpio); + if (bios_oem_strings(&bios_soekris, + bios_oem, sizeof bios_oem) > 0 ) { led1b = 20; led1 = led_create(led_func, &led1b, "error"); - } else if ( bios_oem_strings(&bios_pcengines, - bios_oem, BIOS_OEM_MAXLEN) > 0 ) { + } else if (bios_oem_strings(&bios_pcengines, + bios_oem, sizeof bios_oem) > 0 ) { led1b = -2; led2b = -3; led3b = -18; @@ -289,27 +306,41 @@ */ led_func(&led1b, 1); } - if ( strlen(bios_oem) ) + if (*bios_oem) printf("Geode %s\n", bios_oem); break; case 0x01011078: - if ( bios_oem_strings(&bios_advantech, - bios_oem, BIOS_OEM_MAXLEN) > 0 ) { + if (bios_oem_strings(&bios_advantech, + bios_oem, sizeof bios_oem) > 0 ) { printf("Geode %s\n", bios_oem); EVENTHANDLER_REGISTER(watchdog_list, advantech_watchdog, NULL, 0); } break; case 0x20801022: - if ( bios_oem_strings(&bios_soekris_55, - bios_oem, BIOS_OEM_MAXLEN) > 0 ) { - printf("Geode LX: %s\n", bios_oem); + if (bios_oem_strings(&bios_soekris_55, + bios_oem, sizeof bios_oem) > 0 ) { led1b = 6; led1 = led_create(cs5536_led_func, &led1b, "error"); + } else if (bios_oem_strings(&bios_pcengines_55, + bios_oem, sizeof bios_oem) > 0 ) { + led1b = -6; + led2b = -25; + led3b = -27; + led1 = led_create(cs5536_led_func, &led1b, "led1"); + led2 = led_create(cs5536_led_func, &led2b, "led2"); + led3 = led_create(cs5536_led_func, &led3b, "led3"); + /* + * Turn on first LED so we don't make + * people think their box just died. + */ + cs5536_led_func(&led1b, 1); } - printf("MFGPT bar: %jx\n", rdmsr(0x5140000d)); - EVENTHANDLER_REGISTER(watchdog_list, cs5536_watchdog, - NULL, 0); + if (*bios_oem) + printf("Geode LX: %s\n", bios_oem); + if (bootverbose) + printf("MFGPT bar: %jx\n", rdmsr(0x5140000d)); + EVENTHANDLER_REGISTER(watchdog_list, cs5536_watchdog, NULL, 0); break; } return (ENXIO);