diff options
author | rtm <rtm> | 2006-06-24 22:47:06 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-06-24 22:47:06 +0000 |
commit | 89eb5fbe6d120f19d69c3c84bed69611a746ff03 (patch) | |
tree | 1e186995c68932ff5b75f95c5dbdf7d5d307e7d3 /bootother.S | |
parent | 7df1310b2a8e0d825287d64d09c2c8d82e51907c (diff) | |
download | xv6-labs-89eb5fbe6d120f19d69c3c84bed69611a746ff03.tar.gz xv6-labs-89eb5fbe6d120f19d69c3c84bed69611a746ff03.tar.bz2 xv6-labs-89eb5fbe6d120f19d69c3c84bed69611a746ff03.zip |
boot more than two CPUs, each on own initial stack
Diffstat (limited to 'bootother.S')
-rw-r--r-- | bootother.S | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bootother.S b/bootother.S index cba4a5f..eee5ebe 100644 --- a/bootother.S +++ b/bootother.S @@ -9,6 +9,10 @@ * CS base set to startup memory address; * CS limit set to 64KB; * CPL and IP set to 0. + * + * mp.c causes each non-boot CPU in turn to jump to start. + * mp.c puts the correct %esp in start-4, and the place to jump + * to in start-8. * * Credit: Cliff Frey */ @@ -28,8 +32,8 @@ start: .code16 # This runs in real mode movw %ax,%es # -> Extra Segment movw %ax,%ss # -> Stack Segment - # Set up the stack pointer, growing downward from 0x7000. - movw $start,%sp # Stack Pointer + # Set up the stack pointer, growing downward from 0x7000-8. + movw $start-8,%sp # Stack Pointer #### Switch from real to protected mode #### The descriptors in our GDT allow all physical memory to be accessed. @@ -61,10 +65,9 @@ protcseg: movw %ax, %gs # -> GS movw %ax, %ss # -> SS: Stack Segment - # XXX hack - movl 0x10018, %eax # elfhdr->entry (left over in scratch space) - # subl $KERNBASE, %eax - jmp *%eax # this jumps to _start in kern/entry.S + movl start-8, %eax + movl start-4, %esp + jmp *%eax .p2align 2 # force 4 byte alignment gdt: |