From owner-freebsd-amd64@FreeBSD.ORG Mon Mar 28 09:13:17 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C48FF16A4CE for ; Mon, 28 Mar 2005 09:13:17 +0000 (GMT) Received: from mail.komvista.lt (ns.komvista.lt [213.190.36.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8EA243D5C for ; Mon, 28 Mar 2005 09:13:15 +0000 (GMT) (envelope-from ssmailys@komvista.lt) Received: by mail.komvista.lt (Postfix, from userid 23) id 90633BDCE; Mon, 28 Mar 2005 12:13:05 +0200 (EET) Received: from [192.168.150.107] (localhost [127.0.0.1]) by mail.komvista.lt (Postfix) with ESMTP id 9F235BDCA for ; Mon, 28 Mar 2005 12:13:03 +0200 (EET) Message-ID: <4247CAA3.90804@komvista.lt> Date: Mon, 28 Mar 2005 12:13:07 +0300 From: Stasys Smailys User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050327) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "[FreeBSD-AMD64]" Content-Type: multipart/mixed; boundary="------------060405060408090009070802" Subject: Re: Problem Report amd64/78848 "sis driver on FreeBSD 5.x does not work on amd64" X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 09:13:18 -0000 This is a multi-part message in MIME format. --------------060405060408090009070802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello there! I've had the same problem with SiS 755 and SiS 964 on ASRock K8S8X, the only difference was that MAC address had all zeros (00:00:00:00:00:00). The problem is that integrated NIC doesn't have any eeprom to read from. I solved it by applying this patch. As by now it works for me. AFAIK it is not solved properly even in -CURRENT. By the way I noticed some typo in /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c and /usr/src/lib/libc/i386/sys/_amd64_get_gsbase.c. IMHO when calling sysarch(int, void *) it should look like this: /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c: [...] ret = sysarch(_AMD64_GET_FSBASE, (void *)(&addr64)); [...] /usr/src/lib/libc/i386/sys/_amd64_get_gsbase.c: [...] ret = sysarch(_AMD64_GET_GSBASE, (void *)(&addr64)); [...] WBR, Stasys Smailys --------------060405060408090009070802 Content-Type: text/plain; name="if_sis.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_sis.c.patch" --- /usr/src/sys/pci/if_sis.c.orig Thu Mar 3 06:16:17 2005 +++ /usr/src/sys/pci/if_sis.c Sat Mar 26 09:25:54 2005 @@ -139,7 +139,7 @@ static void sis_eeprom_putbyte (struct sis_softc *, int); static void sis_eeprom_getword (struct sis_softc *, int, u_int16_t *); static void sis_read_eeprom (struct sis_softc *, caddr_t, int, int, int); -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) static void sis_read_cmos (struct sis_softc *, device_t, caddr_t, int, int); static void sis_read_mac (struct sis_softc *, device_t, caddr_t); @@ -418,7 +418,7 @@ return; } -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) static device_t sis_find_bridge(dev) device_t dev; @@ -476,7 +476,11 @@ pci_write_config(bridge, 0x48, reg|0x40, 1); /* XXX */ +#if defined(__i386__) btag = I386_BUS_SPACE_IO; +#elif defined(__amd64__) + btag = AMD64_BUS_SPACE_IO; +#endif for (i = 0; i < cnt; i++) { bus_space_write_1(btag, 0x0, 0x70, i + off); @@ -1144,7 +1148,7 @@ break; case SIS_VENDORID: default: -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) /* * If this is a SiS 630E chipset with an embedded * SiS 900 controller, we have to read the MAC address @@ -1603,7 +1607,7 @@ } /* No errors; receive the packet. */ -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) /* * On the x86 we do not have alignment problems, so try to * allocate a new buffer for the receive ring, and pass up --------------060405060408090009070802 Content-Type: text/plain; name="_amd64_get_fsbase.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="_amd64_get_fsbase.c.patch" --- /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c.orig Sat Nov 27 22:24:31 2004 +++ /usr/src/lib/libc/i386/sys/_amd64_get_fsbase.c Thu Mar 24 23:16:48 2005 @@ -37,7 +37,7 @@ int ret; addr64 = 0; - ret = sysarch(_AMD64_GET_FSBASE, (void **)(&addr64)); + ret = sysarch(_AMD64_GET_FSBASE, (void *)(&addr64)); if (ret != -1) *addr = (void *)(uintptr_t)addr64; return ret; --------------060405060408090009070802 Content-Type: text/plain; name="_amd64_get_gsbase.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="_amd64_get_gsbase.c.patch" --- /usr/src/lib/libc/i386/sys/_amd64_get_gsbase.c.orig Sat Nov 27 22:24:31 2004 +++ /usr/src/lib/libc/i386/sys/_amd64_get_gsbase.c Thu Mar 24 23:16:51 2005 @@ -37,7 +37,7 @@ int ret; addr64 = 0; - ret = sysarch(_AMD64_GET_GSBASE, (void **)(&addr64)); + ret = sysarch(_AMD64_GET_GSBASE, (void *)(&addr64)); if (ret != -1) *addr = (void *)(uintptr_t)addr64; return ret; --------------060405060408090009070802--