2 * This file contains low level CPU setup functions.
3 * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.org)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
12 #include <asm/processor.h>
14 #include <asm/cputable.h>
15 #include <asm/ppc_asm.h>
16 #include <asm/asm-offsets.h>
17 #include <asm/cache.h>
19 /* Entry: r3 = crap, r4 = ptr to cputable entry
21 * Note that we can be called twice for pseudo-PVRs
23 _GLOBAL(__setup_cpu_power7)
35 _GLOBAL(__restore_cpu_power7)
48 /* Disable CPU_FTR_HVMODE_206 and exit if MSR:HV is not set */
52 ld r5,CPU_SPEC_FEATURES(r4)
53 LOAD_REG_IMMEDIATE(r6,CPU_FTR_HVMODE_206)
55 std r5,CPU_SPEC_FEATURES(r4)
61 * LPES = 0b01 (HSRR0/1 used for 0x500)
65 * Other bits untouched for now
68 ori r3,r3,(LPCR_LPES0|LPCR_LPES1)
69 xori r3,r3, LPCR_LPES0
70 ori r3,r3,(LPCR_PECE0|LPCR_PECE1|LPCR_PECE2)
72 sldi r5,r5,LPCR_DPFD_SH
75 sldi r5,r5,LPCR_DPFD_SH
85 li r7,0xc00 /* IS field = 0b11 */