Changeset a9ac978 in mainline for kernel/arch/sparc64/src/cpu/cpu.c


Ignore:
Timestamp:
2006-09-27T20:11:34Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00b38a3
Parents:
86b31ba9
Message:

SMP stuff for sparc64.
Almost complete except for IPIs.
The absence of IPI support deadlocks
the kernel when more CPUs are configured.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/cpu/cpu.c

    r86b31ba9 ra9ac978  
    5151       
    5252        upa_config.value = upa_config_read();
     53        CPU->arch.mid = upa_config.mid;
     54       
    5355        node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu");
    5456        while (node) {
     
    5860                if (prop && prop->value) {
    5961                        mid = *((uint32_t *) prop->value);
    60                         if (mid == upa_config.mid) {
     62                        if (mid == CPU->arch.mid) {
    6163                                prop = ofw_tree_getprop(node, "clock-frequency");
    6264                                if (prop && prop->value)
     
    7981/** Print version information for a processor.
    8082 *
     83 * This function is called by the bootstrap processor.
     84 *
    8185 * @param m Processor structure of the CPU for which version information is to be printed.
    8286 */
     
    8589        char *manuf, *impl;
    8690
    87         switch (CPU->arch.ver.manuf) {
    88             case MANUF_FUJITSU:
     91        switch (m->arch.ver.manuf) {
     92        case MANUF_FUJITSU:
    8993                manuf = "Fujitsu";
    9094                break;
    91             case MANUF_ULTRASPARC:
     95        case MANUF_ULTRASPARC:
    9296                manuf = "UltraSPARC";
    9397                break;
    94             case MANUF_SUN:
     98        case MANUF_SUN:
    9599                manuf = "Sun";
    96100                break;
    97             default:
     101        default:
    98102                manuf = "Unknown";
    99103                break;
     
    101105       
    102106        switch (CPU->arch.ver.impl) {
    103             case IMPL_ULTRASPARCI:
     107        case IMPL_ULTRASPARCI:
    104108                impl = "UltraSPARC I";
    105109                break;
    106             case IMPL_ULTRASPARCII:
     110        case IMPL_ULTRASPARCII:
    107111                impl = "UltraSPARC II";
    108112                break;
    109             case IMPL_ULTRASPARCII_I:
     113        case IMPL_ULTRASPARCII_I:
    110114                impl = "UltraSPARC IIi";
    111115                break;
    112             case IMPL_ULTRASPARCII_E:
     116        case IMPL_ULTRASPARCII_E:
    113117                impl = "UltraSPARC IIe";
    114118                break;
    115             case IMPL_ULTRASPARCIII:
     119        case IMPL_ULTRASPARCIII:
    116120                impl = "UltraSPARC III";
    117121                break;
    118             case IMPL_ULTRASPARCIV_PLUS:
     122        case IMPL_ULTRASPARCIV_PLUS:
    119123                impl = "UltraSPARC IV+";
    120124                break;
    121             case IMPL_SPARC64V:
     125        case IMPL_SPARC64V:
    122126                impl = "SPARC 64V";
    123127                break;
    124             default:
     128        default:
    125129                impl = "Unknown";
    126130                break;
     
    128132
    129133        printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n",
    130                 CPU->id, manuf, impl, CPU->arch.ver.mask, CPU->arch.clock_frequency/1000000);
     134                m->id, manuf, impl, m->arch.ver.mask, m->arch.clock_frequency/1000000);
    131135}
    132136
Note: See TracChangeset for help on using the changeset viewer.