summaryrefslogtreecommitdiff
path: root/src/arch/ppc
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2003-07-28 21:17:57 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2003-07-28 21:17:57 +0000
commit6257e0347d7cf0ba8cdb96ef5bc99224720e224b (patch)
tree9ab7147507bfc29881694b15a2975382646a828b /src/arch/ppc
parent06550b75e540b6a096fa9c82d56474d4fcf59d32 (diff)
added new routines
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1053 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/ppc')
-rw-r--r--src/arch/ppc/include/ppc.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/arch/ppc/include/ppc.h b/src/arch/ppc/include/ppc.h
index 88154712ff..8213d47e3a 100644
--- a/src/arch/ppc/include/ppc.h
+++ b/src/arch/ppc/include/ppc.h
@@ -7,14 +7,33 @@
#define BIG_ENDIAN
#define RODATA __attribute__ ((__section__ (".rodata")))
+/* stringify is needed for macro expansion */
+#define stringify(x) #x
+
+#define ppc_getdcr(reg) ({unsigned int result; \
+ __asm__ volatile("mfdcr %0, " stringify(reg) \
+ : "=r" (result)); result;})
+
+extern unsigned ppc_getmsr(void);
+extern unsigned ppc_gethid0(void);
+extern unsigned ppc_gethid1(void);
+extern unsigned ppc_getpvr(void);
+extern void ppc_setmsr(unsigned);
+extern void ppc_sethid0(unsigned);
+extern void ppc_set1015(unsigned);
+
+extern void ppc_init_float_registers(const double *);
+
/* Do CPU specific setup, with optional icache */
-void ppc_setup_cpu(int icache);
+extern void ppc_setup_cpu(int icache);
-void ppc_enable_dcache(void);
-void ppc_disable_dcache(void);
-void ppc_enable_mmu(void);
+extern void ppc_enable_dcache(void);
+extern void ppc_disable_dcache(void);
+extern void ppc_enable_mmu(void);
/* Describe which sort of ppc CPU I am */
-void ppc_identify(void);
+extern void ppc_identify(void);
+/* CPU clock speed in ticks per second */
+extern unsigned long get_clock_speed();
#endif