2 * This file is part of the coreboot project.
4 * Copyright (C) 2000 AG Electronics Ltd.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #define RODATA __attribute__ ((__section__ (".rodata")))
26 /* stringify is needed for macro expansion */
27 #define stringify(x) #x
29 #define mfdcr(reg) ({unsigned int result; \
30 __asm__ volatile("mfdcr %0, " stringify(reg) \
31 : "=r" (result)); result;})
33 #define mtdcr(reg, v) asm volatile("mtdcr " stringify(reg) ",%0" \
36 extern unsigned ppc_getmsr(void);
37 extern unsigned ppc_gethid0(void);
38 extern unsigned ppc_gethid1(void);
39 extern unsigned ppc_getpvr(void);
40 extern void ppc_setmsr(unsigned);
41 extern void ppc_sethid0(unsigned);
42 extern void ppc_set1015(unsigned);
44 extern void ppc_init_float_registers(const double *);
46 /* Do CPU specific setup, with optional icache */
47 extern void ppc_setup_cpu(int icache);
49 extern void ppc_enable_dcache(void);
50 extern void ppc_disable_dcache(void);
51 extern void ppc_enable_mmu(void);
53 /* Describe which sort of ppc CPU I am */
54 extern void ppc_identify(void);