Ignore:
Timestamp:
Feb 20, 2003, 10:07:22 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8860f103
Parents:
f3ceb2bf
Message:

2003-02-20 Till Straumann <strauman@…>

PR 349/bsps

  • mpc6xx/exceptions/raw_exception.c, mpc6xx/mmu/bat.c, mpc6xx/mmu/pte121.c, shared/include/cpuIdent.c, shared/include/cpuIdent.h, shared/src/Makefile.am, shared/src/stack.c, shared/src/stackTrace.h, powerpc/registers.h:
    • undo improper 'fix' who broke mpc604r identification
    • fix: 7400 identification PVR value was wrong
    • enhance 'setdbat()' to switch OFF a given BAT if called with 0 size
    • fix: page table support bugfix
    • enhancement: provide routines to take and print stack trace snapshots
    • add definitions for HID1 and DABR SPRs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c

    rf3ceb2bf rd49389a  
    2323#include <rtems/bspIo.h>
    2424#include <libcpu/cpuIdent.h>
     25#ifdef  DEBUG_EXC
    2526#include <bsp.h>
    26 #ifdef  DEBUG_EXC
    2727#include <bsp/vectors.h>
    2828#include <libcpu/raw_exception.h>
     
    126126
    127127/* Horrible Macros */
    128 #ifdef __rtems
     128#ifdef __rtems__
    129129/* must not use printf until multitasking is up */
    130130typedef void (*PrintF)(char *,...);
     
    364364                return 0; /* misaligned */
    365365
    366         /* This should work on a 604, but I couldn't test (I did
    367          * on 750 and 7400). Verify that the TLB invalidation works
     366        /* This was tested on 604r, 750 and 7400.
     367         * On other CPUs, verify that the TLB invalidation works
    368368         * for a new CPU variant and that it has hardware PTE lookup/
    369369         * TLB replacement before adding it to this list.
     
    679679
    680680        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        {
    682698                int                             err=0;
    683699                char                    buf[500];
    684700                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
    685709                if ( (*lp & (0xfffff0<<7)) || *(lp+1) & 0xe00 || (pte->v && pte->marked)) {
    686710                        /* check for vsid (without segment bits) == 0, unused bits == 0, valid && marked */
Note: See TracChangeset for help on using the changeset viewer.