Changeset f6297e0 in mainline for arch/ia32/src/smp


Ignore:
Timestamp:
2005-09-03T15:45:14Z (21 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab08b42
Parents:
2f08a55d
Message:

proper way of initializing GDT during boot on IA-32, fixes the nasty hack
SMP might be still broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/ap.S

    r2f08a55d rf6297e0  
    4848.code16
    4949        cli
    50         xorw %ax,%ax
    51         movw %ax,%ds
     50        xorw %ax, %ax
     51        movw %ax, %ds
    5252
    53         lgdt gdtr                       # initialize Global Descriptor Table register
     53        lgdt ap_bootstrap_gdtr  # initialize Global Descriptor Table register
    5454       
    55         movl %cr0,%eax
    56         orl $1,%eax
    57         movl %eax,%cr0                  # switch to protected mode
    58         jmpl $KTEXT,$jump_to_kernel
     55        movl %cr0, %eax
     56        orl $1, %eax
     57        movl %eax, %cr0                 # switch to protected mode
     58        jmpl $KTEXT, $jump_to_kernel
     59       
    5960jump_to_kernel:
    6061.code32
    61         movw $KDATA,%ax
    62         movw %ax,%ds
    63         movw %ax,%es
    64         movw %ax,%ss
    65         movl $(ctx-0x80000000),%eax     # KA2PA((__address) &ctx)
    66         movl (%eax),%esp
    67         subl $0x80000000,%esp           # KA2PA(ctx.sp)
     62        movw $KDATA, %ax
     63        movw %ax, %ds
     64        movw %ax, %es
     65        movw %ax, %ss
     66        movl $(ctx-0x80000000), %eax    # KA2PA((__address) &ctx)
     67        movl (%eax), %esp
     68        subl $0x80000000, %esp                  # KA2PA(ctx.sp)
    6869
    69         call map_kernel                 # map kernel and turn paging on
     70        call map_kernel                                 # map kernel and turn paging on
     71       
     72        movb $0xd1, %al                                 # enable A20 using the keyboard controller
     73        outb %al, $0x64
     74        movb $0xdf, %al
     75        outb %al, $0x60
    7076
    71         jmpl $KTEXT,$main_ap
     77        jmpl $KTEXT, $main_ap
    7278
    7379#endif /* __SMP__ */
Note: See TracChangeset for help on using the changeset viewer.