[Skiboot] [PATCH] fsp/rtc: consider TOD_RESET status as a permanent error

Cédric Le Goater clg at fr.ibm.com
Thu Oct 15 07:48:53 AEDT 2015


When the timeofday is considered INVALID by the FSP :

	System time is INVALID: 2015/10/14 20:13:53.305261

it will return a FSP_STATUS_TOD_RESET (0xA9) to any TOD read
request done by OPAL. This status does not seem to recover
after some time and stays invalid permanently. 

This is a problem for the kernel as the OPAL_RTC_READ calls
are done in loops. The consequence is that the skiroot kernel
hangs quite early in the boot looping on : 

	[9163642153,3] RTC TOD in invalid state
	[9186642687,3] RTC TOD in invalid state
	[9204379669,3] RTC TOD in invalid state
	[9226043775,3] RTC TOD in invalid state
	[9240944791,3] RTC TOD in invalid state

with other unpleasant consequences following. The system is
left unusable and it is difficult for the user to know what
is happening.

This patch changes the TOD state in OPAL as a permanent TOD
error when the time is considered invalid by the FSP. This
breaks the loops that are done in the kernel on OPAL_RTC_READ
calls and lets the boot complete.

Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---

Seen on the field after an update to 5.1.7. As of today, the FSP
stills considered the time as INVALID on the system, which gives
us an opportunity to test other possible fixes.

Anyone knows how to fix this TOD status ? I lack the specs. 

 hw/fsp/fsp-rtc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: skiboot.git/hw/fsp/fsp-rtc.c
===================================================================
--- skiboot.git.orig/hw/fsp/fsp-rtc.c
+++ skiboot.git/hw/fsp/fsp-rtc.c
@@ -172,7 +172,7 @@ static void fsp_rtc_process_read(struct
 	case FSP_STATUS_TOD_RESET:
 		log_simple_error(&e_info(OPAL_RC_RTC_TOD),
 				"RTC TOD in invalid state\n");
-		rtc_tod_state = RTC_TOD_INVALID;
+		rtc_tod_state = RTC_TOD_PERMANENT_ERROR;
 		rtc_read_request_state = RTC_READ_NO_REQUEST;
 		break;
 



More information about the Skiboot mailing list