Changeset 5eb1379 in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-09-04T00:05:47Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
005384ad
Parents:
dd80fc6
Message:

basic GRUB memory map

File:
1 edited

Legend:

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

    rdd80fc6 r5eb1379  
    104104        lgdt protected_bootstrap_gdtr - 0x80000000              # initialize Global Descriptor Table register
    105105
    106         movw $KDATA, %ax
    107         movw %ax, %es
    108         movw %ax, %gs
    109         movw %ax, %fs
    110         movw %ax, %ds                                                                   # kernel data + stack
    111         movw %ax, %ss
     106        movw $KDATA, %cx
     107        movw %cx, %es
     108        movw %cx, %gs
     109        movw %cx, %fs
     110        movw %cx, %ds                                                                   # kernel data + stack
     111        movw %cx, %ss
    112112       
    113113        jmpl $KTEXT, $multiboot_meeting_point + BOOT_OFFSET
    114114        multiboot_meeting_point:
    115115       
     116        pushl %ebx
     117        pushl %eax
     118       
    116119        call map_kernel                                                                 # map kernel and turn paging on
     120       
     121        popl %eax
     122        popl %ebx
     123        cmpl $MULTIBOOT_LOADER_MAGIC, %eax
     124        je valid_boot
     125       
     126                # ...
     127               
     128                jmp invalid_boot
     129       
     130        valid_boot:
     131               
     132                movl (%ebx), %eax
     133               
     134                # ... check flags in eax
     135               
     136                movl 4(%ebx), %ecx
     137                addl 8(%ebx), %ecx
     138                movl %ecx, e801memorysize
     139               
     140#               movl 44(%ebx), %ecx
     141                xorl %ecx, %ecx
     142                movl %ecx, e820counter
     143#               movl 48(%ebx), %esi
     144#               movl $e820table, %edi
     145#               cld
     146#               rep movsb
     147               
     148        invalid_boot:
    117149       
    118150        call main_bsp - BOOT_OFFSET                                             # never returns
Note: See TracChangeset for help on using the changeset viewer.