head.S 1000 B

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