You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Don't export cvt_fd & _df when CONFIG_PPC_FPU is not set powerpc/44x: icon: select SM502 and frame buffer console support powerpc/85xx: Add P1021MDS board support powerpc/85xx: Change MPC8572DS camp dtses for MSI sharing powerpc/fsl_msi: add removal path and probe failing path powerpc/fsl_msi: enable msi sharing through AMP OSes powerpc/fsl_msi: enable msi allocation in all banks powerpc/fsl_msi: fix the conflict of virt_msir's chip_data powerpc/fsl_msi: Add multiple MSI bank support powerpc/kexec: Add support for FSL-BookE powerpc/fsl-booke: Move the entry setup code into a seperate file powerpc/fsl-booke: fix the case where we are not in the first page powerpc/85xx: Enable support for ports 3 and 4 on 8548 CDS powerpc/fsl-booke: Add hibernation support for FSL BookE processors powerpc/e500mc: Implement machine check handler. powerpc/44x: Add basic ICON PPC440SPe board support powerpc/44x: Fix UART clocks on 440SPe powerpc/44x: Add reset-type to katmai.dts powerpc/44x: Adding PCI-E support for PowerPC 460SX based SOC.
This commit is contained in:
@@ -351,7 +351,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
|
||||
|
||||
config KEXEC
|
||||
bool "kexec system call (EXPERIMENTAL)"
|
||||
depends on PPC_BOOK3S && EXPERIMENTAL
|
||||
depends on (PPC_BOOK3S || (FSL_BOOKE && !SMP)) && EXPERIMENTAL
|
||||
help
|
||||
kexec is a system call that implements the ability to shutdown your
|
||||
current kernel, and to start another kernel. It is like a reboot
|
||||
|
||||
@@ -519,7 +519,7 @@ void ibm440ep_fixup_clocks(unsigned int sys_clk,
|
||||
{
|
||||
unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 0);
|
||||
|
||||
/* serial clocks beed fixup based on int/ext */
|
||||
/* serial clocks need fixup based on int/ext */
|
||||
eplike_fixup_uart_clk(0, "/plb/opb/serial@ef600300", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(1, "/plb/opb/serial@ef600400", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(2, "/plb/opb/serial@ef600500", ser_clk, plb_clk);
|
||||
@@ -532,7 +532,7 @@ void ibm440gx_fixup_clocks(unsigned int sys_clk,
|
||||
{
|
||||
unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
|
||||
|
||||
/* serial clocks beed fixup based on int/ext */
|
||||
/* serial clocks need fixup based on int/ext */
|
||||
eplike_fixup_uart_clk(0, "/plb/opb/serial@40000200", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(1, "/plb/opb/serial@40000300", ser_clk, plb_clk);
|
||||
}
|
||||
@@ -543,10 +543,10 @@ void ibm440spe_fixup_clocks(unsigned int sys_clk,
|
||||
{
|
||||
unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
|
||||
|
||||
/* serial clocks beed fixup based on int/ext */
|
||||
eplike_fixup_uart_clk(0, "/plb/opb/serial@10000200", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(1, "/plb/opb/serial@10000300", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(2, "/plb/opb/serial@10000600", ser_clk, plb_clk);
|
||||
/* serial clocks need fixup based on int/ext */
|
||||
eplike_fixup_uart_clk(0, "/plb/opb/serial@f0000200", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(1, "/plb/opb/serial@f0000300", ser_clk, plb_clk);
|
||||
eplike_fixup_uart_clk(2, "/plb/opb/serial@f0000600", ser_clk, plb_clk);
|
||||
}
|
||||
|
||||
void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
/*
|
||||
* Device Tree Source for Mosaix Technologies, Inc. ICON board
|
||||
*
|
||||
* Copyright 2010 DENX Software Engineering, Stefan Roese <sr@denx.de>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without
|
||||
* any warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
model = "mosaixtech,icon";
|
||||
compatible = "mosaixtech,icon";
|
||||
dcr-parent = <&{/cpus/cpu@0}>;
|
||||
|
||||
aliases {
|
||||
ethernet0 = &EMAC0;
|
||||
serial0 = &UART0;
|
||||
serial1 = &UART1;
|
||||
serial2 = &UART2;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
model = "PowerPC,440SPe";
|
||||
reg = <0x00000000>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
timebase-frequency = <0>; /* Filled in by U-Boot */
|
||||
i-cache-line-size = <32>;
|
||||
d-cache-line-size = <32>;
|
||||
i-cache-size = <32768>;
|
||||
d-cache-size = <32768>;
|
||||
dcr-controller;
|
||||
dcr-access-method = "native";
|
||||
reset-type = <2>; /* Use chip-reset */
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x00000000 0x0 0x00000000>; /* Filled in by U-Boot */
|
||||
};
|
||||
|
||||
UIC0: interrupt-controller0 {
|
||||
compatible = "ibm,uic-440spe","ibm,uic";
|
||||
interrupt-controller;
|
||||
cell-index = <0>;
|
||||
dcr-reg = <0x0c0 0x009>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
};
|
||||
|
||||
UIC1: interrupt-controller1 {
|
||||
compatible = "ibm,uic-440spe","ibm,uic";
|
||||
interrupt-controller;
|
||||
cell-index = <1>;
|
||||
dcr-reg = <0x0d0 0x009>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <0x1e 0x4 0x1f 0x4>; /* cascade */
|
||||
interrupt-parent = <&UIC0>;
|
||||
};
|
||||
|
||||
UIC2: interrupt-controller2 {
|
||||
compatible = "ibm,uic-440spe","ibm,uic";
|
||||
interrupt-controller;
|
||||
cell-index = <2>;
|
||||
dcr-reg = <0x0e0 0x009>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <0xa 0x4 0xb 0x4>; /* cascade */
|
||||
interrupt-parent = <&UIC0>;
|
||||
};
|
||||
|
||||
UIC3: interrupt-controller3 {
|
||||
compatible = "ibm,uic-440spe","ibm,uic";
|
||||
interrupt-controller;
|
||||
cell-index = <3>;
|
||||
dcr-reg = <0x0f0 0x009>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <0x10 0x4 0x11 0x4>; /* cascade */
|
||||
interrupt-parent = <&UIC0>;
|
||||
};
|
||||
|
||||
SDR0: sdr {
|
||||
compatible = "ibm,sdr-440spe";
|
||||
dcr-reg = <0x00e 0x002>;
|
||||
};
|
||||
|
||||
CPR0: cpr {
|
||||
compatible = "ibm,cpr-440spe";
|
||||
dcr-reg = <0x00c 0x002>;
|
||||
};
|
||||
|
||||
MQ0: mq {
|
||||
compatible = "ibm,mq-440spe";
|
||||
dcr-reg = <0x040 0x020>;
|
||||
};
|
||||
|
||||
plb {
|
||||
compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
/* addr-child addr-parent size */
|
||||
ranges = <0x4 0x00100000 0x4 0x00100000 0x00001000
|
||||
0x4 0x00200000 0x4 0x00200000 0x00000400
|
||||
0x4 0xe0000000 0x4 0xe0000000 0x20000000
|
||||
0xc 0x00000000 0xc 0x00000000 0x20000000
|
||||
0xd 0x00000000 0xd 0x00000000 0x80000000
|
||||
0xd 0x80000000 0xd 0x80000000 0x80000000
|
||||
0xe 0x00000000 0xe 0x00000000 0x80000000
|
||||
0xe 0x80000000 0xe 0x80000000 0x80000000
|
||||
0xf 0x00000000 0xf 0x00000000 0x80000000
|
||||
0xf 0x80000000 0xf 0x80000000 0x80000000>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
|
||||
SDRAM0: sdram {
|
||||
compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
|
||||
dcr-reg = <0x010 0x002>;
|
||||
};
|
||||
|
||||
MAL0: mcmal {
|
||||
compatible = "ibm,mcmal-440spe", "ibm,mcmal2";
|
||||
dcr-reg = <0x180 0x062>;
|
||||
num-tx-chans = <2>;
|
||||
num-rx-chans = <1>;
|
||||
interrupt-parent = <&MAL0>;
|
||||
interrupts = <0x0 0x1 0x2 0x3 0x4>;
|
||||
#interrupt-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
interrupt-map = </*TXEOB*/ 0x0 &UIC1 0x6 0x4
|
||||
/*RXEOB*/ 0x1 &UIC1 0x7 0x4
|
||||
/*SERR*/ 0x2 &UIC1 0x1 0x4
|
||||
/*TXDE*/ 0x3 &UIC1 0x2 0x4
|
||||
/*RXDE*/ 0x4 &UIC1 0x3 0x4>;
|
||||
};
|
||||
|
||||
POB0: opb {
|
||||
compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0xe0000000 0x00000004 0xe0000000 0x20000000>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
|
||||
EBC0: ebc {
|
||||
compatible = "ibm,ebc-440spe", "ibm,ebc-440gp", "ibm,ebc";
|
||||
dcr-reg = <0x012 0x002>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
/* ranges property is supplied by U-Boot */
|
||||
interrupts = <0x5 0x1>;
|
||||
interrupt-parent = <&UIC1>;
|
||||
|
||||
nor_flash@0,0 {
|
||||
compatible = "cfi-flash";
|
||||
bank-width = <2>;
|
||||
reg = <0x00000000 0x00000000 0x01000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x00000000 0x001e0000>;
|
||||
};
|
||||
partition@1e0000 {
|
||||
label = "dtb";
|
||||
reg = <0x001e0000 0x00020000>;
|
||||
};
|
||||
partition@200000 {
|
||||
label = "root";
|
||||
reg = <0x00200000 0x00200000>;
|
||||
};
|
||||
partition@400000 {
|
||||
label = "user";
|
||||
reg = <0x00400000 0x00b60000>;
|
||||
};
|
||||
partition@f60000 {
|
||||
label = "env";
|
||||
reg = <0x00f60000 0x00040000>;
|
||||
};
|
||||
partition@fa0000 {
|
||||
label = "u-boot";
|
||||
reg = <0x00fa0000 0x00060000>;
|
||||
};
|
||||
};
|
||||
|
||||
SysACE_CompactFlash: sysace@1,0 {
|
||||
compatible = "xlnx,sysace";
|
||||
interrupt-parent = <&UIC2>;
|
||||
interrupts = <24 0x4>;
|
||||
reg = <0x00000001 0x00000000 0x10000>;
|
||||
};
|
||||
};
|
||||
|
||||
UART0: serial@f0000200 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0xf0000200 0x00000008>;
|
||||
virtual-reg = <0xa0000200>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
current-speed = <115200>;
|
||||
interrupt-parent = <&UIC0>;
|
||||
interrupts = <0x0 0x4>;
|
||||
};
|
||||
|
||||
UART1: serial@f0000300 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0xf0000300 0x00000008>;
|
||||
virtual-reg = <0xa0000300>;
|
||||
clock-frequency = <0>;
|
||||
current-speed = <0>;
|
||||
interrupt-parent = <&UIC0>;
|
||||
interrupts = <0x1 0x4>;
|
||||
};
|
||||
|
||||
|
||||
UART2: serial@f0000600 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0xf0000600 0x00000008>;
|
||||
virtual-reg = <0xa0000600>;
|
||||
clock-frequency = <0>;
|
||||
current-speed = <0>;
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <0x5 0x4>;
|
||||
};
|
||||
|
||||
IIC0: i2c@f0000400 {
|
||||
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
||||
reg = <0xf0000400 0x00000014>;
|
||||
interrupt-parent = <&UIC0>;
|
||||
interrupts = <0x2 0x4>;
|
||||
};
|
||||
|
||||
IIC1: i2c@f0000500 {
|
||||
compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
|
||||
reg = <0xf0000500 0x00000014>;
|
||||
interrupt-parent = <&UIC0>;
|
||||
interrupts = <0x3 0x4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@68 {
|
||||
compatible = "stm,m41t00";
|
||||
reg = <0x68>;
|
||||
};
|
||||
};
|
||||
|
||||
EMAC0: ethernet@f0000800 {
|
||||
linux,network-index = <0x0>;
|
||||
device_type = "network";
|
||||
compatible = "ibm,emac-440spe", "ibm,emac4";
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <0x1c 0x4 0x1d 0x4>;
|
||||
reg = <0xf0000800 0x00000074>;
|
||||
local-mac-address = [000000000000];
|
||||
mal-device = <&MAL0>;
|
||||
mal-tx-channel = <0>;
|
||||
mal-rx-channel = <0>;
|
||||
cell-index = <0>;
|
||||
max-frame-size = <9000>;
|
||||
rx-fifo-size = <4096>;
|
||||
tx-fifo-size = <2048>;
|
||||
phy-mode = "gmii";
|
||||
phy-map = <0x00000000>;
|
||||
has-inverted-stacr-oc;
|
||||
has-new-stacr-staopc;
|
||||
};
|
||||
};
|
||||
|
||||
PCIX0: pci@c0ec00000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pcix-440spe", "ibm,plb-pcix";
|
||||
primary;
|
||||
large-inbound-windows;
|
||||
enable-msi-hole;
|
||||
reg = <0x0000000c 0x0ec00000 0x00000008 /* Config space access */
|
||||
0x00000000 0x00000000 0x00000000 /* no IACK cycles */
|
||||
0x0000000c 0x0ed00000 0x00000004 /* Special cycles */
|
||||
0x0000000c 0x0ec80000 0x00000100 /* Internal registers */
|
||||
0x0000000c 0x0ec80100 0x000000fc>; /* Internal messaging registers */
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000d 0x80000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000c 0x08000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 4GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
|
||||
|
||||
/* This drives busses 0 to 0xf */
|
||||
bus-range = <0x0 0xf>;
|
||||
|
||||
/* PCI-X interrupt (SM502) is routed to extIRQ10 (UIC1, 19) */
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x0>;
|
||||
interrupt-map = <0x0 0x0 0x0 0x0 &UIC1 19 0x8>;
|
||||
};
|
||||
|
||||
PCIE0: pciex@d00000000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
|
||||
primary;
|
||||
port = <0x0>; /* port number */
|
||||
reg = <0x0000000d 0x00000000 0x20000000 /* Config space access */
|
||||
0x0000000c 0x10000000 0x00001000>; /* Registers */
|
||||
dcr-reg = <0x100 0x020>;
|
||||
sdr-base = <0x300>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 4GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
|
||||
|
||||
/* This drives busses 0x10 to 0x1f */
|
||||
bus-range = <0x10 0x1f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
* to avoid putting a node for it in the tree, so the numbers
|
||||
* below are basically de-swizzled numbers.
|
||||
* The real slot is on idsel 0, so the swizzling is 1:1
|
||||
*/
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
interrupt-map = <
|
||||
0x0 0x0 0x0 0x1 &UIC3 0x0 0x4 /* swizzled int A */
|
||||
0x0 0x0 0x0 0x2 &UIC3 0x1 0x4 /* swizzled int B */
|
||||
0x0 0x0 0x0 0x3 &UIC3 0x2 0x4 /* swizzled int C */
|
||||
0x0 0x0 0x0 0x4 &UIC3 0x3 0x4 /* swizzled int D */>;
|
||||
};
|
||||
|
||||
PCIE1: pciex@d20000000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
|
||||
primary;
|
||||
port = <0x1>; /* port number */
|
||||
reg = <0x0000000d 0x20000000 0x20000000 /* Config space access */
|
||||
0x0000000c 0x10001000 0x00001000>; /* Registers */
|
||||
dcr-reg = <0x120 0x020>;
|
||||
sdr-base = <0x340>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 4GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x1 0x00000000>;
|
||||
|
||||
/* This drives busses 0x20 to 0x2f */
|
||||
bus-range = <0x20 0x2f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
* to avoid putting a node for it in the tree, so the numbers
|
||||
* below are basically de-swizzled numbers.
|
||||
* The real slot is on idsel 0, so the swizzling is 1:1
|
||||
*/
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
interrupt-map = <
|
||||
0x0 0x0 0x0 0x1 &UIC3 0x4 0x4 /* swizzled int A */
|
||||
0x0 0x0 0x0 0x2 &UIC3 0x5 0x4 /* swizzled int B */
|
||||
0x0 0x0 0x0 0x3 &UIC3 0x6 0x4 /* swizzled int C */
|
||||
0x0 0x0 0x0 0x4 &UIC3 0x7 0x4 /* swizzled int D */>;
|
||||
};
|
||||
|
||||
I2O: i2o@400100000 {
|
||||
compatible = "ibm,i2o-440spe";
|
||||
reg = <0x00000004 0x00100000 0x100>;
|
||||
dcr-reg = <0x060 0x020>;
|
||||
};
|
||||
|
||||
DMA0: dma0@400100100 {
|
||||
compatible = "ibm,dma-440spe";
|
||||
cell-index = <0>;
|
||||
reg = <0x00000004 0x00100100 0x100>;
|
||||
dcr-reg = <0x060 0x020>;
|
||||
interrupt-parent = <&DMA0>;
|
||||
interrupts = <0 1>;
|
||||
#interrupt-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
interrupt-map = <
|
||||
0 &UIC0 0x14 4
|
||||
1 &UIC1 0x16 4>;
|
||||
};
|
||||
|
||||
DMA1: dma1@400100200 {
|
||||
compatible = "ibm,dma-440spe";
|
||||
cell-index = <1>;
|
||||
reg = <0x00000004 0x00100200 0x100>;
|
||||
dcr-reg = <0x060 0x020>;
|
||||
interrupt-parent = <&DMA1>;
|
||||
interrupts = <0 1>;
|
||||
#interrupt-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
interrupt-map = <
|
||||
0 &UIC0 0x16 4
|
||||
1 &UIC1 0x16 4>;
|
||||
};
|
||||
|
||||
xor-accel@400200000 {
|
||||
compatible = "amcc,xor-accelerator";
|
||||
reg = <0x00000004 0x00200000 0x400>;
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <0x1f 4>;
|
||||
};
|
||||
};
|
||||
|
||||
chosen {
|
||||
linux,stdout-path = "/plb/opb/serial@f0000200";
|
||||
};
|
||||
};
|
||||
@@ -44,6 +44,7 @@
|
||||
d-cache-size = <32768>;
|
||||
dcr-controller;
|
||||
dcr-access-method = "native";
|
||||
reset-type = <2>; /* Use chip-reset */
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
aliases {
|
||||
ethernet0 = &enet0;
|
||||
ethernet1 = &enet1;
|
||||
/*
|
||||
ethernet2 = &enet2;
|
||||
ethernet3 = &enet3;
|
||||
*/
|
||||
serial0 = &serial0;
|
||||
serial1 = &serial1;
|
||||
pci0 = &pci0;
|
||||
@@ -254,7 +252,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* eTSEC 3/4 are currently broken
|
||||
enet2: ethernet@26000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -310,7 +307,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
serial0: serial@4500 {
|
||||
cell-index = <0>;
|
||||
|
||||
@@ -215,6 +215,18 @@
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
msi@41600 {
|
||||
compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
|
||||
reg = <0x41600 0x80>;
|
||||
msi-available-ranges = <0 0x80>;
|
||||
interrupts = <
|
||||
0xe0 0
|
||||
0xe1 0
|
||||
0xe2 0
|
||||
0xe3 0>;
|
||||
interrupt-parent = <&mpic>;
|
||||
};
|
||||
|
||||
global-utilities@e0000 { //global utilities block
|
||||
compatible = "fsl,mpc8572-guts";
|
||||
reg = <0xe0000 0x1000>;
|
||||
@@ -243,8 +255,7 @@
|
||||
protected-sources = <
|
||||
31 32 33 37 38 39 /* enet2 enet3 */
|
||||
76 77 78 79 26 42 /* dma2 pci2 serial*/
|
||||
0xe0 0xe1 0xe2 0xe3 /* msi */
|
||||
0xe4 0xe5 0xe6 0xe7
|
||||
0xe4 0xe5 0xe6 0xe7 /* msi */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -154,12 +154,8 @@
|
||||
msi@41600 {
|
||||
compatible = "fsl,mpc8572-msi", "fsl,mpic-msi";
|
||||
reg = <0x41600 0x80>;
|
||||
msi-available-ranges = <0 0x100>;
|
||||
msi-available-ranges = <0x80 0x80>;
|
||||
interrupts = <
|
||||
0xe0 0
|
||||
0xe1 0
|
||||
0xe2 0
|
||||
0xe3 0
|
||||
0xe4 0
|
||||
0xe5 0
|
||||
0xe6 0
|
||||
@@ -190,6 +186,7 @@
|
||||
0x1 0x2 0x3 0x4 /* pci slot */
|
||||
0x9 0xa 0xb 0xc /* usb */
|
||||
0x6 0x7 0xe 0x5 /* Audio elgacy SATA */
|
||||
0xe0 0xe1 0xe2 0xe3 /* msi */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -234,10 +234,132 @@
|
||||
has-inverted-stacr-oc;
|
||||
has-new-stacr-staopc;
|
||||
};
|
||||
};
|
||||
PCIE0: pciex@d00000000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pciex-460sx", "ibm,plb-pciex";
|
||||
primary;
|
||||
port = <0x0>; /* port number */
|
||||
reg = <0x0000000d 0x00000000 0x20000000 /* Config space access */
|
||||
0x0000000c 0x10000000 0x00001000>; /* Registers */
|
||||
dcr-reg = <0x100 0x020>;
|
||||
sdr-base = <0x300>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>;
|
||||
|
||||
/* This drives busses 10 to 0x1f */
|
||||
bus-range = <0x10 0x1f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
* to avoid putting a node for it in the tree, so the numbers
|
||||
* below are basically de-swizzled numbers.
|
||||
* The real slot is on idsel 0, so the swizzling is 1:1
|
||||
*/
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
interrupt-map = <
|
||||
0x0 0x0 0x0 0x1 &UIC3 0x0 0x4 /* swizzled int A */
|
||||
0x0 0x0 0x0 0x2 &UIC3 0x1 0x4 /* swizzled int B */
|
||||
0x0 0x0 0x0 0x3 &UIC3 0x2 0x4 /* swizzled int C */
|
||||
0x0 0x0 0x0 0x4 &UIC3 0x3 0x4 /* swizzled int D */>;
|
||||
};
|
||||
|
||||
PCIE1: pciex@d20000000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pciex-460sx", "ibm,plb-pciex";
|
||||
primary;
|
||||
port = <0x1>; /* port number */
|
||||
reg = <0x0000000d 0x20000000 0x20000000 /* Config space access */
|
||||
0x0000000c 0x10001000 0x00001000>; /* Registers */
|
||||
dcr-reg = <0x120 0x020>;
|
||||
sdr-base = <0x340>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x80000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80010000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>;
|
||||
|
||||
/* This drives busses 10 to 0x1f */
|
||||
bus-range = <0x20 0x2f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
* to avoid putting a node for it in the tree, so the numbers
|
||||
* below are basically de-swizzled numbers.
|
||||
* The real slot is on idsel 0, so the swizzling is 1:1
|
||||
*/
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
interrupt-map = <
|
||||
0x0 0x0 0x0 0x1 &UIC3 0x4 0x4 /* swizzled int A */
|
||||
0x0 0x0 0x0 0x2 &UIC3 0x5 0x4 /* swizzled int B */
|
||||
0x0 0x0 0x0 0x3 &UIC3 0x6 0x4 /* swizzled int C */
|
||||
0x0 0x0 0x0 0x4 &UIC3 0x7 0x4 /* swizzled int D */>;
|
||||
};
|
||||
|
||||
PCIE2: pciex@d40000000 {
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
compatible = "ibm,plb-pciex-460sx", "ibm,plb-pciex";
|
||||
primary;
|
||||
port = <0x2>; /* port number */
|
||||
reg = <0x0000000d 0x40000000 0x20000000 /* Config space access */
|
||||
0x0000000c 0x10002000 0x00001000>; /* Registers */
|
||||
dcr-reg = <0x140 0x020>;
|
||||
sdr-base = <0x370>;
|
||||
|
||||
/* Outbound ranges, one memory and one IO,
|
||||
* later cannot be changed
|
||||
*/
|
||||
ranges = <0x02000000 0x00000000 0x80000000 0x0000000f 0x00000000 0x00000000 0x80000000
|
||||
0x01000000 0x00000000 0x00000000 0x0000000f 0x80020000 0x00000000 0x00010000>;
|
||||
|
||||
/* Inbound 2GB range starting at 0 */
|
||||
dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>;
|
||||
|
||||
/* This drives busses 10 to 0x1f */
|
||||
bus-range = <0x30 0x3f>;
|
||||
|
||||
/* Legacy interrupts (note the weird polarity, the bridge seems
|
||||
* to invert PCIe legacy interrupts).
|
||||
* We are de-swizzling here because the numbers are actually for
|
||||
* port of the root complex virtual P2P bridge. But I want
|
||||
* to avoid putting a node for it in the tree, so the numbers
|
||||
* below are basically de-swizzled numbers.
|
||||
* The real slot is on idsel 0, so the swizzling is 1:1
|
||||
*/
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
interrupt-map = <
|
||||
0x0 0x0 0x0 0x1 &UIC3 0x8 0x4 /* swizzled int A */
|
||||
0x0 0x0 0x0 0x2 &UIC3 0x9 0x4 /* swizzled int B */
|
||||
0x0 0x0 0x0 0x3 &UIC3 0xa 0x4 /* swizzled int C */
|
||||
0x0 0x0 0x0 0x4 &UIC3 0xb 0x4 /* swizzled int D */>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
chosen {
|
||||
linux,stdout-path = "/plb/opb/serial@ef600200";
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,7 @@ struct pt_regs;
|
||||
extern int machine_check_generic(struct pt_regs *regs);
|
||||
extern int machine_check_4xx(struct pt_regs *regs);
|
||||
extern int machine_check_440A(struct pt_regs *regs);
|
||||
extern int machine_check_e500mc(struct pt_regs *regs);
|
||||
extern int machine_check_e500(struct pt_regs *regs);
|
||||
extern int machine_check_e200(struct pt_regs *regs);
|
||||
extern int machine_check_47x(struct pt_regs *regs);
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
#define _ASM_POWERPC_KEXEC_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifdef CONFIG_FSL_BOOKE
|
||||
|
||||
/*
|
||||
* On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
|
||||
* and therefore we can only deal with memory within this range
|
||||
*/
|
||||
#define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)
|
||||
#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)
|
||||
#define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Maximum page that is mapped directly into kernel memory.
|
||||
* XXX: Since we copy virt we can use any page we allocate
|
||||
@@ -21,6 +33,7 @@
|
||||
/* TASK_SIZE, probably left over from use_mm ?? */
|
||||
#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define KEXEC_CONTROL_PAGE_SIZE 4096
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
* are not true Book E PowerPCs, they borrowed a number of features
|
||||
* before Book E was finalized, and are included here as well. Unfortunatly,
|
||||
* they sometimes used different locations than true Book E CPUs did.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* Copyright 2009-2010 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASM_POWERPC_REG_BOOKE_H__
|
||||
@@ -88,6 +94,7 @@
|
||||
#define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */
|
||||
#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */
|
||||
#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */
|
||||
#define SPRN_MCARU 0x239 /* Machine Check Address Register Upper */
|
||||
#define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */
|
||||
#define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */
|
||||
#define SPRN_MCSR 0x23C /* Machine Check Status Register */
|
||||
@@ -196,8 +203,11 @@
|
||||
#define PPC47x_MCSR_IPR 0x00400000 /* Imprecise Machine Check Exception */
|
||||
|
||||
#ifdef CONFIG_E500
|
||||
/* All e500 */
|
||||
#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
|
||||
#define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */
|
||||
|
||||
/* e500v1/v2 */
|
||||
#define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */
|
||||
#define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */
|
||||
#define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */
|
||||
@@ -209,12 +219,20 @@
|
||||
#define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */
|
||||
#define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */
|
||||
|
||||
/* e500 parts may set unused bits in MCSR; mask these off */
|
||||
#define MCSR_MASK (MCSR_MCP | MCSR_ICPERR | MCSR_DCP_PERR | \
|
||||
MCSR_DCPERR | MCSR_BUS_IAERR | MCSR_BUS_RAERR | \
|
||||
MCSR_BUS_WAERR | MCSR_BUS_IBERR | MCSR_BUS_RBERR | \
|
||||
MCSR_BUS_WBERR | MCSR_BUS_IPERR | MCSR_BUS_RPERR)
|
||||
/* e500mc */
|
||||
#define MCSR_DCPERR_MC 0x20000000UL /* D-Cache Parity Error */
|
||||
#define MCSR_L2MMU_MHIT 0x04000000UL /* Hit on multiple TLB entries */
|
||||
#define MCSR_NMI 0x00100000UL /* Non-Maskable Interrupt */
|
||||
#define MCSR_MAV 0x00080000UL /* MCAR address valid */
|
||||
#define MCSR_MEA 0x00040000UL /* MCAR is effective address */
|
||||
#define MCSR_IF 0x00010000UL /* Instruction Fetch */
|
||||
#define MCSR_LD 0x00008000UL /* Load */
|
||||
#define MCSR_ST 0x00004000UL /* Store */
|
||||
#define MCSR_LDG 0x00002000UL /* Guarded Load */
|
||||
#define MCSR_TLBSYNC 0x00000002UL /* Multiple tlbsyncs detected */
|
||||
#define MCSR_BSL2_ERR 0x00000001UL /* Backside L2 cache error */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_E200
|
||||
#define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */
|
||||
#define MCSR_CP_PERR 0x20000000UL /* Cache Push Parity Error */
|
||||
@@ -225,11 +243,6 @@
|
||||
#define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */
|
||||
#define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered
|
||||
store or cache line push */
|
||||
|
||||
/* e200 parts may set unused bits in MCSR; mask these off */
|
||||
#define MCSR_MASK (MCSR_MCP | MCSR_CP_PERR | MCSR_CPERR | \
|
||||
MCSR_EXCP_ERR | MCSR_BUS_IRERR | MCSR_BUS_DRERR | \
|
||||
MCSR_BUS_WRERR)
|
||||
#endif
|
||||
|
||||
/* Bit definitions for the DBSR. */
|
||||
|
||||
@@ -57,8 +57,12 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
|
||||
obj-$(CONFIG_E500) += idle_e500.o
|
||||
obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
|
||||
obj-$(CONFIG_TAU) += tau_6xx.o
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o \
|
||||
swsusp_$(CONFIG_WORD_SIZE).o
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
|
||||
ifeq ($(CONFIG_FSL_BOOKE),y)
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp_booke.o
|
||||
else
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp_$(CONFIG_WORD_SIZE).o
|
||||
endif
|
||||
obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o
|
||||
obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o
|
||||
obj-$(CONFIG_44x) += cpu_setup_44x.o
|
||||
|
||||
@@ -1840,7 +1840,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
||||
.oprofile_cpu_type = "ppc/e500mc",
|
||||
.oprofile_type = PPC_OPROFILE_FSL_EMB,
|
||||
.cpu_setup = __setup_cpu_e500mc,
|
||||
.machine_check = machine_check_e500,
|
||||
.machine_check = machine_check_e500mc,
|
||||
.platform = "ppce500mc",
|
||||
},
|
||||
{ /* default match */
|
||||
|
||||
@@ -163,6 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu)
|
||||
}
|
||||
|
||||
/* wait for all the CPUs to hit real mode but timeout if they don't come in */
|
||||
#ifdef CONFIG_PPC_STD_MMU_64
|
||||
static void crash_kexec_wait_realmode(int cpu)
|
||||
{
|
||||
unsigned int msecs;
|
||||
@@ -187,6 +188,7 @@ static void crash_kexec_wait_realmode(int cpu)
|
||||
}
|
||||
mb();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function will be called by secondary cpus or by kexec cpu
|
||||
@@ -445,7 +447,9 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
|
||||
crash_kexec_prepare_cpus(crashing_cpu);
|
||||
cpu_set(crashing_cpu, cpus_in_crash);
|
||||
crash_kexec_stop_spus();
|
||||
#ifdef CONFIG_PPC_STD_MMU_64
|
||||
crash_kexec_wait_realmode(crashing_cpu);
|
||||
#endif
|
||||
if (ppc_md.kexec_cpu_down)
|
||||
ppc_md.kexec_cpu_down(1, 0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
|
||||
/* 1. Find the index of the entry we're executing in */
|
||||
bl invstr /* Find our address */
|
||||
invstr: mflr r6 /* Make it accessible */
|
||||
mfmsr r7
|
||||
rlwinm r4,r7,27,31,31 /* extract MSR[IS] */
|
||||
mfspr r7, SPRN_PID0
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
|
||||
mfspr r7,SPRN_MAS1
|
||||
andis. r7,r7,MAS1_VALID@h
|
||||
bne match_TLB
|
||||
|
||||
mfspr r7,SPRN_MMUCFG
|
||||
rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
|
||||
cmpwi r7,3
|
||||
bne match_TLB /* skip if NPIDS != 3 */
|
||||
|
||||
mfspr r7,SPRN_PID1
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* search MSR[IS], SPID=PID1 */
|
||||
mfspr r7,SPRN_MAS1
|
||||
andis. r7,r7,MAS1_VALID@h
|
||||
bne match_TLB
|
||||
mfspr r7, SPRN_PID2
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* Fall through, we had to match */
|
||||
|
||||
match_TLB:
|
||||
mfspr r7,SPRN_MAS0
|
||||
rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */
|
||||
|
||||
mfspr r7,SPRN_MAS1 /* Insure IPROT set */
|
||||
oris r7,r7,MAS1_IPROT@h
|
||||
mtspr SPRN_MAS1,r7
|
||||
tlbwe
|
||||
|
||||
/* 2. Invalidate all entries except the entry we're executing in */
|
||||
mfspr r9,SPRN_TLB1CFG
|
||||
andi. r9,r9,0xfff
|
||||
li r6,0 /* Set Entry counter to 0 */
|
||||
1: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r6,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r6) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r7,SPRN_MAS1
|
||||
rlwinm r7,r7,0,2,31 /* Clear MAS1 Valid and IPROT */
|
||||
cmpw r3,r6
|
||||
beq skpinv /* Dont update the current execution TLB */
|
||||
mtspr SPRN_MAS1,r7
|
||||
tlbwe
|
||||
isync
|
||||
skpinv: addi r6,r6,1 /* Increment */
|
||||
cmpw r6,r9 /* Are we done? */
|
||||
bne 1b /* If not, repeat */
|
||||
|
||||
/* Invalidate TLB0 */
|
||||
li r6,0x04
|
||||
tlbivax 0,r6
|
||||
TLBSYNC
|
||||
/* Invalidate TLB1 */
|
||||
li r6,0x0c
|
||||
tlbivax 0,r6
|
||||
TLBSYNC
|
||||
|
||||
/* 3. Setup a temp mapping and jump to it */
|
||||
andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */
|
||||
addi r5, r5, 0x1
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
|
||||
/* grab and fixup the RPN */
|
||||
mfspr r6,SPRN_MAS1 /* extract MAS1[SIZE] */
|
||||
rlwinm r6,r6,25,27,31
|
||||
li r8,-1
|
||||
addi r6,r6,10
|
||||
slw r6,r8,r6 /* convert to mask */
|
||||
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r7
|
||||
|
||||
mfspr r8,SPRN_MAS3
|
||||
#ifdef CONFIG_PHYS_64BIT
|
||||
mfspr r23,SPRN_MAS7
|
||||
#endif
|
||||
and r8,r6,r8
|
||||
subfic r9,r6,-4096
|
||||
and r9,r9,r7
|
||||
|
||||
or r25,r8,r9
|
||||
ori r8,r25,(MAS3_SX|MAS3_SW|MAS3_SR)
|
||||
|
||||
/* Just modify the entry ID and EPN for the temp mapping */
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
xori r6,r4,1 /* Setup TMP mapping in the other Address space */
|
||||
slwi r6,r6,12
|
||||
oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h
|
||||
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_4K))@l
|
||||
mtspr SPRN_MAS1,r6
|
||||
mfspr r6,SPRN_MAS2
|
||||
li r7,0 /* temp EPN = 0 */
|
||||
rlwimi r7,r6,0,20,31
|
||||
mtspr SPRN_MAS2,r7
|
||||
mtspr SPRN_MAS3,r8
|
||||
tlbwe
|
||||
|
||||
xori r6,r4,1
|
||||
slwi r6,r6,5 /* setup new context with other address space */
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r9
|
||||
rlwimi r7,r9,0,20,31
|
||||
addi r7,r7,(2f - 1b)
|
||||
mtspr SPRN_SRR0,r7
|
||||
mtspr SPRN_SRR1,r6
|
||||
rfi
|
||||
2:
|
||||
/* 4. Clear out PIDs & Search info */
|
||||
li r6,0
|
||||
mtspr SPRN_MAS6,r6
|
||||
mtspr SPRN_PID0,r6
|
||||
|
||||
mfspr r7,SPRN_MMUCFG
|
||||
rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
|
||||
cmpwi r7,3
|
||||
bne 2f /* skip if NPIDS != 3 */
|
||||
|
||||
mtspr SPRN_PID1,r6
|
||||
mtspr SPRN_PID2,r6
|
||||
|
||||
/* 5. Invalidate mapping we started in */
|
||||
2:
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r6,SPRN_MAS1
|
||||
rlwinm r6,r6,0,2,0 /* clear IPROT */
|
||||
mtspr SPRN_MAS1,r6
|
||||
tlbwe
|
||||
/* Invalidate TLB1 */
|
||||
li r9,0x0c
|
||||
tlbivax 0,r9
|
||||
TLBSYNC
|
||||
|
||||
/* The mapping only needs to be cache-coherent on SMP */
|
||||
#ifdef CONFIG_SMP
|
||||
#define M_IF_SMP MAS2_M
|
||||
#else
|
||||
#define M_IF_SMP 0
|
||||
#endif
|
||||
|
||||
#if defined(ENTRY_MAPPING_BOOT_SETUP)
|
||||
|
||||
/* 6. Setup KERNELBASE mapping in TLB1[0] */
|
||||
lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
|
||||
mtspr SPRN_MAS0,r6
|
||||
lis r6,(MAS1_VALID|MAS1_IPROT)@h
|
||||
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
|
||||
mtspr SPRN_MAS1,r6
|
||||
lis r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@h
|
||||
ori r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@l
|
||||
mtspr SPRN_MAS2,r6
|
||||
mtspr SPRN_MAS3,r8
|
||||
tlbwe
|
||||
|
||||
/* 7. Jump to KERNELBASE mapping */
|
||||
lis r6,(KERNELBASE & ~0xfff)@h
|
||||
ori r6,r6,(KERNELBASE & ~0xfff)@l
|
||||
|
||||
#elif defined(ENTRY_MAPPING_KEXEC_SETUP)
|
||||
/*
|
||||
* 6. Setup a 1:1 mapping in TLB1. Esel 0 is unsued, 1 or 2 contains the tmp
|
||||
* mapping so we start at 3. We setup 8 mappings, each 256MiB in size. This
|
||||
* will cover the first 2GiB of memory.
|
||||
*/
|
||||
|
||||
lis r10, (MAS1_VALID|MAS1_IPROT)@h
|
||||
ori r10,r10, (MAS1_TSIZE(BOOK3E_PAGESZ_256M))@l
|
||||
li r11, 0
|
||||
li r0, 8
|
||||
mtctr r0
|
||||
|
||||
next_tlb_setup:
|
||||
addi r0, r11, 3
|
||||
rlwinm r0, r0, 16, 4, 15 // Compute esel
|
||||
rlwinm r9, r11, 28, 0, 3 // Compute [ER]PN
|
||||
oris r0, r0, (MAS0_TLBSEL(1))@h
|
||||
mtspr SPRN_MAS0,r0
|
||||
mtspr SPRN_MAS1,r10
|
||||
mtspr SPRN_MAS2,r9
|
||||
ori r9, r9, (MAS3_SX|MAS3_SW|MAS3_SR)
|
||||
mtspr SPRN_MAS3,r9
|
||||
tlbwe
|
||||
addi r11, r11, 1
|
||||
bdnz+ next_tlb_setup
|
||||
|
||||
/* 7. Jump to our 1:1 mapping */
|
||||
li r6, 0
|
||||
|
||||
#else
|
||||
#error You need to specify the mapping or not use this at all.
|
||||
#endif
|
||||
|
||||
lis r7,MSR_KERNEL@h
|
||||
ori r7,r7,MSR_KERNEL@l
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r9
|
||||
rlwimi r6,r9,0,20,31
|
||||
addi r6,r6,(2f - 1b)
|
||||
add r6, r6, r25
|
||||
mtspr SPRN_SRR0,r6
|
||||
mtspr SPRN_SRR1,r7
|
||||
rfi /* start execution out of TLB1[0] entry */
|
||||
|
||||
/* 8. Clear out the temp mapping */
|
||||
2: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r8,SPRN_MAS1
|
||||
rlwinm r8,r8,0,2,0 /* clear IPROT */
|
||||
mtspr SPRN_MAS1,r8
|
||||
tlbwe
|
||||
/* Invalidate TLB1 */
|
||||
li r9,0x0c
|
||||
tlbivax 0,r9
|
||||
TLBSYNC
|
||||
@@ -94,204 +94,10 @@ _ENTRY(_start);
|
||||
*/
|
||||
|
||||
_ENTRY(__early_start)
|
||||
/* 1. Find the index of the entry we're executing in */
|
||||
bl invstr /* Find our address */
|
||||
invstr: mflr r6 /* Make it accessible */
|
||||
mfmsr r7
|
||||
rlwinm r4,r7,27,31,31 /* extract MSR[IS] */
|
||||
mfspr r7, SPRN_PID0
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
|
||||
mfspr r7,SPRN_MAS1
|
||||
andis. r7,r7,MAS1_VALID@h
|
||||
bne match_TLB
|
||||
|
||||
mfspr r7,SPRN_MMUCFG
|
||||
rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
|
||||
cmpwi r7,3
|
||||
bne match_TLB /* skip if NPIDS != 3 */
|
||||
|
||||
mfspr r7,SPRN_PID1
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* search MSR[IS], SPID=PID1 */
|
||||
mfspr r7,SPRN_MAS1
|
||||
andis. r7,r7,MAS1_VALID@h
|
||||
bne match_TLB
|
||||
mfspr r7, SPRN_PID2
|
||||
slwi r7,r7,16
|
||||
or r7,r7,r4
|
||||
mtspr SPRN_MAS6,r7
|
||||
tlbsx 0,r6 /* Fall through, we had to match */
|
||||
|
||||
match_TLB:
|
||||
mfspr r7,SPRN_MAS0
|
||||
rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */
|
||||
|
||||
mfspr r7,SPRN_MAS1 /* Insure IPROT set */
|
||||
oris r7,r7,MAS1_IPROT@h
|
||||
mtspr SPRN_MAS1,r7
|
||||
tlbwe
|
||||
|
||||
/* 2. Invalidate all entries except the entry we're executing in */
|
||||
mfspr r9,SPRN_TLB1CFG
|
||||
andi. r9,r9,0xfff
|
||||
li r6,0 /* Set Entry counter to 0 */
|
||||
1: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r6,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r6) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r7,SPRN_MAS1
|
||||
rlwinm r7,r7,0,2,31 /* Clear MAS1 Valid and IPROT */
|
||||
cmpw r3,r6
|
||||
beq skpinv /* Dont update the current execution TLB */
|
||||
mtspr SPRN_MAS1,r7
|
||||
tlbwe
|
||||
isync
|
||||
skpinv: addi r6,r6,1 /* Increment */
|
||||
cmpw r6,r9 /* Are we done? */
|
||||
bne 1b /* If not, repeat */
|
||||
|
||||
/* Invalidate TLB0 */
|
||||
li r6,0x04
|
||||
tlbivax 0,r6
|
||||
TLBSYNC
|
||||
/* Invalidate TLB1 */
|
||||
li r6,0x0c
|
||||
tlbivax 0,r6
|
||||
TLBSYNC
|
||||
|
||||
/* 3. Setup a temp mapping and jump to it */
|
||||
andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */
|
||||
addi r5, r5, 0x1
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
|
||||
/* grab and fixup the RPN */
|
||||
mfspr r6,SPRN_MAS1 /* extract MAS1[SIZE] */
|
||||
rlwinm r6,r6,25,27,31
|
||||
li r8,-1
|
||||
addi r6,r6,10
|
||||
slw r6,r8,r6 /* convert to mask */
|
||||
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r7
|
||||
|
||||
mfspr r8,SPRN_MAS3
|
||||
#ifdef CONFIG_PHYS_64BIT
|
||||
mfspr r23,SPRN_MAS7
|
||||
#endif
|
||||
and r8,r6,r8
|
||||
subfic r9,r6,-4096
|
||||
and r9,r9,r7
|
||||
|
||||
or r25,r8,r9
|
||||
ori r8,r25,(MAS3_SX|MAS3_SW|MAS3_SR)
|
||||
|
||||
/* Just modify the entry ID and EPN for the temp mapping */
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
xori r6,r4,1 /* Setup TMP mapping in the other Address space */
|
||||
slwi r6,r6,12
|
||||
oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h
|
||||
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_4K))@l
|
||||
mtspr SPRN_MAS1,r6
|
||||
mfspr r6,SPRN_MAS2
|
||||
li r7,0 /* temp EPN = 0 */
|
||||
rlwimi r7,r6,0,20,31
|
||||
mtspr SPRN_MAS2,r7
|
||||
mtspr SPRN_MAS3,r8
|
||||
tlbwe
|
||||
|
||||
xori r6,r4,1
|
||||
slwi r6,r6,5 /* setup new context with other address space */
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r9
|
||||
rlwimi r7,r9,0,20,31
|
||||
addi r7,r7,(2f - 1b)
|
||||
mtspr SPRN_SRR0,r7
|
||||
mtspr SPRN_SRR1,r6
|
||||
rfi
|
||||
2:
|
||||
/* 4. Clear out PIDs & Search info */
|
||||
li r6,0
|
||||
mtspr SPRN_MAS6,r6
|
||||
mtspr SPRN_PID0,r6
|
||||
|
||||
mfspr r7,SPRN_MMUCFG
|
||||
rlwinm r7,r7,21,28,31 /* extract MMUCFG[NPIDS] */
|
||||
cmpwi r7,3
|
||||
bne 2f /* skip if NPIDS != 3 */
|
||||
|
||||
mtspr SPRN_PID1,r6
|
||||
mtspr SPRN_PID2,r6
|
||||
|
||||
/* 5. Invalidate mapping we started in */
|
||||
2:
|
||||
lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r6,SPRN_MAS1
|
||||
rlwinm r6,r6,0,2,0 /* clear IPROT */
|
||||
mtspr SPRN_MAS1,r6
|
||||
tlbwe
|
||||
/* Invalidate TLB1 */
|
||||
li r9,0x0c
|
||||
tlbivax 0,r9
|
||||
TLBSYNC
|
||||
|
||||
/* The mapping only needs to be cache-coherent on SMP */
|
||||
#ifdef CONFIG_SMP
|
||||
#define M_IF_SMP MAS2_M
|
||||
#else
|
||||
#define M_IF_SMP 0
|
||||
#endif
|
||||
|
||||
/* 6. Setup KERNELBASE mapping in TLB1[0] */
|
||||
lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
|
||||
mtspr SPRN_MAS0,r6
|
||||
lis r6,(MAS1_VALID|MAS1_IPROT)@h
|
||||
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
|
||||
mtspr SPRN_MAS1,r6
|
||||
lis r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@h
|
||||
ori r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_SMP)@l
|
||||
mtspr SPRN_MAS2,r6
|
||||
mtspr SPRN_MAS3,r8
|
||||
tlbwe
|
||||
|
||||
/* 7. Jump to KERNELBASE mapping */
|
||||
lis r6,(KERNELBASE & ~0xfff)@h
|
||||
ori r6,r6,(KERNELBASE & ~0xfff)@l
|
||||
lis r7,MSR_KERNEL@h
|
||||
ori r7,r7,MSR_KERNEL@l
|
||||
bl 1f /* Find our address */
|
||||
1: mflr r9
|
||||
rlwimi r6,r9,0,20,31
|
||||
addi r6,r6,(2f - 1b)
|
||||
mtspr SPRN_SRR0,r6
|
||||
mtspr SPRN_SRR1,r7
|
||||
rfi /* start execution out of TLB1[0] entry */
|
||||
|
||||
/* 8. Clear out the temp mapping */
|
||||
2: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
|
||||
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
|
||||
mtspr SPRN_MAS0,r7
|
||||
tlbre
|
||||
mfspr r8,SPRN_MAS1
|
||||
rlwinm r8,r8,0,2,0 /* clear IPROT */
|
||||
mtspr SPRN_MAS1,r8
|
||||
tlbwe
|
||||
/* Invalidate TLB1 */
|
||||
li r9,0x0c
|
||||
tlbivax 0,r9
|
||||
TLBSYNC
|
||||
#define ENTRY_MAPPING_BOOT_SETUP
|
||||
#include "fsl_booke_entry_mapping.S"
|
||||
#undef ENTRY_MAPPING_BOOT_SETUP
|
||||
|
||||
/* Establish the interrupt vector offsets */
|
||||
SET_IVOR(0, CriticalInput);
|
||||
|
||||
@@ -711,6 +711,22 @@ relocate_new_kernel:
|
||||
/* r4 = reboot_code_buffer */
|
||||
/* r5 = start_address */
|
||||
|
||||
#ifdef CONFIG_FSL_BOOKE
|
||||
|
||||
mr r29, r3
|
||||
mr r30, r4
|
||||
mr r31, r5
|
||||
|
||||
#define ENTRY_MAPPING_KEXEC_SETUP
|
||||
#include "fsl_booke_entry_mapping.S"
|
||||
#undef ENTRY_MAPPING_KEXEC_SETUP
|
||||
|
||||
mr r3, r29
|
||||
mr r4, r30
|
||||
mr r5, r31
|
||||
|
||||
li r0, 0
|
||||
#else
|
||||
li r0, 0
|
||||
|
||||
/*
|
||||
@@ -727,6 +743,7 @@ relocate_new_kernel:
|
||||
rfi
|
||||
|
||||
1:
|
||||
#endif
|
||||
/* from this point address translation is turned off */
|
||||
/* and interrupts are disabled */
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(pci_dram_offset);
|
||||
EXPORT_SYMBOL(start_thread);
|
||||
EXPORT_SYMBOL(kernel_thread);
|
||||
|
||||
#ifndef CONFIG_BOOKE
|
||||
#ifdef CONFIG_PPC_FPU
|
||||
EXPORT_SYMBOL_GPL(cvt_df);
|
||||
EXPORT_SYMBOL_GPL(cvt_fd);
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user