Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KfzXG-0007Ko-DM for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:05:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KfzXE-0007Iv-Cm for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:05:45 -0400 Received: from [199.232.76.173] (port=36860 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfzXE-0007Ig-8e for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:05:44 -0400 Received: from falcon.cybervisiontech.com ([217.20.163.9]:38273) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KfzXD-0007v0-MW for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:05:43 -0400 Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id D00BB7441B8 for ; Wed, 17 Sep 2008 19:05:42 +0300 (EEST) Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MTwnvkRhLUpI for ; Wed, 17 Sep 2008 19:05:42 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 7314974419F for ; Wed, 17 Sep 2008 19:05:42 +0300 (EEST) Message-ID: <48D12AD5.2040308@icyb.net.ua> Date: Wed, 17 Sep 2008 19:05:41 +0300 From: Andriy Gapon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] pc/i386: legacy memory attributes - write only? 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 I am working on a BIOS-ish code geared towards 440BX/PIIX4 chipset, so I decided to try it under qemu emulation. There is a snippet in the code that works as best described in 82443BX documentation: > As an example, consider a BIOS that is implemented on the expansion > bus. During the initialization process, the BIOS can be shadowed in > main memory to increase the system performance. When BIOS is shadowed > in main memory, it should be copied to the same address location. To > shadow the BIOS, the attributes for that address range should be set > to write only. The BIOS is shadowed by first doing a read of that > address. This read is forwarded to the expansion bus. The host then > does a write of the same address, which is directed to main memory. > After the BIOS is shadowed, the attributes for that memory area are > set to read only so that all writes are forwarded to the expansion > bus. The code tries to do exactly that by writing 20h to PCI configuration register 20h (of device 0:0:0). Then reading and writing back the whole F0000h-FFFFFh region and then setting the register to 10h. But in qemu I see that after the above operation the corresponding RAM region contains all zero bytes. I think that behavior of 440BX and 440FX which qemu emulates should be identical in this respect. Does qemu perform proper emulation of attributes for legacy memory segments? Should the above work in qemu? Maybe there is some bug in my code. -- Andriy Gapon