reset: Convert individual boards to `board_reset()`
[coreboot.git] / src / include / smmstore.h
blob685a425dab3efdaf19f34929b5e083ec3add1dde
1 /*
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.
16 #ifndef _SMMSTORE_H_
17 #define _SMMSTORE_H_
19 #include <stddef.h>
20 #include <stdint.h>
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 {
33 void *buf;
34 ssize_t bufsize;
37 struct smmstore_params_append {
38 void *key;
39 size_t keysize;
40 void *val;
41 size_t valsize;
44 /* SMM responder */
45 uint32_t smmstore_exec(uint8_t command, void *param);
47 /* implementation */
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);
52 #endif