Changeset cfa70add in mainline for kernel/arch/sparc64/src/sparc64.c


Ignore:
Timestamp:
2006-09-03T23:37:14Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd85ae5
Parents:
002e613
Message:

sparc64 update.

  • Prototype userspace layer implementation that at least relates to sparc64 and compiles cleanly.
  • Fixes for kernel's preemptible_handler and code related to running userspace.
  • Enable userspace. Several dozen instructions are now run in userspace! We are pretty near the userspace milestone for sparc64.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/sparc64.c

    r002e613 rcfa70add  
    4848
    4949bootinfo_t bootinfo;
     50
     51void arch_pre_main(void)
     52{
     53        /* Setup usermode */
     54        init.cnt = bootinfo.taskmap.count;
     55       
     56        uint32_t i;
     57
     58        for (i = 0; i < bootinfo.taskmap.count; i++) {
     59                init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr);
     60                init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
     61        }
     62}
    5063
    5164void arch_pre_mm_init(void)
     
    99112        switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry,
    100113                ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE
    101                 - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS));
     114                - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS),
     115                (uintptr_t) kernel_uarg->uspace_uarg);
    102116
    103117        for (;;)
Note: See TracChangeset for help on using the changeset viewer.