aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-12-08 22:22:45 +1000
committerOliver O'Halloran <oohall@gmail.com>2019-12-16 14:50:56 +1100
commit1b9a449d5d48de9520befd09892d85d6aec7ba62 (patch)
treed8fb15c0217cf0328a8afeb90cb03bac1dbbc8db /hw/ipmi
parent0ed09ec18e3f856d5456908c4abe3649a025ea12 (diff)
downloadskiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.zip
skiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.tar.gz
skiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.tar.bz2
opal-api: add endian conversions to most opal calls
This adds missing endian conversions to most calls, sufficient at least to handle calls from a kernel booting on mambo. Subsystems requiring more extensive changes (e.g., xive) will be done with individual changes. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/ipmi')
-rw-r--r--hw/ipmi/ipmi-rtc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/ipmi/ipmi-rtc.c b/hw/ipmi/ipmi-rtc.c
index deb4add..ad98f21 100644
--- a/hw/ipmi/ipmi-rtc.c
+++ b/hw/ipmi/ipmi-rtc.c
@@ -62,12 +62,13 @@ static int64_t ipmi_set_sel_time(uint32_t _tv)
return ipmi_queue_msg(msg);
}
-static int64_t ipmi_opal_rtc_read(uint32_t *y_m_d,
- uint64_t *h_m_s_m)
+static int64_t ipmi_opal_rtc_read(__be32 *__ymd, __be64 *__hmsm)
{
int ret = 0;
+ uint32_t ymd;
+ uint64_t hmsm;
- if (!y_m_d || !h_m_s_m)
+ if (!__ymd || !__hmsm)
return OPAL_PARAMETER;
switch(time_status) {
@@ -83,7 +84,9 @@ static int64_t ipmi_opal_rtc_read(uint32_t *y_m_d,
break;
case updated:
- rtc_cache_get_datetime(y_m_d, h_m_s_m);
+ rtc_cache_get_datetime(&ymd, &hmsm);
+ *__ymd = cpu_to_be32(ymd);
+ *__hmsm = cpu_to_be64(hmsm);
time_status = idle;
ret = OPAL_SUCCESS;
break;