2 * This file is part of the coreboot project.
4 * Copyright (C) 2018 The Chromium OS Authors. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
22 #define SMMSTORE_APM_CNT 0xed
24 #define SMMSTORE_RET_SUCCESS 0
25 #define SMMSTORE_RET_FAILURE 1
26 #define SMMSTORE_RET_UNSUPPORTED 2
28 #define SMMSTORE_CMD_CLEAR 1
29 #define SMMSTORE_CMD_READ 2
30 #define SMMSTORE_CMD_APPEND 3
32 struct smmstore_params_read
{
37 struct smmstore_params_append
{
45 uint32_t smmstore_exec(uint8_t command
, void *param
);
48 int smmstore_read_region(void *buf
, ssize_t
*bufsize
);
49 int smmstore_append_data(void *key
, uint32_t key_sz
,
50 void *value
, uint32_t value_sz
);
51 int smmstore_clear_region(void);