|
SimpleKernel 1.17.0
|
#include <cpu_io.h>#include <array>#include <cstdint>#include <cstring>#include "basic_info.hpp"#include "interrupt.h"#include "kernel.h"#include "kernel_elf.hpp"#include "kernel_log.hpp"#include "per_cpu.hpp"#include "sipi.h"
Go to the source code of this file.
Functions | |
| auto | ArchInit (int, const char **) -> void |
| 体系结构相关初始化 | |
| auto | ArchInitSMP (int, const char **) -> void |
| 从核的体系结构相关初始化 | |
| auto | WakeUpOtherCores () -> void |
| 唤醒其余 core | |
| auto | InitTaskContext (cpu_io::CalleeSavedContext *task_context, void(*entry)(void *), void *arg, uint64_t stack_top) -> void |
| 初始化内核线程的任务上下文(重载1) | |
| auto | InitTaskContext (cpu_io::CalleeSavedContext *task_context, cpu_io::TrapContext *trap_context_ptr, uint64_t stack_top) -> void |
| 初始化用户线程的任务上下文(重载2) | |
| auto ArchInit | ( | int | argc, |
| const char ** | argv | ||
| ) | -> void |
体系结构相关初始化
| argc | 在不同体系结构有不同含义,同 _start |
| argv | 在不同体系结构有不同含义,同 _start |
Definition at line 105 of file arch_main.cpp.

| auto ArchInitSMP | ( | int | argc, |
| const char ** | argv | ||
| ) | -> void |
从核的体系结构相关初始化
| argc | 在不同体系结构有不同含义,同 _start |
| argv | 在不同体系结构有不同含义,同 _start |
Definition at line 117 of file arch_main.cpp.

| auto InitTaskContext | ( | cpu_io::CalleeSavedContext * | task_context, |
| cpu_io::TrapContext * | trap_context_ptr, | ||
| uint64_t | stack_top | ||
| ) | -> void |
初始化用户线程的任务上下文(重载2)
| task_context | 指向任务上下文的指针 |
| trap_context_ptr | 指向 Trap 上下文的指针 |
| stack_top | 内核栈顶地址 |
Definition at line 156 of file arch_main.cpp.
| auto InitTaskContext | ( | cpu_io::CalleeSavedContext * | task_context, |
| void(*)(void *) | entry, | ||
| void * | arg, | ||
| uint64_t | stack_top | ||
| ) | -> void |
初始化内核线程的任务上下文(重载1)
| task_context | 指向任务上下文的指针 |
| entry | 线程入口函数 |
| arg | 传递给线程的参数 |
| stack_top | 内核栈顶地址 |
Definition at line 143 of file arch_main.cpp.
| auto WakeUpOtherCores | ( | ) | -> void |
唤醒其余 core
Definition at line 131 of file arch_main.cpp.