Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkgQK-0001XX-W2 for qemu-devel@nongnu.org; Fri, 20 Mar 2009 11:14:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkgQF-0001UR-W7 for qemu-devel@nongnu.org; Fri, 20 Mar 2009 11:14:16 -0400 Received: from [199.232.76.173] (port=41196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkgQF-0001UE-P8 for qemu-devel@nongnu.org; Fri, 20 Mar 2009 11:14:11 -0400 Received: from casselton.net ([63.165.140.2]:54770) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LkgQF-0003O7-9Q for qemu-devel@nongnu.org; Fri, 20 Mar 2009 11:14:11 -0400 Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.14.3/8.14.3) with ESMTP id n2KFE8J8064634 for ; Fri, 20 Mar 2009 10:14:08 -0500 (CDT) (envelope-from tinguely@casselton.net) Received: (from tinguely@localhost) by casselton.net (8.14.3/8.14.2/Submit) id n2KFE8ZK064633 for qemu-devel@nongnu.org; Fri, 20 Mar 2009 10:14:08 -0500 (CDT) (envelope-from tinguely) Date: Fri, 20 Mar 2009 10:14:08 -0500 (CDT) From: Mark Tinguely Message-Id: <200903201514.n2KFE8ZK064633@casselton.net> Subject: [Qemu-devel] QEMU ARM PXA on FreeBSD issues Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org There are a couple qemu-system-arm issues on the PXA under the OS FreeBSD. I told the freebsd-arm mailling list that I would bring these issues to the qemu developers attention. 1) The uart is not discovered (I seen this on qemu 0.9.x and on 0.10.0). FreeBSD uses the UART Unit Enable bit on the Interrupt Enable Register in the UART probe to determine if a UART is active. Unlike hardware, qemu does not raise this bit, and the Full Function UART at 0x40100000 is not being enabled. It appears that NetBSD and Linux do not check the status of the UUE to active a UART. It would be nice for FreeBSD, if the UART Unit Enable (UUE) bit is raised on the UARTs that qemu activate. 2) qemu 0.10.0 on FreeBSD 8.0-current passes the wrong value of "offset" to the qemu routine smc91c111_readb() in hw/smc91c111.c. This routine works fine under FreeBSD 6.4. The FreeBSD 8-current error message is: qemu: fatal: smc91c111_read: Bad reg 0:30e R00=00000000 R01=c5e1f300 R02=0000000e R03=c0a778e0 R04=c0ba8300 R05=c0baab00 R06=00000003 R07=00000001 R08=00000000 R09=00000000 R10=c0bb4540 R11=c00fbc50 R12=c00fbc54 R13=c00fbc44 R14=c0403950 R15=c03e8bac PSR=a0000113 N-C- A svc32 Notice register 2 has the correct value of 0x0e. This routine worked fine under qemu 0.9.x compiled under FreeBSD 8-current. I thought this was caused by FreeBSD 8-current gcc version 4.2.1 20070719 compiler, but this also happens on FreeBSD 8-current when compiling the code with gcc version 3.6.4 and gcc version 3.4.1. A temporary solution is to run qemu under FreeBSD 6.4, or FreeBSD 8-current users can mask the offset before use: static uint32_t smc91c111_readb(void *opaque, target_phys_addr_t offset) { smc91c111_state *s = (smc91c111_state *)opaque; + offset = offset & 0xff; if (offset == 14) { return s->bank; } if (offset == 15) return 0x33; switch (s->bank) { Thank-you. --Mark Tinguely