From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from parcelfarce.linux.theplanet.co.uk (parcelfarce.linux.theplanet.co.uk [195.92.249.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 6931B679E9 for ; Sun, 8 May 2005 04:50:25 +1000 (EST) Date: Sat, 7 May 2005 10:16:09 -0300 From: Marcelo Tosatti To: Dan Malek Message-ID: <20050507131609.GA16996@logos.cnet> References: <20050505172035.GB3339@logos.cnet> <1b2c7da800815bcdd76ddf27a2ab9c55@embeddededge.com> <20050506133858.GA6032@logos.cnet> <3ebef94782a6090ac3eb44bd7e78efbf@embeddededge.com> <20050506200338.GC14486@logos.cnet> <84773f72b8bba863c9471c0d121223a8@embeddededge.com> <20050506230523.GA15908@logos.cnet> <6f231f4afce0886929ca99426a86b47a@embeddededge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <6f231f4afce0886929ca99426a86b47a@embeddededge.com> Cc: linux-ppc-embedded Subject: Re: [PATCH] 8xx: fix usage of pinned 8Mbyte TLB entries List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > >So you do agree that pte's should not be created for the first > >8MBytes if CONFIG_PIN_TLB is set? :) > > NO. Just leave that code alone. I don't understand why you think > doing this will have any effect on the system operation. > > If you are able to run a system without creating these tables, then > the pinned TLBs must be working. If pinned TLBs weren't working, > the kernel would crash. Not creating 4kb mappings for the first 8Mbytes of kernel virtual addresses fixed the problem for me. Break at first start_kernel instruction (0xc02284a4). Dump TLB contents to "itlb-before". [marcelo@dmt ~]$ grep SPR itlb-before | grep 816 SPR 816 : 0x10002080 268443776 SPR 816 : 0x10001080 268439680 SPR 816 : 0x0ff79080 267882624 SPR 816 : 0x0ff261c0 267542976 SPR 816 : 0x0ff521c0 267723200 SPR 816 : 0x100121c0 268509632 SPR 816 : 0x100011c0 268440000 SPR 816 : 0x0ffdd1c0 268292544 SPR 816 : 0x0ffdb1c0 268284352 SPR 816 : 0x0fef51c0 267342272 SPR 816 : 0x0fef91c0 267358656 SPR 816 : 0x0fe0b1c0 266383808 SPR 816 : 0x0fef71c0 267350464 SPR 816 : 0x0fef61c0 267346368 SPR 816 : 0x0ffee1c0 268362176 SPR 816 : 0x0ffdc1c0 268288448 SPR 816 : 0x0fef21c0 267329984 SPR 816 : 0x0fef11c0 267325888 SPR 816 : 0x0fe071c0 266367424 SPR 816 : 0x0ffc61c0 268198336 SPR 816 : 0x0fe0c1c0 266387904 SPR 816 : 0x0ffc51c0 268194240 SPR 816 : 0x0fe091c0 266375616 SPR 816 : 0x0ffea080 268345472 SPR 816 : 0x0ff20080 267518080 SPR 816 : 0x0ff81080 267915392 SPR 816 : 0x1001c080 268550272 SPR 816 : 0x10008080 268468352 SPR 816 : 0x100021e0 268444128 SPR 816 : 0x100241e0 268583392 SPR 816 : 0x100301e0 268632544 SPR 816 : 0xc0000e1f -1073738209 <----- VALID 8MB TLB ENTRY "go" BDI breaks at BDI>i Target state : debug mode Debug entry cause : instruction breakpoint Current PC : 0xc0228544 BDI> 0xc0228538 : bl 0xc023107c 0xc022853c : bl 0xc0230f1c 0xc0228540 : bl 0xc0230cf4 0xc0228544 : bl 0xc022ead0 0xc0228548 : bl 0xc02354b0 0xc022854c : lis r9,-16348 [marcelo@dmt ~]$ grep SPR itlb-2 | grep 816 SPR 816 : 0x10001100 268439808 SPR 816 : 0x0ffdd100 268292352 SPR 816 : 0x0ffdb100 268284160 SPR 816 : 0x0fef5100 267342080 SPR 816 : 0x0fef9100 267358464 SPR 816 : 0x0fe0b100 266383616 SPR 816 : 0x0fef7100 267350272 SPR 816 : 0x0fef6100 267346176 SPR 816 : 0x0ffee100 268361984 SPR 816 : 0x0ffdc100 268288256 SPR 816 : 0xc0038110 -1073512176 <--------- SPR 816 : 0xc0063110 -1073336048 SPR 816 : 0xc0024110 -1073594096 SPR 816 : 0xc0017110 -1073647344 SPR 816 : 0xc000e110 -1073684208 SPR 816 : 0xc0003110 -1073729264 SPR 816 : 0xc0002110 -1073733360 SPR 816 : 0xc000d110 -1073688304 SPR 816 : 0xc0004110 -1073725168 SPR 816 : 0xc0012110 -1073667824 SPR 816 : 0xc01a1110 -1072033520 SPR 816 : 0xc01a2110 -1072029424 SPR 816 : 0xc000a110 -1073700592 SPR 816 : 0xc001c110 -1073626864 SPR 816 : 0xc001b110 -1073630960 <--------- SPR 816 : 0x0ff26100 267542784 SPR 816 : 0x0ff52100 SPR 816 : 0x10012100 268509440 SPR 816 : 0x100021e0 268444128 SPR 816 : 0x100241e0 268583392 SPR 816 : 0x100301e0 268632544 SPR 816 : 0xc0000e1f -1073738209 (gdb) disassemble start_kernel Dump of assembler code for function start_kernel: 0xc02284a4 : lis r3,-16358 0xc02284a8 : stwu r1,-32(r1) 0xc02284ac : mflr r0 0xc02284b0 : addi r3,r3,21832 0xc02284b4 : stw r0,36(r1) 0xc02284b8 : stmw r29,20(r1) 0xc02284bc : bl 0xc0012130 0xc02284c0 : addi r3,r1,8 0xc02284c4 : bl 0xc022ee28 0xc02284c8 : bl 0xc0230548 0xc02284cc : bl 0xc02321e8 0xc02284d0 : bl 0xc02326f4 0xc02284d4 : lis r4,-16348 0xc02284d8 : lis r3,-16355 0xc02284dc : addi r4,r4,-5804 0xc02284e0 : addi r3,r3,-6768 0xc02284e4 : bl 0xc0012130 0xc02284e8 : bl 0xc022842c 0xc02284ec : lis r5,-16353 0xc02284f0 : lis r6,-16353 0xc02284f4 : addi r5,r5,4580 0xc02284f8 : addi r6,r6,5060 ---Type to continue, or q to quit--- 0xc02284fc : subf r6,r5,r6 0xc0228500 : lis r0,-13108 0xc0228504 : ori r0,r0,52429 0xc0228508 : srawi r6,r6,2 0xc022850c : mullw r6,r6,r0 0xc0228510 : lwz r4,8(r1) 0xc0228514 : lis r7,-16349 0xc0228518 : lis r3,-16355 0xc022851c : addi r7,r7,-32404 0xc0228520 : addi r3,r3,-6740 0xc0228524 : bl 0xc0024dac 0xc0228528 : bl 0xc0231220 0xc022852c : bl 0xc022eaa0 0xc0228530 : bl 0xc02311f0 0xc0228534 : bl 0xc022eaa4 0xc0228538 : bl 0xc023107c 0xc022853c : bl 0xc0230f1c 0xc0228540 : bl 0xc0230cf4 0xc0228544 : bl 0xc022ead0 0xc0228548 : bl 0xc02354b0 0xc022854c : lis r9,-16348 0xc0228550 : lwz r3,-8180(r9) 0xc0228554 : cmpwi r3,0