Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Yoshinori Sato | 06706c9 | 2015-05-11 02:26:40 +0900 | [diff] [blame] | 2 | /* |
| 3 | * linux/arch/h8300/boot/compressed/head.S |
| 4 | * |
| 5 | * Copyright (C) 2006 Yoshinori Sato |
| 6 | */ |
| 7 | |
| 8 | #include <linux/linkage.h> |
| 9 | |
| 10 | .section .text..startup,"ax" |
| 11 | .global startup |
| 12 | startup: |
Yoshinori Sato | 78f02ca | 2015-05-31 23:42:37 +0900 | [diff] [blame] | 13 | mov.l #startup, sp |
Yoshinori Sato | 06706c9 | 2015-05-11 02:26:40 +0900 | [diff] [blame] | 14 | mov.l er0, er4 |
Yoshinori Sato | 06706c9 | 2015-05-11 02:26:40 +0900 | [diff] [blame] | 15 | mov.l #__sbss, er0 |
| 16 | mov.l #__ebss, er1 |
| 17 | sub.l er0, er1 |
| 18 | shlr er1 |
| 19 | shlr er1 |
| 20 | sub.l er2, er2 |
| 21 | 1: |
| 22 | mov.l er2, @er0 |
| 23 | adds #4, er0 |
| 24 | dec.l #1, er1 |
| 25 | bne 1b |
| 26 | jsr @decompress_kernel |
| 27 | mov.l er4, er0 |
Yoshinori Sato | 78f02ca | 2015-05-31 23:42:37 +0900 | [diff] [blame] | 28 | jmp @output |
Yoshinori Sato | 06706c9 | 2015-05-11 02:26:40 +0900 | [diff] [blame] | 29 | |
| 30 | .align 9 |
| 31 | fake_headers_as_bzImage: |
| 32 | .word 0 |
| 33 | .ascii "HdrS" ; header signature |
| 34 | .word 0x0202 ; header version number (>= 0x0105) |
| 35 | ; or else old loadlin-1.5 will fail) |
| 36 | .word 0 ; default_switch |
| 37 | .word 0 ; SETUPSEG |
| 38 | .word 0x1000 |
| 39 | .word 0 ; pointing to kernel version string |
| 40 | .byte 0 ; = 0, old one (LILO, Loadlin, |
| 41 | ; 0xTV: T=0 for LILO |
| 42 | ; V = version |
| 43 | .byte 1 ; Load flags bzImage=1 |
| 44 | .word 0x8000 ; size to move, when setup is not |
| 45 | .long 0x100000 ; 0x100000 = default for big kernel |
| 46 | .long 0 ; address of loaded ramdisk image |
| 47 | .long 0 ; its size in bytes |
| 48 | |
| 49 | .end |