aboutsummaryrefslogtreecommitdiff
path: root/include/fsp-sysparam.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-02 15:36:20 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-02 15:36:20 +1000
commit1d880992fd8c8457a2d990ac6622cfd58fb1b261 (patch)
treec4c843b12e96b5612c315db5a23c5da1a900618c /include/fsp-sysparam.h
downloadskiboot-1d880992fd8c8457a2d990ac6622cfd58fb1b261.zip
skiboot-1d880992fd8c8457a2d990ac6622cfd58fb1b261.tar.gz
skiboot-1d880992fd8c8457a2d990ac6622cfd58fb1b261.tar.bz2
Initial commit of Open Source release
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/fsp-sysparam.h')
-rw-r--r--include/fsp-sysparam.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/fsp-sysparam.h b/include/fsp-sysparam.h
new file mode 100644
index 0000000..1a7a472
--- /dev/null
+++ b/include/fsp-sysparam.h
@@ -0,0 +1,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
+
+
+
+/* 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 */