Received: from eggs.gnu.org ([2001:4830:134:3::10]:52672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2RHJ-0001wr-0N for qemu-devel@nongnu.org; Tue, 09 Jun 2015 17:41:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2RHB-0002eV-HB for qemu-devel@nongnu.org; Tue, 09 Jun 2015 17:41:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37204 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2RHB-0002dr-7u for qemu-devel@nongnu.org; Tue, 09 Jun 2015 17:41:41 -0400 From: Alexander Graf Date: Tue, 9 Jun 2015 23:41:38 +0200 Message-Id: <1433886098-4619-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] GSoC 2015 (Mac OS 9 support) report, week 6 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: agraf@suse.de Cc: i.am.cormac.obrien@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org [This Week] - Finals =E3=83=BD(=EF=BD=8F`=E7=9A=BF=E2=80=B2=EF=BD=8F)=EF=BE=89 - Test all patches - Darwin, OpenBSD, and Ubuntu have been tested successfully. - Patch: Combined Adler-32 and copyright - This patch will be split into two separate ones as suggested by Mar= k. - Splitting in progress. - Remove extraneous "interrupts" property from /pci/mac-io - I'm having trouble tracking down where the property is actually bei= ng set. The mac-io devices are defined in drivers/pci_database.c, but = the pci_dev_t struct (drivers/pci_database.h) doesn't appear to have an interrupts field. Much of the mac-io related functionality is defin= ed in drivers/macio.c, but there's no mention of interrupts there so I'm = kind of at a loss. - This originates from the PCI device's announcement of an IRQ pin wh= ich really shouldn't be there - This only requires minimal changes, so the patch is ready. Just has= to be tested before submission. - Initial patch version has been submitted to the qemu-devel mailing = list. - Review requires v2, need to follow up with that now - Test and debug boot script loader [Next Week] - Progress past quiesce() client interface call - At the moment, this function simply closes all USB devices (`usb_ex= it()`) and sets the Instruction and Data Address Translation bits in the M= SR (@agraf: does this cause any side effects?). The stack diagram show= s no arguments or return values, and none of the other `ciface` function= s make any modifications to the stack other than their arguments or return values. - Looks like `quiesce` either hangs on `mtmsr` or makes a jump out of= the function. - MSR.IR and MSR.DR enable paging for instructions and data respectiv= ely. IIRC we disable paging when quiesce gets called because it's the la= st call that Linux runs before it executes non-OF aware code IIRC. - Try to run qemu with -d in_asm,cpu,int -D log and check where the c= ode execution hangs :). There's a good chance we're already in the Mac = OS 9 kernel. - It would appear that execution has branched off into invalid memory= . invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00f03000 0 = IN: 0x00f03000: .long 0x0 - Awesome. What code gets executed before that? Maybe we shouldn't tu= rn off IR/DR? - Actually looking at the code, the MSR IR/DR part is surround by a #= if 0 ... #endif pair... maybe something in usb_exit() is breaking things= ? Possibly try removing it temporarily? - usb_exit() doesn't appear to be causing any issues. - This is probably where things go wrong. At 0x07400000 I can't see a ToolboxImage: ToolboxImage current logical address =3D 0x07400000, ToolboxImage final physical address =3D 0x00C00000. - Is it just the virt<->phys map that is missing, i.e. can you see if= the toolbox image is present in physical memory using the QEMU monitor = "xp" command? In that case it might be that we need to mark a region as = free in the virtual memory properties in order to allow the mapping to succeed. A DEBUG_CIF enabled log would help here. - IIRC we're just using a 1:1 map for almost everything, so I doubt t= hat it's an MMU problem. From a small glimpse it almost looked like the binary simply never got loaded to the address it thought it would b= e loaded at. - Enable debugging in MOL - The installation is now broken after a failed make. Tried reinstall= ing from Zypper but it couldn't find the config files -- do they have t= o be added manually? - The config files are at a different location when you compile manua= lly, but I don't remember where everything was :). Just run mol with str= ace, it will tell you where it's looking for things. The current ones sh= ould be somewhere in /etc. [Long Term] - Continue updating project log - Create and send patches - [ ] Patch: Boot script loader - [ ] ROM node - Patch: RTAS node - Patch has been sent in and is awaiting review.