diff options
| author | Robert Morris <rtm@csail.mit.edu> | 2011-08-31 05:38:05 -0400 | 
|---|---|---|
| committer | Robert Morris <rtm@csail.mit.edu> | 2011-08-31 05:38:05 -0400 | 
| commit | 5c292b3d7167022e765c7228b0748cb50ab7d7f1 (patch) | |
| tree | ff8bc3f52c2173052ec90b5e98f865c955f6b51f | |
| parent | 5e083578278e340e0661f2dede68676432269f49 (diff) | |
| download | xv6-labs-5c292b3d7167022e765c7228b0748cb50ab7d7f1.tar.gz xv6-labs-5c292b3d7167022e765c7228b0748cb50ab7d7f1.tar.bz2 xv6-labs-5c292b3d7167022e765c7228b0748cb50ab7d7f1.zip | |
simplify the end of entry.S
| -rw-r--r-- | entry.S | 17 | 
1 files changed, 8 insertions, 9 deletions
| @@ -51,15 +51,14 @@ entry:    orl     $(CR0_PG|CR0_WP), %eax    movl    %eax, %cr0 -  # now switch to using addresses above KERNBASE -  # call addresses are pc-relative so we jump though this hoop: -  mov     $relocated, %eax -  jmp     *%eax -relocated: -  # Set up the stack pointer and call into C. +  # Set up the stack pointer.    movl $(stack + STACK), %esp -  call main -spin: -  jmp spin + +  # Call main(), which switches to executing at +  # high addresses. The indirect call is needed because +  # the assembler produces a PC-relative instruction +  # for a direct call.  +  mov $main, %eax +  jmp *%eax  .comm stack, STACK | 
