Le 28/01/2022 à 09:07, Cédric Le Goater a écrit :
On 1/28/22 07:20, Christophe Leroy wrote:
Unlike the 604 core, the 603 doesn't perform table search in HW. When a TLB Miss occurs, the 603 generates one of three specific TLB Miss exception:
- Instruction TLB Miss
- Data read TLB Miss
- Data store TLB Miss
The associated exception handlers have to search the match page table entry and load it in a TLB entry.
This patch implements the exemple provided in the reference manual (with a couple of errors corrected).
It is running under QEMU now ? what else do we need ?
Address translation now works properly.
I'm still facing some blocking, it enters enterforth() again and again then ends up at a wrong address.
Breakpoint 5, enterforth (xt=0xfff5ce54) at /home/chleroy/openbios/kernel/forth.c:137 137 if (read_ucell(_cfa) != DOCOL) { => 0xfff0c9cc <enterforth+0>: 81 23 00 00 lwz r9,0(r3) 0xfff0c9d0 <enterforth+4>: 7c 08 02 a6 mflr r0 0xfff0c9d4 <enterforth+8>: 94 21 ff b0 stwu r1,-80(r1) 0xfff0c9d8 <enterforth+12>: 2c 09 00 01 cmpwi r9,1 0xfff0c9dc <enterforth+16>: be 01 00 10 stmw r16,16(r1) 0xfff0c9e0 <enterforth+20>: 7c 7f 1b 78 mr r31,r3 0xfff0c9e4 <enterforth+24>: 90 01 00 54 stw r0,84(r1) 0xfff0c9e8 <enterforth+28>: 41 82 00 14 beq 0xfff0c9fc <enterforth+48> (gdb) Continuing.
Breakpoint 5, enterforth (xt=0xfff51e08) at /home/chleroy/openbios/kernel/forth.c:137 137 if (read_ucell(_cfa) != DOCOL) { => 0xfff0c9cc <enterforth+0>: 81 23 00 00 lwz r9,0(r3) 0xfff0c9d0 <enterforth+4>: 7c 08 02 a6 mflr r0 0xfff0c9d4 <enterforth+8>: 94 21 ff b0 stwu r1,-80(r1) 0xfff0c9d8 <enterforth+12>: 2c 09 00 01 cmpwi r9,1 0xfff0c9dc <enterforth+16>: be 01 00 10 stmw r16,16(r1) 0xfff0c9e0 <enterforth+20>: 7c 7f 1b 78 mr r31,r3 0xfff0c9e4 <enterforth+24>: 90 01 00 54 stw r0,84(r1) 0xfff0c9e8 <enterforth+28>: 41 82 00 14 beq 0xfff0c9fc <enterforth+48> (gdb) Continuing.
Breakpoint 5, enterforth (xt=0xfff5ce54) at /home/chleroy/openbios/kernel/forth.c:137 137 if (read_ucell(_cfa) != DOCOL) { => 0xfff0c9cc <enterforth+0>: 81 23 00 00 lwz r9,0(r3) 0xfff0c9d0 <enterforth+4>: 7c 08 02 a6 mflr r0 0xfff0c9d4 <enterforth+8>: 94 21 ff b0 stwu r1,-80(r1) 0xfff0c9d8 <enterforth+12>: 2c 09 00 01 cmpwi r9,1 0xfff0c9dc <enterforth+16>: be 01 00 10 stmw r16,16(r1) 0xfff0c9e0 <enterforth+20>: 7c 7f 1b 78 mr r31,r3 0xfff0c9e4 <enterforth+24>: 90 01 00 54 stw r0,84(r1) 0xfff0c9e8 <enterforth+28>: 41 82 00 14 beq 0xfff0c9fc <enterforth+48> (gdb) Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap. 0x00120000 in ?? () => 0x00120000: 00 00 00 00 .long 0x0 (gdb)