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