From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QW49P-0008Kq-3G for qemu-devel@nongnu.org; Mon, 13 Jun 2011 06:13:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QW49N-0007Yu-IU for qemu-devel@nongnu.org; Mon, 13 Jun 2011 06:13:43 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:54897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QW49N-0007Yc-CQ for qemu-devel@nongnu.org; Mon, 13 Jun 2011 06:13:41 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 13 Jun 2011 12:13:38 +0200 Message-Id: <1307960018-38235-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: andreas.faerber@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH RFC] target-ppc: Correctly handle translation address when bus unit ID = 0x07F List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Alexander Graf From: Herv=C3=A9 Poussineau In that case, we want to access memory space instead of I/O controller interface address space. Signed-off-by: Herv=C3=A9 Poussineau Simplify by avoiding reindentation of existing code. Cc: Alexander Graf Signed-off-by: Andreas F=C3=A4rber --- Hello Alex, =20 This patch fixes a hang when booting 40p, please review. =20 The only vaguely related section in Power ISA 2.06B I could find was the Programming Note on p. 764 (5.7.1). 6xx_pem.pdf identifies the masked SR bits as Bus unit ID, says nothing about the 0x07f value though - might that be machine-specific? =20 Andreas =20 target-ppc/helper.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index cf2a368..cdf8d15 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -949,8 +949,18 @@ static inline int get_segment(CPUState *env, mmu_ctx= _t *ctx, ret =3D -3; } } else { + target_ulong sr; LOG_MMU("direct store...\n"); /* Direct-store segment : absolutely *BUGGY* for now */ + + sr =3D env->sr[eaddr >> 28]; + if ((sr & 0x1FF00000) >> 20 =3D=3D 0x07f) { + /* Memory forced */ + ctx->raddr =3D ((sr & 0xF) << 28) | (eaddr & 0x0FFFFFFF); + ctx->prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; + return 0; + } + switch (type) { case ACCESS_INT: /* Integer load/store : only access allowed */ --=20 1.7.5.3