Changeset c074ea2e in rtems


Ignore:
Timestamp:
Feb 20, 2003, 10:07:54 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
c494deb8
Parents:
da1100e
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
Location:
c/src/lib/libcpu/powerpc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    rda1100e rc074ea2e  
     12003-02-20      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 349/bsps
     4        * mpc6xx/exceptions/raw_exception.c, mpc6xx/mmu/bat.c,
     5        mpc6xx/mmu/pte121.c, shared/include/cpuIdent.c,
     6        shared/include/cpuIdent.h, shared/src/Makefile.am, shared/src/stack.c,
     7        shared/src/stackTrace.h, powerpc/registers.h:
     8          - undo improper 'fix' who broke mpc604r identification
     9          - fix: 7400 identification PVR value was wrong
     10          - enhance 'setdbat()' to switch OFF a given BAT if called with 0 size
     11          - fix: page table support bugfix
     12          - enhancement: provide routines to take and print stack trace
     13            snapshots
     14          - add definitions for HID1 and DABR SPRs
     15
    1162003-02-14      Greg Menke <gregory.menke@gsfc.nasa.gov>
    217
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c

    rda1100e rc074ea2e  
    126126        case PPC_604:
    127127        case PPC_604e:
    128         /* case PPC_604r: -- same value as PPC_750 */
     128        case PPC_604r:
    129129            if (!mpc604_vector_is_valid(vector)) {
    130130                return 0;
     
    139139            break;
    140140        default:
    141             printk("Please complete libcpu/powerpc/mpc6xx/raw_exception.c\n");
     141            printk("Please complete libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n");
    142142            printk("current_ppc_cpu = %x\n", current_ppc_cpu);
    143143            return 0;
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c

    rda1100e rc074ea2e  
    4444  ubat bat;
    4545
    46   bl = (size >> 17) - 1;
     46  bl = (size >= (1<<17)) ? (size >> 17) - 1 : 0;
    4747  /* 603, 604, etc. */
    4848  wimgxpp = flags & (_PAGE_WRITETHRU | _PAGE_NO_CACHE
     
    5454    bat.bat.batu.vp = 1;
    5555  bat_addrs[bat_index].start = virt;
    56   bat_addrs[bat_index].limit = virt + ((bl + 1) << 17) - 1;
     56  bat_addrs[bat_index].limit = virt + (bl ? ((bl + 1) << 17) - 1 : 0);
    5757  bat_addrs[bat_index].phys = phys;
     58  if ( 0 == bl ) {
     59    /* size of 0 tells us to switch it off */
     60        bat.bat.batu.vp = 0;
     61        bat.bat.batu.vs = 0;
     62  }
    5863  switch (bat_index) {
    5964  case 0 : asm_setdbat0(bat.word[0], bat.word[1]); break;
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/pte121.c

    rda1100e rc074ea2e  
    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 */
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c

    rda1100e rc074ea2e  
    3434    case PPC_603ev:             return "MPC603ev";
    3535    case PPC_604:               return "MPC604";
    36     /* case PPC_604r:           return "MPC604r"; same value as 750 */
    3736    case PPC_750:               return "MPC750";
    3837    case PPC_7400:              return "MPC7400";
    3938    case PPC_604e:              return "MPC604e";
     39    case PPC_604r:              return "MPC604r";
    4040    case PPC_620:               return "MPC620";
    4141    case PPC_860:               return "MPC860";
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h

    rda1100e rc074ea2e  
    2828  PPC_604e = 0x9,
    2929  PPC_604r = 0xA,
    30   PPC_7400 = 0xA,
     30  PPC_7400 = 0xC,
    3131  PPC_620 = 0x16,
    3232  PPC_860 = 0x50,
  • c/src/lib/libcpu/powerpc/shared/src/Makefile.am

    rda1100e rc074ea2e  
    66VPATH = @srcdir@:@srcdir@/../../../shared/src
    77
    8 C_FILES = cache.c cache_aligned_malloc.c cache_manager.c
     8C_FILES = cache.c cache_aligned_malloc.c cache_manager.c stack.c
    99C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
    1010
    1111include_libcpudir = $(includedir)/libcpu
    1212
    13 include_libcpu_HEADERS = cache_.h cache.h
     13include_libcpu_HEADERS = cache_.h cache.h stackTrace.h
    1414
    1515OBJS = $(C_O_FILES)
Note: See TracChangeset for help on using the changeset viewer.