Changeset c074ea2e in rtems for c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
- Timestamp:
- Feb 20, 2003, 10:07:54 PM (18 years ago)
- Children:
- c494deb8
- Parents:
- da1100e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c
rda1100e rc074ea2e 23 23 #include <rtems/bspIo.h> 24 24 #include <libcpu/cpuIdent.h> 25 #ifdef DEBUG_EXC 25 26 #include <bsp.h> 26 #ifdef DEBUG_EXC27 27 #include <bsp/vectors.h> 28 28 #include <libcpu/raw_exception.h> … … 126 126 127 127 /* Horrible Macros */ 128 #ifdef __rtems 128 #ifdef __rtems__ 129 129 /* must not use printf until multitasking is up */ 130 130 typedef void (*PrintF)(char *,...); … … 364 364 return 0; /* misaligned */ 365 365 366 /* This should work on a 604, but I couldn't test (I did367 * on 750 and 7400). Verify that the TLB invalidation works366 /* This was tested on 604r, 750 and 7400. 367 * On other CPUs, verify that the TLB invalidation works 368 368 * for a new CPU variant and that it has hardware PTE lookup/ 369 369 * TLB replacement before adding it to this list. … … 679 679 680 680 v=m=0; 681 for (i=0, pte=pt->base; i<pt->size/sizeof(PTERec); i++,pte++) { 681 #if 1 682 /* 10/9/2002: I had machine checks crashing after this loop 683 * terminated. Maybe caused by speculative loads 684 * from beyond the valid memory area (since the 685 * page hash table sits at the top of physical 686 * memory). 687 * Very bizarre - the other loops in this file 688 * seem to be fine. Maybe there is a compiler bug?? 689 * For the moment, I let the loop run backwards... 690 * 691 * Also see the comment a couple of lines down. 692 */ 693 for (i=pt->size/sizeof(PTERec)-1, pte=pt->base + i; i>=0; i--,pte--) 694 #else 695 for (i=0, pte=pt->base; i<pt->size/sizeof(PTERec); i++,pte++) 696 #endif 697 { 682 698 int err=0; 683 699 char buf[500]; 684 700 unsigned long *lp=(unsigned long*)pte; 701 #if 0 702 /* If I put this bogus while statement here (the body is 703 * never reached), the original loop works OK 704 */ 705 while (pte >= pt->base + pt->size/sizeof(PTERec)) 706 /* never reached */; 707 #endif 708 685 709 if ( (*lp & (0xfffff0<<7)) || *(lp+1) & 0xe00 || (pte->v && pte->marked)) { 686 710 /* check for vsid (without segment bits) == 0, unused bits == 0, valid && marked */
Note: See TracChangeset
for help on using the changeset viewer.