From: chee.hong.ang at intel.com <chee.hong.ang@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 1/3] ARM: socfpga: stratix10: Add HPS execution stage notification function
Date: Mon, 6 May 2019 22:07:21 -0700 [thread overview]
Message-ID: <1557205643-30557-2-git-send-email-chee.hong.ang@intel.com> (raw)
In-Reply-To: <1557205643-30557-1-git-send-email-chee.hong.ang@intel.com>
From: "Ang, Chee Hong" <chee.hong.ang@intel.com>
Add a new mailbox command "HPS_STAGE_NOTIFY" to notify Secure Device
Manager (SDM) on the stage of HPS code execution. In general, there
are three main code execution stages: First Stage Boot Loader (FSBL)
which is U-Boot SPL, Second Stage Boot Loader (SSBL) which is U-Boot,
and the Operating System which is Linux.
Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
---
arch/arm/mach-socfpga/include/mach/mailbox_s10.h | 7 +++++++
arch/arm/mach-socfpga/mailbox_s10.c | 6 ++++++
2 files changed, 13 insertions(+)
diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
index ae728a5..e815bdf 100644
--- a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
+++ b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
@@ -87,6 +87,12 @@ enum ALT_SDM_MBOX_RESP_CODE {
#define MBOX_QSPI_CLOSE 51
#define MBOX_QSPI_DIRECT 59
#define MBOX_REBOOT_HPS 71
+#define MBOX_HPS_STAGE_NOTIFY 93
+
+/* Defines for HPS_STAGE_NOTIFY */
+#define HPS_EXECUTION_STATE_FSBL 0
+#define HPS_EXECUTION_STATE_SSBL 1
+#define HPS_EXECUTION_STATE_OS 2
/* Mailbox registers */
#define MBOX_CIN 0 /* command valid offset */
@@ -146,6 +152,7 @@ int mbox_qspi_open(void);
#endif
int mbox_reset_cold(void);
+int mbox_hps_stage_notify(u32 execution_stage);
int mbox_get_fpga_config_status(u32 cmd);
int mbox_get_fpga_config_status_psci(u32 cmd);
#endif /* _MAILBOX_S10_H_ */
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index 4498ab5..250df84 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -390,6 +390,12 @@ int __secure mbox_get_fpga_config_status_psci(u32 cmd)
return mbox_get_fpga_config_status_common(cmd);
}
+int mbox_hps_stage_notify(u32 execution_stage)
+{
+ return mbox_send_cmd(MBOX_ID_UBOOT, MBOX_HPS_STAGE_NOTIFY,
+ MBOX_CMD_DIRECT, 1, &execution_stage, 0, 0, NULL);
+}
+
int mbox_send_cmd(u8 id, u32 cmd, u8 is_indirect, u32 len, u32 *arg,
u8 urgent, u32 *resp_buf_len, u32 *resp_buf)
{
--
2.7.4
next prev parent reply other threads:[~2019-05-07 5:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 5:07 [U-Boot] [PATCH v1 0/3] Enable HPS execution stage notification chee.hong.ang at intel.com
2019-05-07 5:07 ` chee.hong.ang at intel.com [this message]
2019-05-07 5:07 ` [U-Boot] [PATCH v1 2/3] ARM: socfpga: stratix10: To notify SDM when SPL pass control to U-Boot chee.hong.ang at intel.com
2019-05-07 5:07 ` [U-Boot] [PATCH v1 3/3] ARM: socfpga: stratix10: To notify SDM when U-Boot pass control to Linux chee.hong.ang at intel.com
2019-05-07 13:03 ` [U-Boot] [PATCH v1 0/3] Enable HPS execution stage notification Marek Vasut
2019-05-07 14:08 ` Ang, Chee Hong
2019-05-07 14:39 ` Marek Vasut
2019-05-07 16:59 ` Ang, Chee Hong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1557205643-30557-2-git-send-email-chee.hong.ang@intel.com \
--to=chee.hong.ang@intel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox