Changeset 8f2153b in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-09-05T12:41:45Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b492b5
Parents:
2c55af3
Message:

Backported AMD64 linker and boot changes back to IA32.

Location:
arch/ia32/src
Files:
4 edited

Legend:

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

    r2c55af3 r8f2153b  
    2727#
    2828
     29#define __ASM__
     30       
    2931#include <arch/boot/boot.h>
    3032#include <arch/boot/memmapasm.h>
     33#include <arch/mm/page.h>
     34#include <arch/pm.h>
    3135
    3236.section K_TEXT_START
     
    5458        call memmap_arch_init
    5559       
    56         lgdt real_bootstrap_gdtr                                # initialize Global Descriptor Table register
     60        lgdt real_bootstrap_gdtr_boot           # initialize Global Descriptor Table register
    5761       
    5862        movl %cr0, %eax
     
    236240page_directory:
    237241        .space 4096, 0
     242
     243.global real_bootstrap_gdtr_boot
     244real_bootstrap_gdtr_boot:
     245        .word selector(GDT_ITEMS)
     246        .long KA2PA(gdt)-BOOT_OFFSET
     247       
  • arch/ia32/src/pm.c

    r2c55af3 r8f2153b  
    7070struct tss *tss_p = NULL;
    7171
     72/* TODO: Does not compile correctly if it does not exist ???? */
     73int __attribute__ ((section ("K_DATA_START"))) __fake;
     74
    7275/* gdtr is changed by kmp before next CPU is initialized */
    73 struct ptr_16_32 real_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };
    7476struct ptr_16_32 protected_bootstrap_gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
    7577struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt };
  • arch/ia32/src/smp/ap.S

    r2c55af3 r8f2153b  
    5151        movw %ax, %ds
    5252
    53         lgdt real_bootstrap_gdtr        # initialize Global Descriptor Table register
     53        lgdt real_bootstrap_gdtr_boot   # initialize Global Descriptor Table register
    5454       
    5555        movl %cr0, %eax
  • arch/ia32/src/smp/smp.c

    r2c55af3 r8f2153b  
    144144                memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));
    145145                memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
    146                 ((struct ptr_16_32 *) PA2KA((__address) &real_bootstrap_gdtr))->base = KA2PA((__address) gdt_new);
     146                real_bootstrap_gdtr.base = KA2PA((__address) gdt_new);
    147147                gdtr.base = (__address) gdt_new;
    148148
Note: See TracChangeset for help on using the changeset viewer.