Changeset 8fc0d455 in mainline for arch/amd64/src/boot/boot.S


Ignore:
Timestamp:
2005-08-30T17:50:07Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c0a9b3
Parents:
b45aa23
Message:

Code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/boot/boot.S

    rb45aa23 r8fc0d455  
    11#
    2 # Copyright (C) 2001-2004 Jakub Jermar
     2# Copyright (C) 2001-2004 Ondrej Palkovsky
    33# All rights reserved.
    44#
     
    2727#
    2828
     29#define __ASM__
     30
     31#include <arch/mm/page.h>       
    2932#include <arch/mm/ptl.h>
     33#include <arch/pm.h>
    3034
    3135#define START_STACK     0x7c00 
     
    5256#       call memmap_arch_init
    5357       
    54         mov $0x80000000, %eax 
     58        movl $0x80000000, %eax 
    5559        cpuid
    5660        cmp $0x80000000, %eax   # any function > 80000000h?
    5761        jbe no_long_mode
    58         mov $0x80000001, %eax   # Extended function code 80000001
     62        movl $0x80000001, %eax  # Extended function code 80000001
    5963        cpuid
    6064        bt $29, %edx            # Test if long mode is supported.
     
    6973        movl %eax,%cr0                  # switch to protected mode
    7074
    71         jmpl $40, $now_in_prot
     75        jmpl $selector(KTEXT32_DES), $now_in_prot
    7276
    7377no_long_mode:
     
    7983now_in_prot: 
    8084        # Set up stack & data descriptors
    81         movw $16, %ax
     85        movw $selector(KDATA_DES), %ax
    8286        movw %ax, %ds
    8387        movw %ax, %fs
     
    107111       
    108112        # At this point we are in compatibility mode
    109         jmpl $8, $start64
     113        jmpl $selector(KTEXT_DES), $start64
    110114
    111115.code64
     
    150154.global gdtr_inst                               
    151155gdtr_inst:
    152         .word 7*8  # GDT_ITEMS * 8
    153         .long gdt + 0x80000000
     156        .word selector(GDT_ITEMS)
     157        .long KA2PA(gdt)
    154158
    155159.global idtr_inst
    156160idtr_inst:
    157161        .word 0
    158         .long idt + 0x80000000
     162        .long KA2PA(idt)
Note: See TracChangeset for help on using the changeset viewer.