From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ml9J8-0006gX-EX for qemu-devel@nongnu.org; Tue, 08 Sep 2009 18:37:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ml9J3-0006g5-2z for qemu-devel@nongnu.org; Tue, 08 Sep 2009 18:37:01 -0400 Received: from [199.232.76.173] (port=60571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ml9J2-0006fz-UQ for qemu-devel@nongnu.org; Tue, 08 Sep 2009 18:36:56 -0400 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]:36276) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ml9J2-0006U9-DN for qemu-devel@nongnu.org; Tue, 08 Sep 2009 18:36:56 -0400 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090908223615.FPDN5579.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Tue, 8 Sep 2009 23:36:15 +0100 Received: from miranda.arrow ([213.107.24.213]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090908223615.ZITG2093.aamtaout03-winn.ispmail.ntl.com@miranda.arrow> for ; Tue, 8 Sep 2009 23:36:15 +0100 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1Ml9Je-0001oC-GS for qemu-devel@nongnu.org; Tue, 08 Sep 2009 23:37:34 +0100 Date: Tue, 8 Sep 2009 23:37:34 +0100 From: Stuart Brady Subject: Re: [Qemu-devel] Support NEC PC-98x1 on QEMU Message-ID: <20090908223734.GA6883@miranda.arrow> References: <20090907195817.GA4837@miranda.arrow> <200909080941.AA00082@YOUR-BD18D6DD63.m1.interq.or.jp> <5F0433AE-921E-4BE1-A2FE-C8DD82C90782@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5F0433AE-921E-4BE1-A2FE-C8DD82C90782@suse.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Sep 08, 2009 at 04:36:04PM +0200, Alexander Graf wrote: > > On 08.09.2009, at 11:41, 武田 俊也 wrote: > > >The problem is that now TARGET_I386 is used for both 2 meanings, > >cpu is i386 and the arch is PC/AT. > > No, that's what the -M switch is there for. Admittedly x86 has rather > few machine descriptions, but PC-98 really is just a "non-PC/AT" > machine, so it belongs there. I'd agree with this. BTW, note that when TARGET_X86_64 is defined, TARGET_I386 is too! (I'm really tempted to see how badly I would get flamed if I tried to change 'TARGET_I386' to 'TARGET_X86', as i386 means '32-bit' to me...) > >About A20 line gate: [snip] Ahh, makes a lot more sense now. > Sounds like that should be a config variable in the CPU description, > so you can set the default CPU be "486,+a20mask" or so. The 486 added an 'A20M' pin which removed the need for some of the external circuitry for A20 gate handling. (Also, there's 'fast a20 gate' handling which seems to be entirely internal to the CPU...) However, it sounds as though this only ever masks line A20, and not any of the higher lines, so external circuitry would still be required for the PC98 family. So, strictly, this would depend on the chipset, and not the CPU, which makes me wonder whether anyone would really need the option... > In general, all the changes should be runtime variable dependent, so > the same binary can run PC/AT and PC-98. Yeah, definitely... For A20 handling, I suppose an extra member in CPUX86State is needed, which would be initialised right after checking 'env' in pc_new_cpu() and pc98_init1(). For the others, it's probably a matter of adding an extra member in the device state struct and a corresponding parameter in the device init function. Allowing MAX_FD in fdc.c to be chosen at run-time might even be useful for some other targets, too! :) Cheers, -- Stuart Brady