内核基础信息(物理内存、内核地址、CPU 核数等)
More...
#include <basic_info.hpp>
内核基础信息(物理内存、内核地址、CPU 核数等)
Definition at line 26 of file basic_info.hpp.
◆ BasicInfo() [1/4]
| BasicInfo::BasicInfo |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
|
explicit |
构造函数,在 arch_main.cpp 中定义
- Parameters
-
| argc | 同 _start |
| argv | 同 _start |
- Copyright
- Copyright The SimpleKernel Contributors
Definition at line 20 of file arch_main.cpp.
20 {
21 KernelFdtSingleton::instance()
22 .GetMemory()
23 .and_then([
this](std::pair<uint64_t, size_t> mem) ->
Expected<void> {
26 return {};
27 })
30 while (true) {
32 }
33 return {};
34 });
35
40
42
43 core_count = KernelFdtSingleton::instance().GetCoreCount().value_or(1);
44
45 interval = cpu_io::CNTFRQ_EL0::Read();
46}
void * __executable_start[]
std::expected< T, Error > Expected
std::expected 别名模板
auto Err(etl::format_string< Args... > fmt, Args &&... args) -> void
以 ERROR 级别记录日志
uint64_t physical_memory_addr
physical_memory 地址
uint64_t kernel_addr
kernel 地址
size_t physical_memory_size
physical_memory 大小
size_t kernel_size
kernel 大小
constexpr auto message() const -> const char *
◆ BasicInfo() [2/4]
◆ BasicInfo() [3/4]
◆ BasicInfo() [4/4]
◆ ~BasicInfo()
| BasicInfo::~BasicInfo |
( |
| ) |
|
|
default |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ core_count
| size_t BasicInfo::core_count {0} |
◆ elf_addr
| uint64_t BasicInfo::elf_addr {0} |
◆ fdt_addr
| uint64_t BasicInfo::fdt_addr {0} |
◆ interval
| size_t BasicInfo::interval {0} |
◆ kernel_addr
| uint64_t BasicInfo::kernel_addr {0} |
◆ kernel_size
| size_t BasicInfo::kernel_size {0} |
◆ physical_memory_addr
| uint64_t BasicInfo::physical_memory_addr {0} |
◆ physical_memory_size
| size_t BasicInfo::physical_memory_size {0} |
The documentation for this struct was generated from the following files: