Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Something
Tuesday, September 4th, 2007 at 1:11:22pm UTC 

  1. asm (".global _start   \n"
  2.      "_start: b __init \n"); /* Has to be at the very beginning */
  3.  
  4. void _start();
  5.  
  6. /*
  7.  * Init CPU and COP to known state.
  8.  */
  9.  
  10. asm ("__init:                   \n"
  11.  
  12.      /* Make sure we run at right address */
  13.  
  14.      "adr   r0, _start          \n"
  15.      "ldr   r1, =_start         \n"
  16.      "ldr   r2, =__bss_start__  \n"
  17.  
  18.      "1:                        \n"
  19.      "cmp   r1, r2              \n"
  20.      "ldrlo r3, [r0], #4        \n"
  21.      "strlo r3, [r1], #4        \n"
  22.      "blo   1b                  \n"
  23.  
  24.      "ldr   r0, =__setup        \n"
  25.      "bx    r0                  \n"
  26.      "__setup:                  \n"
  27.  
  28.      /* Get processor id */
  29.  
  30.      "mov   r0, #0x60000000     \n"
  31.      "ldrb  r4, [r0]            \n"
  32.  
  33.      /* Setup stacks */
  34.  
  35.      "cmp   r4, #0x55           \n"
  36.      "ldreq r5, =cpu_stack_end  \n"
  37.      "ldrne r5, =cop_stack_end  \n"
  38.      "ldr   sp, [r5]            \n"

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right
worth-right