* @brief 获取 PSCI method 属性 * @param offset 节点偏移 * @return Expected method 字符串 */
| 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 |