diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sparc/mpmbox.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-sparc/mpmbox.h')
-rw-r--r-- | include/asm-sparc/mpmbox.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/include/asm-sparc/mpmbox.h b/include/asm-sparc/mpmbox.h new file mode 100644 index 000000000000..0e1bc5801d8a --- /dev/null +++ b/include/asm-sparc/mpmbox.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* $Id: mpmbox.h,v 1.4 1996/04/25 06:13:19 davem Exp $ | ||
2 | * mpmbox.h: Interface and defines for the OpenProm mailbox | ||
3 | * facilities for MP machines under Linux. | ||
4 | * | ||
5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _SPARC_MPMBOX_H | ||
9 | #define _SPARC_MPMBOX_H | ||
10 | |||
11 | /* The prom allocates, for each CPU on the machine an unsigned | ||
12 | * byte in physical ram. You probe the device tree prom nodes | ||
13 | * for these values. The purpose of this byte is to be able to | ||
14 | * pass messages from one cpu to another. | ||
15 | */ | ||
16 | |||
17 | /* These are the main message types we have to look for in our | ||
18 | * Cpu mailboxes, based upon these values we decide what course | ||
19 | * of action to take. | ||
20 | */ | ||
21 | |||
22 | /* The CPU is executing code in the kernel. */ | ||
23 | #define MAILBOX_ISRUNNING 0xf0 | ||
24 | |||
25 | /* Another CPU called romvec->pv_exit(), you should call | ||
26 | * prom_stopcpu() when you see this in your mailbox. | ||
27 | */ | ||
28 | #define MAILBOX_EXIT 0xfb | ||
29 | |||
30 | /* Another CPU called romvec->pv_enter(), you should call | ||
31 | * prom_cpuidle() when this is seen. | ||
32 | */ | ||
33 | #define MAILBOX_GOSPIN 0xfc | ||
34 | |||
35 | /* Another CPU has hit a breakpoint either into kadb or the prom | ||
36 | * itself. Just like MAILBOX_GOSPIN, you should call prom_cpuidle() | ||
37 | * at this point. | ||
38 | */ | ||
39 | #define MAILBOX_BPT_SPIN 0xfd | ||
40 | |||
41 | /* Oh geese, some other nitwit got a damn watchdog reset. The party's | ||
42 | * over so go call prom_stopcpu(). | ||
43 | */ | ||
44 | #define MAILBOX_WDOG_STOP 0xfe | ||
45 | |||
46 | #ifndef __ASSEMBLY__ | ||
47 | |||
48 | /* Handy macro's to determine a cpu's state. */ | ||
49 | |||
50 | /* Is the cpu still in Power On Self Test? */ | ||
51 | #define MBOX_POST_P(letter) ((letter) >= 0x00 && (letter) <= 0x7f) | ||
52 | |||
53 | /* Is the cpu at the 'ok' prompt of the PROM? */ | ||
54 | #define MBOX_PROMPROMPT_P(letter) ((letter) >= 0x80 && (letter) <= 0x8f) | ||
55 | |||
56 | /* Is the cpu spinning in the PROM? */ | ||
57 | #define MBOX_PROMSPIN_P(letter) ((letter) >= 0x90 && (letter) <= 0xef) | ||
58 | |||
59 | /* Sanity check... This is junk mail, throw it out. */ | ||
60 | #define MBOX_BOGON_P(letter) ((letter) >= 0xf1 && (letter) <= 0xfa) | ||
61 | |||
62 | /* Is the cpu actively running an application/kernel-code? */ | ||
63 | #define MBOX_RUNNING_P(letter) ((letter) == MAILBOX_ISRUNNING) | ||
64 | |||
65 | #endif /* !(__ASSEMBLY__) */ | ||
66 | |||
67 | #endif /* !(_SPARC_MPMBOX_H) */ | ||