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

Changeset 89b1b64 in mainline


Ignore:
Timestamp:
2009-03-04T22:35:16Z (13 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master
Children:
5e9de3a
Parents:
63d1ebd
Message:

Init-task names for mips32.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/mips32/loader/Makefile

    r63d1ebd r89b1b64  
    7373        _components.c \
    7474        ../../../generic/printf.c \
     75        ../../../generic/string.c \
    7576        asm.S \
    7677        boot.S
  • boot/arch/mips32/loader/main.c

    r63d1ebd r89b1b64  
    3131#include <align.h>
    3232#include <macros.h>
     33#include <string.h>
    3334#include "msim.h"
    3435#include "asm.h"
     
    8586                        bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
    8687                        bootinfo.tasks[bootinfo.cnt].size = components[i].size;
     88                        strncpy(bootinfo.tasks[bootinfo.cnt].name,
     89                            components[i].name, BOOTINFO_TASK_NAME_BUFLEN);
    8790                        bootinfo.cnt++;
    8891                }
  • boot/arch/mips32/loader/main.h

    r63d1ebd r89b1b64  
    3939#ifndef __ASM__
    4040
     41/** Size of buffer for storing task name in task_t. */
     42#define BOOTINFO_TASK_NAME_BUFLEN 32
     43
     44/** Struct holding information about single loaded task. */
    4145typedef struct {
     46        /** Address where the task was placed. */
    4247        void *addr;
     48        /** Size of the task's binary. */
    4349        unsigned int size;
     50        /** Task name. */
     51        char name[BOOTINFO_TASK_NAME_BUFLEN];
    4452} task_t;
    4553
  • kernel/arch/mips32/include/arch.h

    r63d1ebd r89b1b64  
    3939#define CPUMAP_MAX_RECORDS   32
    4040
     41#define BOOTINFO_TASK_NAME_BUFLEN 32
     42
    4143#include <typedefs.h>
    4244
     
    4648        uintptr_t addr;
    4749        uint32_t size;
     50        char name[BOOTINFO_TASK_NAME_BUFLEN];
    4851} utask_t;
    4952
  • kernel/arch/mips32/src/mips32.c

    r63d1ebd r89b1b64  
    5555#include <macros.h>
    5656#include <ddi/device.h>
     57#include <config.h>
     58#include <string.h>
    5759
    5860#include <arch/asm/regname.h>
     
    8789                init.tasks[i].addr = bootinfo->tasks[i].addr;
    8890                init.tasks[i].size = bootinfo->tasks[i].size;
     91                strncpy(init.tasks[i].name, bootinfo->tasks[i].name,
     92                        CONFIG_TASK_NAME_BUFLEN);
    8993        }
    9094       
Note: See TracChangeset for help on using the changeset viewer.