Changeset 5e9de3a in mainline


Ignore:
Timestamp:
2009-03-04T22:45:25Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46db10e9
Parents:
89b1b64
Message:

Init-task names for ppc32.

Files:
5 edited

Legend:

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

    r89b1b64 r5e9de3a  
    6666        ../../../genarch/ofw.c \
    6767        ../../../generic/printf.c \
     68        ../../../generic/string.c \
    6869        asm.S \
    6970        boot.S
  • boot/arch/ppc32/loader/main.c

    r89b1b64 r5e9de3a  
    3434#include <align.h>
    3535#include <macros.h>
     36#include <string.h>
    3637
    3738#define HEAP_GAP 1024000
     
    167168                                bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = (void *) (pages << PAGE_WIDTH);
    168169                                bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size;
     170                                strncpy(bootinfo.taskmap.tasks[bootinfo.taskmap.count].name,
     171                                    components[i].name, BOOTINFO_TASK_NAME_BUFLEN);
     172
    169173                                bootinfo.taskmap.count++;
    170174                        }
  • boot/arch/ppc32/loader/main.h

    r89b1b64 r5e9de3a  
    3434#define TASKMAP_MAX_RECORDS 32
    3535
     36/** Size of buffer for storing task name in task_t. */
     37#define BOOTINFO_TASK_NAME_BUFLEN 32
     38
     39/** Struct holding information about single loaded task. */
    3640typedef struct {
     41        /** Address where the task was placed. */
    3742        void *addr;
     43        /** Size of the task's binary. */
    3844        unsigned int size;
     45        /** Task name. */
     46        char name[BOOTINFO_TASK_NAME_BUFLEN];
    3947} task_t;
    4048
  • kernel/arch/ppc32/include/boot/boot.h

    r89b1b64 r5e9de3a  
    4646#ifndef __ASM__
    4747
     48#define BOOTINFO_TASK_NAME_BUFLEN 32
     49
    4850#include <arch/types.h>
    4951
     
    5153        uintptr_t addr;
    5254        uint32_t size;
     55        char name[BOOTINFO_TASK_NAME_BUFLEN];
    5356} utask_t;
    5457
  • kernel/arch/ppc32/src/ppc32.c

    r89b1b64 r5e9de3a  
    4747#include <arch/drivers/pic.h>
    4848#include <macros.h>
     49#include <string.h>
    4950
    5051#define IRQ_COUNT  64
     
    6263                init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr);
    6364                init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
     65                strncpy(init.tasks[i].name, bootinfo.taskmap.tasks[i].name,
     66                        CONFIG_TASK_NAME_BUFLEN);
    6467        }
    6568}
Note: See TracChangeset for help on using the changeset viewer.