blob: 087f71c7d8359c475a4b76fe33799587586b6454 [file] [log] [blame]
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __PRIVATE_CR51_INCLUDE_CR51_HOST_COMMANDS_H
#define __PRIVATE_CR51_INCLUDE_CR51_HOST_COMMANDS_H
#include <stdint.h>
/* Read/Write/Erase Hoth's copy of SKM HSS persisted to gNVRAM. */
#define EC_PRV_CMD_HOTH_SKM_HSS 0x0015
#define SKM_HSS_STRUCT_SIZE 64
enum skm_hss_op
{
SKM_HSS_READ = 0,
SKM_HSS_WRITE = 1,
SKM_HSS_DELETE = 2,
};
/* Serves as the response to SKM_HSS_READ as well as payload to SKM_HSS_WRITE.
*/
struct ec_payload_skm_hss
{
uint8_t data[SKM_HSS_STRUCT_SIZE];
} __attribute__((packed));
struct ec_request_skm_hss
{
/* The operation is one of skm_hss_op. */
uint32_t operation;
/* Choose which (0-3) HSS to operate on. */
uint32_t slot;
struct ec_payload_skm_hss payload;
} __attribute__((packed));
#endif /* __PRIVATE_CR51_INCLUDE_CR51_HOST_COMMANDS_H */