Changeset dcbc8be in mainline for arch/ia32/src/pm.c


Ignore:
Timestamp:
2005-06-02T23:56:26Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ac5d02b
Parents:
7dcbc0a1
Message:

Big changes in IA-32 address space map.
Now the kernel is mapped above 0x80000000. Finally!
Userspace address space starts at 0x00000000.
Changes in many places.
This improvement temporarily breaks SMP and most likely also other stuff.
Supported size of memory is now only 4M as it is the biggest size that can be mapped at once on IA-32.

Changes in linker script.
Changes required because of the above.
Do not patch hardcoded_* variables but assign to them instead.

Cosmetic changes here and there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/pm.c

    r7dcbc0a1 rdcbc8be  
    6767
    6868/* gdtr is changed by kmp before next CPU is initialized */
    69 struct ptr_16_32 gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = (__address) gdt };
    70 struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START")))= { .limit = sizeof(idt), .base = (__address) idt };
     69struct ptr_16_32 gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };
     70struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(idt), .base = KA2PA((__address) idt) };
    7171
    7272void gdt_setbase(struct descriptor *d, __address base)
    7373{
    74         d->base_0_15 = base & 0xffff;
    75         d->base_16_23 = (base >> 16) & 0xff;
    76         d->base_24_31 = (base >> 24) & 0xff;
     74        d->base_0_15 = KA2PA(base) & 0xffff;
     75        d->base_16_23 = (KA2PA(base) >> 16) & 0xff;
     76        d->base_24_31 = (KA2PA(base) >> 24) & 0xff;
    7777}
    7878
    79 void gdt_setlimit(struct descriptor *d, __address limit)
     79void gdt_setlimit(struct descriptor *d, __u32 limit)
    8080{
    8181        d->limit_0_15 = limit & 0xffff;
     
    8585void idt_setoffset(struct idescriptor *d, __address offset)
    8686{
    87         d->offset_0_15 = offset & 0xffff;
    88         d->offset_16_31 = offset >> 16;
     87        d->offset_0_15 = KA2PA(offset) & 0xffff;
     88        d->offset_16_31 = KA2PA(offset) >> 16;
    8989}
    9090
Note: See TracChangeset for help on using the changeset viewer.