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

Method GetPsciMethod

src/include/kernel_fdt.hpp:789–796  ·  view source on GitHub ↗

* @brief 获取 PSCI method 属性 * @param offset 节点偏移 * @return Expected method 字符串 */

Source from the content-addressed store, hash-verified

787 * @return Expected<const char*> method 字符串
788 */
789 [[nodiscard]] auto GetPsciMethod(int offset) const -> Expected<const char*> {
790 int len = 0;
791 const auto* prop = fdt_get_property(fdt_header_, offset, "method", &len);
792 if (prop == nullptr) {
793 return std::unexpected(Error(ErrorCode::kFdtPropertyNotFound));
794 }
795 return reinterpret_cast<const char*>(prop->data);
796 }
797
798 /**
799 * @brief 验证 PSCI 函数 ID

Callers

nothing calls this directly

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected