aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2017-05-26 14:37:05 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-08 17:24:10 +1000
commita0811f87b84e71c7314d0fd92c34e9715b400817 (patch)
tree4787af3a3f2dcf3f3267b3ed056a8d7ed5f992fb /include
parent9e888546f1ec322ac74b1e58b670d294ae3ea4fc (diff)
downloadskiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.zip
skiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.tar.gz
skiboot-a0811f87b84e71c7314d0fd92c34e9715b400817.tar.bz2
SBE: Add passthrough command support
SBE sends passthrough command. We have to capture this interrupt and send event to HBRT via opal-prd (user space daemon). This patch adds minimal SBE code to capture SBE interrupt and send event to opal-prd. Next patch will add opal-prd (user space) support. CC: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/opal-api.h4
-rw-r--r--include/sbe-p9.h34
-rw-r--r--include/skiboot.h1
3 files changed, 39 insertions, 0 deletions
diff --git a/include/opal-api.h b/include/opal-api.h
index 4d5b1eb..37af5f7 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1032,6 +1032,7 @@ enum opal_prd_msg_type {
OPAL_PRD_MSG_TYPE_FIRMWARE_REQUEST, /* HBRT --> OPAL */
OPAL_PRD_MSG_TYPE_FIRMWARE_RESPONSE, /* HBRT <-- OPAL */
OPAL_PRD_MSG_TYPE_FIRMWARE_NOTIFY, /* HBRT <-- OPAL */
+ OPAL_PRD_MSG_TYPE_SBE_PASSTHROUGH, /* HBRT <-- OPAL */
};
struct opal_prd_msg_header {
@@ -1076,6 +1077,9 @@ struct opal_prd_msg {
__be64 len;
char data[];
} fw_notify;
+ struct {
+ __be64 chip;
+ } sbe_passthrough;
};
};
diff --git a/include/sbe-p9.h b/include/sbe-p9.h
new file mode 100644
index 0000000..cca2100
--- /dev/null
+++ b/include/sbe-p9.h
@@ -0,0 +1,34 @@
+/* Copyright 2017 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 __SBE_P9_H
+#define __SBE_P9_H
+
+#include <bitutils.h>
+#include <ccan/list/list.h>
+#include <ccan/short_types/short_types.h>
+
+#define PSU_HOST_DOORBELL_REG_RW 0x000D0063
+#define PSU_HOST_DOORBELL_REG_AND 0x000D0064
+#define PSU_HOST_DOORBELL_REG_OR 0x000D0065
+
+#define SBE_HOST_PASSTHROUGH PPC_BIT(4)
+#define SBE_HOST_RESPONSE_CLEAR 0x00
+
+/* SBE interrupt */
+extern void sbe_interrupt(uint32_t chip_id);
+
+#endif /* __SBE_P9_H */
diff --git a/include/skiboot.h b/include/skiboot.h
index 5c8b0c8..5790f7e 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -277,6 +277,7 @@ extern void occ_pnor_set_owner(enum pnor_owner owner);
extern void prd_psi_interrupt(uint32_t proc);
extern void prd_tmgt_interrupt(uint32_t proc);
extern void prd_occ_reset(uint32_t proc);
+extern void prd_sbe_passthrough(uint32_t proc);
extern void prd_init(void);
extern void prd_register_reserved_memory(void);