From owner-freebsd-ppc@FreeBSD.ORG Sun Sep 28 11:12:49 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB5061065689 for ; Sun, 28 Sep 2008 11:12:49 +0000 (UTC) (envelope-from marcotrillo@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 9208D8FC14 for ; Sun, 28 Sep 2008 11:12:49 +0000 (UTC) (envelope-from marcotrillo@gmail.com) Received: by wa-out-1112.google.com with SMTP id n4so829705wag.27 for ; Sun, 28 Sep 2008 04:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=WQx9bu1b2XijgppVcdfgszwp457GQN2WjygNEluwxC8=; b=kdpPfCYbkOZB9eUriSItw7SqMSswMYVh+ZCcLy5zMktCFk1XgdEMW1EIcpTvBgOncz mkrBUxi7geGR0oxkUhpCsrFdLjPaynS+oyv9Lktjy1JdhuG1Kmn1nfT4gtfQvhCA6hKy KzWRVmmn8r5iOXsJmbg9d9epa5xRBxLjqgziA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=xIN6JMOrjqiC1rCILj+1V2GKoXgA5vkViCrMihRfu9v5JeBiO0vh3yXXghsBWPAzbU jruMmoaPrA1vsR0kh0aVhV0sfFT4LUY9VlCo4phte9xJG5iOFKRrmLo4MRQx2j5aKTw4 POJo6f3wPzXIks5bA2pWQDSuNI9kL8d4kv05M= Received: by 10.115.74.1 with SMTP id b1mr4072325wal.169.1222600369083; Sun, 28 Sep 2008 04:12:49 -0700 (PDT) Received: by 10.114.67.13 with HTTP; Sun, 28 Sep 2008 04:12:49 -0700 (PDT) Message-ID: Date: Sun, 28 Sep 2008 13:12:49 +0200 From: "Marco Trillo" To: freebsd-ppc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Fatal kernel trap on 7400 G4 processors X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 11:12:49 -0000 Hi all, Recent 8.0-current kernels cause a "fatal kernel trap" on 7400 G4 processors: fatal kernel trap exception = 0x7 (program) srr0 = 0x5336bc srr1 = 0x83032 lr = 0x5334b4 Stopped at 0x5336bc mfspr 0, dccr The address 0x5336bc corresponds to function cpu_setup() in powerpc/cpu.c: 5336b4: 7f 9e 00 00 cmpw cr7,r30,r0 5336b8: 40 be 02 94 bne+ cr7,53394c 5336bc: 7c 1a fa a6 mfdccr r0 <<<<< here 5336c0: 3d 20 00 5f lis r9,95 I tracked the line to the following code in cpu.c: switch (vers) { case MPC7400: case MPC7410: case MPC7447A: case MPC7448: case MPC7450: case MPC7455: case MPC7457: /* G3 systems don't have an L3 cache, so only check * for G4 and above */ l3cr_config = mfspr(SPR_L3CR); <<<< here /* Fallthrough */ In include/spr.h I see the following: #define SPR_L3CR 0x3fa /* .6. L3 Control Register */ #define SPR_DCCR 0x3fa /* 4.. Data Cache Cachability Register */ So it seems that the 7400 processor doesn't have these registers so it causes a fault. What do you think? Thanks, Marco.