1 /* SPDX-License-Identifier: GPL-2.0 */
3 * linux/arch/sh/boot/compressed/head.S
5 * Copyright (C) 1999 Stuart Menefy
6 * Copyright (C) 2003 SUGIOKA Toshinobu
15 /* Load initial status register */
19 /* Move myself to proper location if necessary */
25 mov.l bss_start_addr, r0
27 and r1, r0 ! align cache line
28 mov.l text_start_addr, r3
68 mov.l bss_start_addr, r2
75 /* Set the initial pointer. */
76 mov.l init_stack_addr, r0
79 /* Decompress the kernel */
80 mov.l decompress_kernel_addr, r0
84 /* Jump to the start of the decompressed kernel */
85 mov.l kernel_start_addr, r0
95 .long 0x500000F0 /* Privileged mode, Bank=0, Block=1, IMASK=0xF */
97 .long 0x400000F0 /* magic used by kexec to parse zImage format */
100 decompress_kernel_addr:
101 .long decompress_kernel
104 .long ___pa(_text+PAGE_SIZE)
106 .long _text+PAGE_SIZE
110 fake_headers_as_bzImage:
112 .ascii "HdrS" ! header signature
113 .word 0x0202 ! header version number (>= 0x0105)
114 ! or else old loadlin-1.5 will fail)
115 .word 0 ! default_switch
118 .word 0 ! pointing to kernel version string
119 .byte 0 ! = 0, old one (LILO, Loadlin,
122 .byte 1 ! Load flags bzImage=1
123 .word 0x8000 ! size to move, when setup is not
124 .long 0x100000 ! 0x100000 = default for big kernel
125 .long 0 ! address of loaded ramdisk image
126 .long 0 # its size in bytes