From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 30 Aug 2007 13:55:27 +0100 (BST) Received: from host78-221-dynamic.2-87-r.retail.telecomitalia.it ([87.2.221.78]:51978 "EHLO eppesuigoccas.homedns.org") by ftp.linux-mips.org with ESMTP id S20022321AbXH3MzS (ORCPT ); Thu, 30 Aug 2007 13:55:18 +0100 Received: from eppesuig3 ([192.168.2.50]) by eppesuigoccas.homedns.org with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1IQjVA-00012g-04 for linux-mips@linux-mips.org; Thu, 30 Aug 2007 14:52:02 +0200 Subject: Re: Exception while loading kernel From: Giuseppe Sacco To: linux-mips@linux-mips.org In-Reply-To: References: <1188030215.13999.14.camel@scarafaggio> <1188196563.2177.13.camel@scarafaggio> <46D2CB0F.7020505@27m.se> <1188321514.6882.3.camel@scarafaggio> Content-Type: text/plain Date: Thu, 30 Aug 2007 14:52:22 +0200 Message-Id: <1188478342.6770.14.camel@scarafaggio> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 16321 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: giuseppe@eppesuigoccas.homedns.org Precedence: bulk X-list: linux-mips Hi Markus, Il giorno mer, 29/08/2007 alle 04.25 +0200, Markus Gothe ha scritto: > Use gdb and list the read address. I think I understood what you mean. I recompiled the kernel adding the debug symbols, stripped it and booted with it. There I got those numbers (using the 32bit version): Exception PC: 0x8021c9fc, Exception RA: 0x804ddc6c gpda 0x81060e08, _regs 0x81061008 arg: 81070000 0 80503518 1 tmp: 81070000 1000 8051a868 fff8054f ffffffff 81412ef4 a13fab68 7 sve: 81070000 4083ae51 0 4608a976 0 4085cc91 0 3ed97758 then run gdb and issue those commands: (gdb) info symbol 0x8021c9fc __bzero + 56 in section .text (gdb) info symbol 0x804ddc6c init_bootmem_core + 196 in section .init.text (gdb) list *0x804ddc6c 0x804ddc6c is in init_bootmem_core (mm/bootmem.c:107). 102 */ 103 mapsize = get_mapsize(bdata); 104 memset(bdata->node_bootmem_map, 0xff, mapsize); 105 106 return mapsize; 107 } 108 109 /* 110 * Marks a particular physical memory range as unallocatable. Usable RAM 111 * might be used for boot-time allocations - or it might get added (gdb) list *0x8021c9fc No source file for address 0x8021c9fc. (gdb) disassemble 0x804ddc6c Dump of assembler code for function init_bootmem_core: 0xffffffff804ddba8 : daddiu sp,sp,-32 0xffffffff804ddbac : sd ra,16(sp) 0xffffffff804ddbb0 : sd s1,8(sp) 0xffffffff804ddbb4 : sd s0,0(sp) 0xffffffff804ddbb8 : li v0,-13 0xffffffff804ddbbc : ld s1,648(a0) 0xffffffff804ddbc0 : dsll a1,a1,0xc 0xffffffff804ddbc4 : dsll32 v0,v0,0x1b 0xffffffff804ddbc8 : daddu a1,a1,v0 0xffffffff804ddbcc : dsll a2,a2,0xc 0xffffffff804ddbd0 : sd a1,16(s1) 0xffffffff804ddbd4 : sd a3,8(s1) 0xffffffff804ddbd8 : sd a2,0(s1) 0xffffffff804ddbdc : lui v1,0x0 0xffffffff804ddbe0 : lui at,0x8049 0xffffffff804ddbe4 : daddiu v1,v1,0 0xffffffff804ddbe8 : dsll32 v1,v1,0x0 0xffffffff804ddbec : daddu v1,v1,at 0xffffffff804ddbf0 : ld v1,2112(v1) 0xffffffff804ddbf4 : lui a1,0x0 0xffffffff804ddbf8 : lui at,0x8049 0xffffffff804ddbfc : daddiu a1,a1,0 0xffffffff804ddc00 : daddiu at,at,2112 0xffffffff804ddc04 : dsll32 a1,a1,0x0 0xffffffff804ddc08 : daddu a1,a1,at 0xffffffff804ddc0c : bnel v1,a1,0x804ddc88 0xffffffff804ddc10 : ld v0,-48(v1) 0xffffffff804ddc14 : daddiu v0,s1,48 0xffffffff804ddc18 : sd a1,48(s1) 0xffffffff804ddc1c : move a0,s1 0xffffffff804ddc20 : lui at,0x0 0xffffffff804ddc24 : daddiu at,at,0 0xffffffff804ddc28 : dsll at,at,0x10 0xffffffff804ddc2c : daddiu at,at,-32695 0xffffffff804ddc30 : dsll at,at,0x10 0xffffffff804ddc34 : sd v0,2120(at) 0xffffffff804ddc38 : lui at,0x0 0xffffffff804ddc3c : daddiu at,at,0 0xffffffff804ddc40 : dsll at,at,0x10 0xffffffff804ddc44 : daddiu at,at,-32695 0xffffffff804ddc48 : dsll at,at,0x10 0xffffffff804ddc4c : sd v0,2112(at) 0xffffffff804ddc50 : jal 0x804dd5c8 0xffffffff804ddc54 : sd a1,8(v0) 0xffffffff804ddc58 : ld a0,16(s1) 0xffffffff804ddc5c : move s0,v0 0xffffffff804ddc60 : li a1,255 0xffffffff804ddc64 : jal 0x8021c9a0 0xffffffff804ddc68 : move a2,v0 0xffffffff804ddc6c : move v0,s0 0xffffffff804ddc70 : ld ra,16(sp) 0xffffffff804ddc74 : ld s1,8(sp) 0xffffffff804ddc78 : ld s0,0(sp) 0xffffffff804ddc7c : jr ra [...] (gdb) info line *0x804ddc6c Line 107 of "mm/bootmem.c" starts at address 0x804ddc6c and ends at 0x804ddc88 . (gdb) info line *0x804ddc6b Line 104 of "mm/bootmem.c" starts at address 0x804ddc60 and ends at 0x804ddc6c . So, it this what you requested? >>From what I understand the problem may be that bdata->node_bootmem_map maybe incorrectly initialised for this machine. Bye, Giuseppe From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from host78-221-dynamic.2-87-r.retail.telecomitalia.it ([87.2.221.78]:51978 "EHLO eppesuigoccas.homedns.org") by ftp.linux-mips.org with ESMTP id S20022321AbXH3MzS (ORCPT ); Thu, 30 Aug 2007 13:55:18 +0100 Received: from eppesuig3 ([192.168.2.50]) by eppesuigoccas.homedns.org with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1IQjVA-00012g-04 for linux-mips@linux-mips.org; Thu, 30 Aug 2007 14:52:02 +0200 Subject: Re: Exception while loading kernel From: Giuseppe Sacco In-Reply-To: References: <1188030215.13999.14.camel@scarafaggio> <1188196563.2177.13.camel@scarafaggio> <46D2CB0F.7020505@27m.se> <1188321514.6882.3.camel@scarafaggio> Content-Type: text/plain Date: Thu, 30 Aug 2007 14:52:22 +0200 Message-ID: <1188478342.6770.14.camel@scarafaggio> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org To: linux-mips@linux-mips.org Message-ID: <20070830125222.JZ4h_zmW3vODLf1BbPkOIwYGHFuT2bAENV7LxsN31zg@z> Hi Markus, Il giorno mer, 29/08/2007 alle 04.25 +0200, Markus Gothe ha scritto: > Use gdb and list the read address. I think I understood what you mean. I recompiled the kernel adding the debug symbols, stripped it and booted with it. There I got those numbers (using the 32bit version): Exception PC: 0x8021c9fc, Exception RA: 0x804ddc6c gpda 0x81060e08, _regs 0x81061008 arg: 81070000 0 80503518 1 tmp: 81070000 1000 8051a868 fff8054f ffffffff 81412ef4 a13fab68 7 sve: 81070000 4083ae51 0 4608a976 0 4085cc91 0 3ed97758 then run gdb and issue those commands: (gdb) info symbol 0x8021c9fc __bzero + 56 in section .text (gdb) info symbol 0x804ddc6c init_bootmem_core + 196 in section .init.text (gdb) list *0x804ddc6c 0x804ddc6c is in init_bootmem_core (mm/bootmem.c:107). 102 */ 103 mapsize = get_mapsize(bdata); 104 memset(bdata->node_bootmem_map, 0xff, mapsize); 105 106 return mapsize; 107 } 108 109 /* 110 * Marks a particular physical memory range as unallocatable. Usable RAM 111 * might be used for boot-time allocations - or it might get added (gdb) list *0x8021c9fc No source file for address 0x8021c9fc. (gdb) disassemble 0x804ddc6c Dump of assembler code for function init_bootmem_core: 0xffffffff804ddba8 : daddiu sp,sp,-32 0xffffffff804ddbac : sd ra,16(sp) 0xffffffff804ddbb0 : sd s1,8(sp) 0xffffffff804ddbb4 : sd s0,0(sp) 0xffffffff804ddbb8 : li v0,-13 0xffffffff804ddbbc : ld s1,648(a0) 0xffffffff804ddbc0 : dsll a1,a1,0xc 0xffffffff804ddbc4 : dsll32 v0,v0,0x1b 0xffffffff804ddbc8 : daddu a1,a1,v0 0xffffffff804ddbcc : dsll a2,a2,0xc 0xffffffff804ddbd0 : sd a1,16(s1) 0xffffffff804ddbd4 : sd a3,8(s1) 0xffffffff804ddbd8 : sd a2,0(s1) 0xffffffff804ddbdc : lui v1,0x0 0xffffffff804ddbe0 : lui at,0x8049 0xffffffff804ddbe4 : daddiu v1,v1,0 0xffffffff804ddbe8 : dsll32 v1,v1,0x0 0xffffffff804ddbec : daddu v1,v1,at 0xffffffff804ddbf0 : ld v1,2112(v1) 0xffffffff804ddbf4 : lui a1,0x0 0xffffffff804ddbf8 : lui at,0x8049 0xffffffff804ddbfc : daddiu a1,a1,0 0xffffffff804ddc00 : daddiu at,at,2112 0xffffffff804ddc04 : dsll32 a1,a1,0x0 0xffffffff804ddc08 : daddu a1,a1,at 0xffffffff804ddc0c : bnel v1,a1,0x804ddc88 0xffffffff804ddc10 : ld v0,-48(v1) 0xffffffff804ddc14 : daddiu v0,s1,48 0xffffffff804ddc18 : sd a1,48(s1) 0xffffffff804ddc1c : move a0,s1 0xffffffff804ddc20 : lui at,0x0 0xffffffff804ddc24 : daddiu at,at,0 0xffffffff804ddc28 : dsll at,at,0x10 0xffffffff804ddc2c : daddiu at,at,-32695 0xffffffff804ddc30 : dsll at,at,0x10 0xffffffff804ddc34 : sd v0,2120(at) 0xffffffff804ddc38 : lui at,0x0 0xffffffff804ddc3c : daddiu at,at,0 0xffffffff804ddc40 : dsll at,at,0x10 0xffffffff804ddc44 : daddiu at,at,-32695 0xffffffff804ddc48 : dsll at,at,0x10 0xffffffff804ddc4c : sd v0,2112(at) 0xffffffff804ddc50 : jal 0x804dd5c8 0xffffffff804ddc54 : sd a1,8(v0) 0xffffffff804ddc58 : ld a0,16(s1) 0xffffffff804ddc5c : move s0,v0 0xffffffff804ddc60 : li a1,255 0xffffffff804ddc64 : jal 0x8021c9a0 0xffffffff804ddc68 : move a2,v0 0xffffffff804ddc6c : move v0,s0 0xffffffff804ddc70 : ld ra,16(sp) 0xffffffff804ddc74 : ld s1,8(sp) 0xffffffff804ddc78 : ld s0,0(sp) 0xffffffff804ddc7c : jr ra [...] (gdb) info line *0x804ddc6c Line 107 of "mm/bootmem.c" starts at address 0x804ddc6c and ends at 0x804ddc88 . (gdb) info line *0x804ddc6b Line 104 of "mm/bootmem.c" starts at address 0x804ddc60 and ends at 0x804ddc6c . So, it this what you requested? >From what I understand the problem may be that bdata->node_bootmem_map maybe incorrectly initialised for this machine. Bye, Giuseppe