~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/boot/romimage/head.S

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  *  linux/arch/sh/boot/romimage/head.S
  4  *
  5  * Board specific setup code, executed before zImage loader
  6  */
  7 
  8 .text
  9         #include <asm/page.h>
 10 
 11         .global romstart
 12 romstart:
 13         /* include board specific setup code */
 14 #include <mach/romimage.h>
 15 
 16 #ifdef CONFIG_ROMIMAGE_MMCIF
 17         /* load the romImage to above the empty zero page */
 18         mov.l   empty_zero_page_dst, r4
 19         mov.l   empty_zero_page_dst_adj, r5
 20         add     r5, r4
 21         mov.l   bytes_to_load, r5
 22         mov.l   loader_function, r7
 23         jsr     @r7
 24          mov    r4, r15
 25 
 26         mov.l   empty_zero_page_dst, r4
 27         mov.l   empty_zero_page_dst_adj, r5
 28         add     r5, r4
 29         mov.l   loaded_code_offs, r5
 30         add     r5, r4
 31         jmp     @r4
 32          nop
 33 
 34         .balign 4
 35 empty_zero_page_dst_adj:
 36         .long   PAGE_SIZE
 37 bytes_to_load:
 38         .long   end_data - romstart
 39 loader_function:
 40         .long   mmcif_loader
 41 loaded_code_offs:
 42         .long   loaded_code - romstart
 43 loaded_code:
 44 #endif /* CONFIG_ROMIMAGE_MMCIF */
 45 
 46         /* copy the empty_zero_page contents to where vmlinux expects it */
 47         mova    extra_data_pos, r0
 48         mov.l   extra_data_size, r1
 49         add     r1, r0
 50         mov.l   empty_zero_page_dst, r1
 51         mov     #(PAGE_SHIFT - 4), r4
 52         mov     #1, r3
 53         shld    r4, r3 /* r3 = PAGE_SIZE / 16 */
 54 
 55 1:
 56         mov.l   @r0, r4
 57         mov.l   @(4, r0), r5
 58         mov.l   @(8, r0), r6
 59         mov.l   @(12, r0), r7
 60         add     #16,r0
 61         mov.l   r4, @r1
 62         mov.l   r5, @(4, r1)
 63         mov.l   r6, @(8, r1)
 64         mov.l   r7, @(12, r1)
 65         dt      r3
 66         add     #16,r1
 67         bf      1b
 68 
 69         /* jump to the zImage entry point located after the zero page data */
 70         mov     #PAGE_SHIFT, r4
 71         mov     #1, r1
 72         shld    r4, r1
 73         mova    extra_data_pos, r0
 74         add     r1, r0
 75         mov.l   extra_data_size, r1
 76         add     r1, r0
 77         jmp     @r0
 78          nop
 79 
 80         .align 2
 81 empty_zero_page_dst:
 82         .long   _text
 83 extra_data_pos:
 84 extra_data_size:
 85         .long   zero_page_pos - extra_data_pos

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php