From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lg3WK-0005fz-SB for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:53:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lg3WK-0005fl-88 for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:53:20 -0500 Received: from [199.232.76.173] (port=46672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lg3WK-0005fi-3S for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:53:20 -0500 Received: from savannah.gnu.org ([199.232.41.3]:37121 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lg3WJ-0007l3-OB for qemu-devel@nongnu.org; Sat, 07 Mar 2009 15:53:19 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lg3WJ-00033q-9D for qemu-devel@nongnu.org; Sat, 07 Mar 2009 20:53:19 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lg3WJ-00033l-0u for qemu-devel@nongnu.org; Sat, 07 Mar 2009 20:53:19 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 07 Mar 2009 20:53:19 +0000 Subject: [Qemu-devel] [6750] Activate uninorth AGP bridge 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 Revision: 6750 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6750 Author: blueswir1 Date: 2009-03-07 20:53:18 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Activate uninorth AGP bridge Linux tries to poke the AGP bridge port and is pretty sad when it can't, so let's activate the old code again and throw out the bit modifications, as we don't really do anything with the values anyways. Signed-off-by: Alexander Graf Modified Paths: -------------- trunk/hw/unin_pci.c Modified: trunk/hw/unin_pci.c =================================================================== --- trunk/hw/unin_pci.c 2009-03-07 20:52:22 UTC (rev 6749) +++ trunk/hw/unin_pci.c 2009-03-07 20:53:18 UTC (rev 6750) @@ -92,31 +92,20 @@ &pci_host_data_readl, }; -#if 0 - static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr, uint32_t val) { UNINState *s = opaque; -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap32(val); -#endif - s->config_reg = 0x80000000 | (val & ~0x00000001); + s->config_reg = val; } static uint32_t pci_unin_config_readl (void *opaque, target_phys_addr_t addr) { UNINState *s = opaque; - uint32_t val; - val = (s->config_reg | 0x00000001) & ~0x80000000; -#ifdef TARGET_WORDS_BIGENDIAN - val = bswap32(val); -#endif - - return val; + return s->config_reg; } static CPUWriteMemoryFunc *pci_unin_config_write[] = { @@ -131,6 +120,7 @@ &pci_unin_config_readl, }; +#if 0 static CPUWriteMemoryFunc *pci_unin_write[] = { &pci_host_pci_writeb, &pci_host_pci_writew, @@ -233,18 +223,17 @@ d->config[0x27] = 0x7F; // d->config[0x34] = 0xdc // capabilities_pointer #endif -#if 0 // XXX: not needed for now + /* Uninorth AGP bus */ - s = &pci_bridge[1]; pci_mem_config = cpu_register_io_memory(0, pci_unin_config_read, pci_unin_config_write, s); - pci_mem_data = cpu_register_io_memory(0, pci_unin_read, - pci_unin_write, s); + pci_mem_data = cpu_register_io_memory(0, pci_unin_main_read, + pci_unin_main_write, s); cpu_register_physical_memory(0xf0800000, 0x1000, pci_mem_config); cpu_register_physical_memory(0xf0c00000, 0x1000, pci_mem_data); - d = pci_register_device("Uni-north AGP", sizeof(PCIDevice), 0, 11 << 3, - NULL, NULL); + d = pci_register_device(s->bus, "Uni-north AGP", sizeof(PCIDevice), + 11 << 3, NULL, NULL); pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE); pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_AGP); d->config[0x08] = 0x00; // revision @@ -253,7 +242,6 @@ d->config[0x0D] = 0x10; // latency_timer d->config[0x0E] = 0x00; // header_type // d->config[0x34] = 0x80; // capabilities_pointer -#endif #if 0 // XXX: not needed for now /* Uninorth internal bus */