Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset d32358f in mainline


Ignore:
Timestamp:
2010-02-04T16:24:32Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
b1d3c36
Parents:
eda925a
Message:

abs32le: explicitly support SMP configurations
abs32le: add several missing functions (dummy implementations)

Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    reda925a rd32358f  
    310310
    311311% Support for SMP
    312 ! [(PLATFORM=ia32&PROCESSOR!=athlon_xp)|PLATFORM=amd64|PLATFORM=sparc64|PLATFORM=ia64|(PLATFORM=mips32&MACHINE=msim)] CONFIG_SMP (y/n)
     312! [(PLATFORM=ia32&PROCESSOR!=athlon_xp)|PLATFORM=amd64|PLATFORM=sparc64|PLATFORM=ia64|(PLATFORM=mips32&MACHINE=msim)|PLATFORM=abs32le] CONFIG_SMP (y/n)
    313313
    314314% Debug build
  • defaults/special/Makefile.config

    reda925a rd32358f  
    44# Compiler
    55COMPILER = gcc_native
     6
     7# Support for SMP
     8CONFIG_SMP = y
    69
    710# Debug build
  • kernel/arch/abs32le/Makefile.inc

    reda925a rd32358f  
    4141        arch/$(KARCH)/src/userspace.c \
    4242        arch/$(KARCH)/src/cpu/cpu.c \
     43        arch/$(KARCH)/src/ddi/ddi.c \
     44        arch/$(KARCH)/src/smp/smp.c \
    4345        arch/$(KARCH)/src/mm/as.c \
    4446        arch/$(KARCH)/src/mm/frame.c \
  • kernel/arch/abs32le/include/context.h

    reda925a rd32358f  
    3636#define KERN_abs32le_CONTEXT_H_
    3737
    38 #ifdef KERNEL
    39 #include <arch/types.h>
    40 
    4138#define STACK_ITEM_SIZE  4
    4239#define SP_DELTA         0
    43 
    44 #define context_set(c, _pc, stack, size) \
    45         do { \
    46                 (c)->pc = (uintptr_t) (_pc); \
    47         } while (0)
    48 
    49 #endif /* KERNEL */
    5040
    5141/*
  • kernel/arch/abs32le/include/interrupt.h

    reda925a rd32358f  
    4040#define IVT_ITEMS  0
    4141#define IVT_FIRST  0
     42
     43#define VECTOR_TLB_SHOOTDOWN_IPI  0
    4244
    4345/*
  • kernel/arch/abs32le/src/abs32le.c

    reda925a rd32358f  
    3939#include <arch/asm.h>
    4040
     41#include <func.h>
    4142#include <config.h>
     43#include <context.h>
    4244#include <interrupt.h>
    4345#include <ddi/irq.h>
     
    128130}
    129131
     132int context_save_arch(context_t *ctx)
     133{
     134        return 1;
     135}
     136
     137void context_restore_arch(context_t *ctx)
     138{
     139        while (true);
     140}
     141
    130142/** @}
    131143 */
  • kernel/arch/abs32le/src/debug/stacktrace.c

    reda925a rd32358f  
    2727 */
    2828
    29 /** @addtogroup ia32
     29/** @addtogroup abs32le
    3030 * @{
    3131 */
     
    3838#include <typedefs.h>
    3939
    40 #define FRAME_OFFSET_FP_PREV    0
    41 #define FRAME_OFFSET_RA         1
    42 
    4340bool kernel_frame_pointer_validate(uintptr_t fp)
    4441{
    45         return fp != 0;
     42        return true;;
    4643}
    4744
    4845bool kernel_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    4946{
    50         uint32_t *stack = (void *) fp;
    51         *prev = stack[FRAME_OFFSET_FP_PREV];
    5247        return true;
    5348}
     
    5550bool kernel_return_address_get(uintptr_t fp, uintptr_t *ra)
    5651{
    57         uint32_t *stack = (void *) fp;
    58         *ra = stack[FRAME_OFFSET_RA];
    5952        return true;
    6053}
     
    6255bool uspace_frame_pointer_validate(uintptr_t fp)
    6356{
    64         return fp != 0;
     57        return true;
    6558}
    6659
    6760bool uspace_frame_pointer_prev(uintptr_t fp, uintptr_t *prev)
    6861{
    69         return !copy_from_uspace((void *) prev,
    70             (uint32_t *) fp + FRAME_OFFSET_FP_PREV, sizeof(*prev));
     62        return true;
    7163}
    7264
    7365bool uspace_return_address_get(uintptr_t fp, uintptr_t *ra)
    7466{
    75         return !copy_from_uspace((void *) ra, (uint32_t *) fp + FRAME_OFFSET_RA,
    76             sizeof(*ra));
     67        return true;
     68}
     69
     70uintptr_t frame_pointer_get(void)
     71{
     72        return 0;
     73}
     74
     75uintptr_t program_counter_get(void)
     76{
     77        return 0;
    7778}
    7879
  • kernel/generic/include/stacktrace.h

    reda925a rd32358f  
    6060 */
    6161extern uintptr_t frame_pointer_get(void);
    62 extern uintptr_t program_counter_get();
     62extern uintptr_t program_counter_get(void);
    6363
    6464extern bool kernel_frame_pointer_validate(uintptr_t);
Note: See TracChangeset for help on using the changeset viewer.