MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / SendIpi

Method SendIpi

src/arch/aarch64/interrupt.cpp:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75auto Interrupt::SendIpi(uint64_t target_cpu_mask) -> Expected<void> {
76 /// @todo 默认使用 SGI 0 作为 IPI 中断
77 static constexpr uint64_t kIPISGI = 0;
78
79 uint64_t sgi_value = 0;
80
81 // 设置 INTID 为 0 (SGI 0)
82 sgi_value |= (kIPISGI & 0xF) << 24;
83
84 // 设置 TargetList (Aff0 级别,低 16 位)
85 sgi_value |= (target_cpu_mask & 0xFFFF);
86
87 // 写入 ICC_SGI1R_EL1 寄存器发送 SGI
88 cpu_io::ICC_SGI1R_EL1::Write(sgi_value);
89
90 return {};
91}
92
93auto Interrupt::BroadcastIpi() -> Expected<void> {
94 /// @todo 默认使用 SGI 0 作为 IPI 中断

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected