[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] New cookie for ColdFire MCUs



For people not following EmuTOS mailing:

It has been discussed the creation of a new cookie ("_MCF") for
obtaining information about the ColdFire's MCU capabilities. The value
of this cookie is a pointer to the structure below.

Please don't hesitate to give your opinion if you see something that
you don't like or if you'd like to add anything.


/*
 *  Values defined below taken from ColdFire Family Programmer's Reference
 *  Manual (CFPRM). Section 1.10 Hardware Configuration Information
 */

/* ColdFire core version */
#define MCF_V1  1
#define MCF_V2  2
#define MCF_V3  3
#define MCF_V4  4
#define MCF_V5  5

/* Instruction-Set Architecture (ISA) revision level */
#define MCF_ISA_A       0
#define MCF_ISA_B       1
#define MCF_ISA_C       2
#define MCF_ISA_A_PLUS  8

/* Debug module revision number */
#define MCF_DEBUG_A             0
#define MCF_DEBUG_B             1
#define MCF_DEBUG_C             2
#define MCF_DEBUG_D             3
#define MCF_DEBUG_E             4
#define MCF_DEBUG_B_PLUS        9
#define MCF_DEBUG_D_PLUS        11
#define MCF_DEBUG_D_PLUS_PST    15

#define MCF_VALUE_UNKNOWN     -1

typedef struct {
#define COOKIE_MCF_VERSION    1
    UBYTE version;            /* This struct version */
    BYTE device_name[16];     /* Part number or chip name */
    BYTE core;                /* ColdFire core version number */
    BYTE revision;            /* Processor revision number */
    BYTE mac;                 /* MAC present? (TRUE / FALSE) */
    BYTE div;                 /* Divider present? (TRUE / FALSE) */
    BYTE emac;                /* EMAC present? (TRUE / FALSE) */
    BYTE fpu;                 /* FPU present? (TRUE / FALSE) */
    BYTE mmu;                 /* MMU present? (TRUE / FALSE) */
    BYTE isa;                 /* Instruction-Set Architecture (ISA)
revision level */
    BYTE debug;               /* Debug module revision */
    WORD sysbus_frequency;    /* System bus frequency */
} MCF_COOKIE;