193a4c0abSBrandon Kim // Copyright 2024 Google LLC 293a4c0abSBrandon Kim // 393a4c0abSBrandon Kim // Licensed under the Apache License, Version 2.0 (the "License"); 493a4c0abSBrandon Kim // you may not use this file except in compliance with the License. 593a4c0abSBrandon Kim // You may obtain a copy of the License at 693a4c0abSBrandon Kim // 793a4c0abSBrandon Kim // http://www.apache.org/licenses/LICENSE-2.0 893a4c0abSBrandon Kim // 993a4c0abSBrandon Kim // Unless required by applicable law or agreed to in writing, software 1093a4c0abSBrandon Kim // distributed under the License is distributed on an "AS IS" BASIS, 1193a4c0abSBrandon Kim // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1293a4c0abSBrandon Kim // See the License for the specific language governing permissions and 1393a4c0abSBrandon Kim // limitations under the License. 1493a4c0abSBrandon Kim 1593a4c0abSBrandon Kim #pragma once 1693a4c0abSBrandon Kim 1793a4c0abSBrandon Kim #include "handler.hpp" 1893a4c0abSBrandon Kim 1993a4c0abSBrandon Kim #include <span> 2093a4c0abSBrandon Kim 2193a4c0abSBrandon Kim namespace google 2293a4c0abSBrandon Kim { 2393a4c0abSBrandon Kim namespace ipmi 2493a4c0abSBrandon Kim { 2593a4c0abSBrandon Kim 2693a4c0abSBrandon Kim #ifndef MAX_IPMI_BUFFER 2793a4c0abSBrandon Kim #define MAX_IPMI_BUFFER 64 2893a4c0abSBrandon Kim #endif 2993a4c0abSBrandon Kim 3093a4c0abSBrandon Kim // Max buffer - len 3193a4c0abSBrandon Kim constexpr size_t MAX_PAYLOAD_SIZE = MAX_IPMI_BUFFER - 1; 3293a4c0abSBrandon Kim 3393a4c0abSBrandon Kim Resp readBiosSetting( 3493a4c0abSBrandon Kim std::span<const uint8_t> data, HandlerInterface* handler, 3593a4c0abSBrandon Kim const std::string& biosSettingPath = "/run/oem_bios_setting"); 36*e8929699SBrandon Kim Resp writeBiosSetting( 37*e8929699SBrandon Kim std::span<const uint8_t> data, HandlerInterface* handler, 38*e8929699SBrandon Kim const std::string& biosSettingPath = "/run/oem_bios_setting"); 3993a4c0abSBrandon Kim 4093a4c0abSBrandon Kim } // namespace ipmi 4193a4c0abSBrandon Kim } // namespace google 42