Changeset dc5c303 in mainline for kernel/generic/src/main/kinit.c


Ignore:
Timestamp:
2023-12-28T13:59:23Z (7 months ago)
Author:
GitHub <noreply@…>
Children:
6b66de6b
Parents:
42c2e65 (diff), f87ff8e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
git-committer:
GitHub <noreply@…> (2023-12-28 13:59:23)
Message:

Merge branch 'master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    r42c2e65 rdc5c303  
    6161#include <stdio.h>
    6262#include <log.h>
    63 #include <mem.h>
     63#include <memw.h>
    6464#include <console/console.h>
    6565#include <interrupt.h>
     
    6969#include <ipc/ipc.h>
    7070#include <str.h>
     71#include <str_error.h>
    7172#include <sysinfo/stats.h>
    7273#include <sysinfo/sysinfo.h>
    7374#include <align.h>
    7475#include <stdlib.h>
     76#include <debug/register.h>
    7577
    7678#ifdef CONFIG_SMP
     
    182184         */
    183185        size_t i;
    184         program_t programs[CONFIG_INIT_TASKS];
     186        program_t programs[CONFIG_INIT_TASKS] = { };
    185187
    186188        // FIXME: do not propagate arguments through sysinfo
     
    237239                    PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
    238240                assert(page);
     241
     242                if (str_cmp(name, "kernel.dbg") == 0) {
     243                        /*
     244                         * Not an actual init task, but rather debug sections extracted
     245                         * from the kernel ELF file and handed to us here so we can use
     246                         * it for debugging.
     247                         */
     248
     249                        register_debug_data((void *) page, init.tasks[i].size);
     250                        programs[i].task = NULL;
     251                        continue;
     252                }
    239253
    240254                if (str_cmp(name, "loader") == 0) {
     
    254268                }
    255269
    256                 errno_t rc = program_create_from_image((void *) page, namebuf,
     270                errno_t rc = program_create_from_image((void *) page, init.tasks[i].size, namebuf,
    257271                    &programs[i]);
    258272
Note: See TracChangeset for help on using the changeset viewer.