blob: ae4d888dce7a3f94d1498d808e1b580979ea49c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/* Copyright 2013-2014 IBM Corp.
*
* 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 __FSP_SYSPARAM_H
#define __FSP_SYSPARAM_H
/* System parameter numbers used in the protocol
*
* these are the only ones we care about right now
*/
#define SYS_PARAM_SURV 0xf0000001
#define SYS_PARAM_HMC_MANAGED 0xf0000003
#define SYS_PARAM_FLASH_POLICY 0xf0000012
#define SYS_PARAM_NEED_HMC 0xf0000016
#define SYS_PARAM_FW_LICENSE 0xf000001d
#define SYS_PARAM_WWPN 0xf0000023
#define SYS_PARAM_DEF_BOOT_DEV 0xf0000024
#define SYS_PARAM_NEXT_BOOT_DEV 0xf0000025
#define SYS_PARAM_CONSOLE_SELECT 0xf0000026
/* Completion for a sysparam call. err_len is either a negative error
* code or the positive length of the returned data
*/
typedef void (*sysparam_compl_t)(uint32_t param_id, int err_len, void *data);
/* Send a sysparam query request. Operation can be synchronous or
* asynchronous:
*
* - synchronous (async_complete is NULL), the result code is either
* a negative error code or a positive returned length.
*
* - asynchronous (async_complete non NULL). The result code is 0 for
* successfully queued request or an error for an immediate error.
* A successfully queued request will complete via the completion
* callback defined above
*/
int fsp_get_sys_param(uint32_t param_id, void *buffer, uint32_t length,
sysparam_compl_t async_complete, void *comp_data);
void fsp_sysparam_init(void);
#endif /* __FSP_SYSPARAM_H */
|