Changeset 38de8a5 in mainline for arch/mips/src/cpu/cpu.c


Ignore:
Timestamp:
2005-09-09T13:50:54Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b02e5d1
Parents:
b0edf3b2
Message:

MIPS architecture now works without any problems in

  • msim: compile as OUTPUT_FORMAT(binary)
  • gxemul: compile as OUTPUT_FORMAT(ecoff-littlemips), or create

configuration file for binary format (will be done later)

  • simics: compile as OUTPUT_FORMAT(elf32-little), might work with binary

format, didn't try yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips/src/cpu/cpu.c

    rb0edf3b2 r38de8a5  
    3535
    3636#include <typedefs.h>
    37 #include <print.h>
     37#include <print.h>     
    3838
    39 struct {
     39struct data_t {
    4040        char *vendor;
    4141        char *model;
    42 } imp_data[] = {
     42};
     43
     44static struct data_t imp_data[] = {
    4345        { "Invalid", "Invalid" },       /* 0x00 */
    4446        { "MIPS", "R2000" },            /* 0x01 */
     
    7981};
    8082
     83static struct data_t imp_data80[] = {
     84        { "MIPS", "4Kc" },  /* 0x80 */
     85        {"Invalid","Invalid"}, /* 0x81 */
     86        {"Invalid","Invalid"}, /* 0x82 */
     87        {"MIPS","4Km & 4Kp"} /* 0x83 */
     88};
     89
    8190void cpu_arch_init(void)
    8291{
     
    91100void cpu_print_report(cpu_t *m)
    92101{
     102        struct data_t *data;
     103
     104        if (m->arch.imp_num & 0x80) {
     105                data = &imp_data80[m->arch.imp_num & 0x7f];
     106        } else
     107                data = &imp_data[m->arch.imp_num];
     108
    93109        printf("cpu%d: %s %s (rev=%d.%d, imp=%d)\n",
    94                 m->id, imp_data[m->arch.imp_num].vendor, imp_data[m->arch.imp_num].model, m->arch.rev_num >> 4, m->arch.rev_num & 0xf, m->arch.imp_num);
     110                m->id, data->vendor, data->model, m->arch.rev_num >> 4,
     111               m->arch.rev_num & 0xf, m->arch.imp_num);
    95112}
Note: See TracChangeset for help on using the changeset viewer.