OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [sparc/] [prom/] [mp.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* $Id: mp.c,v 1.1.1.1 2001-09-10 07:44:03 simons Exp $
2
 * mp.c:  OpenBoot Prom Multiprocessor support routines.  Don't call
3
 *        these on a UP or else you will halt and catch fire. ;)
4
 *
5
 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6
 */
7
 
8
#include <asm/openprom.h>
9
#include <asm/oplib.h>
10
 
11
/* Start cpu with prom-tree node 'cpunode' using context described
12
 * by 'ctable_reg' in context 'ctx' at program counter 'pc'.
13
 *
14
 * XXX Have to look into what the return values mean. XXX
15
 */
16
int
17
prom_startcpu(int cpunode, struct linux_prom_registers *ctable_reg, int ctx, char *pc)
18
{
19
        switch(prom_vers) {
20
        case PROM_V0:
21
        case PROM_V2:
22
        case PROM_AP1000:
23
                break;
24
        case PROM_V3:
25
        case PROM_P1275:
26
                return (*(romvec->v3_cpustart))(cpunode, (int) ctable_reg, ctx, pc);
27
                break;
28
        };
29
 
30
        return -1;
31
}
32
 
33
/* Stop CPU with device prom-tree node 'cpunode'.
34
 * XXX Again, what does the return value really mean? XXX
35
 */
36
int
37
prom_stopcpu(int cpunode)
38
{
39
        switch(prom_vers) {
40
        case PROM_V0:
41
        case PROM_V2:
42
        case PROM_AP1000:
43
                break;
44
        case PROM_V3:
45
        case PROM_P1275:
46
                return (*(romvec->v3_cpustop))(cpunode);
47
                break;
48
        };
49
 
50
        return -1;
51
}
52
 
53
/* Make CPU with device prom-tree node 'cpunode' idle.
54
 * XXX Return value, anyone? XXX
55
 */
56
int
57
prom_idlecpu(int cpunode)
58
{
59
        switch(prom_vers) {
60
        case PROM_V0:
61
        case PROM_V2:
62
        case PROM_AP1000:
63
                break;
64
        case PROM_V3:
65
        case PROM_P1275:
66
                return (*(romvec->v3_cpuidle))(cpunode);
67
                break;
68
        };
69
 
70
        return -1;
71
}
72
 
73
/* Resume the execution of CPU with nodeid 'cpunode'.
74
 * XXX Come on, somebody has to know... XXX
75
 */
76
int
77
prom_restartcpu(int cpunode)
78
{
79
        switch(prom_vers) {
80
        case PROM_V0:
81
        case PROM_V2:
82
        case PROM_AP1000:
83
                break;
84
        case PROM_V3:
85
        case PROM_P1275:
86
                return (*(romvec->v3_cpuresume))(cpunode);
87
                break;
88
        };
89
 
90
        return -1;
91
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.