From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMUt2-0005fU-Cs for qemu-devel@nongnu.org; Mon, 12 Jan 2009 17:03:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMUt0-0005eU-MA for qemu-devel@nongnu.org; Mon, 12 Jan 2009 17:03:55 -0500 Received: from [199.232.76.173] (port=53949 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMUt0-0005eD-D0 for qemu-devel@nongnu.org; Mon, 12 Jan 2009 17:03:54 -0500 Received: from amistad.itbs.cz ([81.0.238.226]:42836) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LMUsz-0006d3-Mu for qemu-devel@nongnu.org; Mon, 12 Jan 2009 17:03:54 -0500 Message-ID: <496BBE44.4020402@jermar.eu> Date: Mon, 12 Jan 2009 23:03:48 +0100 From: Jakub Jermar MIME-Version: 1.0 References: <496BADBB.6010109@jermar.eu> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: sparc64's get_physical_address_code should not fault on TTE's with V=0 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: openbios@openbios.org, qemu-devel@nongnu.org Blue Swirl wrote: > On 1/12/09, Jakub Jermar wrote: >> Hi, >> >> when I make the following change to helper.c, get_physical_address_code: >> >> - // ctx match, vaddr match? >> + // ctx match, vaddr match, valid? >> if (env->dmmuregs[1] == (env->itlb_tag[i] & 0x1fff) && >> - (address & mask) == (env->itlb_tag[i] & ~0x1fffULL)) { >> - // valid, access ok? >> - if ((env->itlb_tte[i] & 0x8000000000000000ULL) == 0 || >> - ((env->itlb_tte[i] & 0x4) && is_user)) { >> + (address & mask) == (env->itlb_tag[i] & ~0x1fffULL) && >> + env->itlb_tte[i] & 0x8000000000000000ULL) { >> + // access ok? >> + if ((env->itlb_tte[i] & 0x4) && is_user) { >> >> HelenOS gets a little bit further than without this change and seems >> to panic more or less gracefully later. >> >> In short, non-valid entries should be skipped by the loop in >> get_physical_address_code instead of causing TFAULT, because >> the ITLB can contain a valid entry for the same address. The >> same is true for DTLB. >> >> Can you confirm this? > > Yes, this looks correct. I'll apply a fix. Thanks! With this fix in place, HelenOS most of the time panics on: Kernel panic: Cannot find property 'screen'. I.e. it searches property 'screen' in /aliases and doesn't find any. If it is not there already, could you please add it (together with keyboard) to openbios? Thanks, Jakub