1 /******************************************************************************
2 * Copyright (c) 2004, 2011 IBM Corporation
4 * This program and the accompanying materials
5 * are made available under the terms of the BSD License
6 * which accompanies this distribution, and is available at
7 * http://www.opensource.org/licenses/bsd-license.php
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
16 .section ".slof.loader","ax"
18 /* this only works if paflof is running below 4GB */
19 lis r31, fdt_start@h /* save address of */
20 ori r31, r31, fdt_start@l /* flattened device */
21 std r3, 0(r31) /* tree */
23 /* this only works if paflof is running below 4GB */
24 lis r31, romfs_base@h /* save address of */
25 ori r31, r31, romfs_base@l /* the romfs */
28 /* this only works if paflof is running below 4GB */
29 lis r31, epapr_magic@h /* if it is an epapr compliant */
30 ori r31, r31, epapr_magic@l /* low level firmware; then r6 */
31 std r6, 0(r31) /* contains the epapr magic */
33 /* this only works if paflof is running below 4GB */
34 lis r31, epapr_ima_size@h
35 ori r31, r31, epapr_ima_size@l
36 std r7, 0(r31) /* r7 contains the IMA size */
38 /* fill in handler address */
40 /* this only works if paflof is running below 4GB */
44 ori r3, r3, _slof_text@l
46 std r3, XVECT_M_HANDLER(0)
49 /* Patch potentially broken sc 1 instructions */
51 ori r3, r3, _slof_text@l
52 lis r4, _slof_text_end@h
53 ori r4, r4, _slof_text_end@l