[Skiboot] [PATCH 1/4] Move FSP specific abort() code to platform layer

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Thu Aug 20 18:20:20 AEST 2015


On 08/20/2015 12:33 PM, Vasant Hegde wrote:
> Presently abort() call sets up HID0, triggers attention and finally
> calls infinite for loop. FSP takes care of collecting required logs
> and reboots the system. This sequence is specific to FSP machine
> and it will not work on BMC based machine. Hence move FSP specific
> code to hw/fsp/fsp-attn.c.
> 

.../...

> diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
> index 68ca386..a0feb03 100644
> --- a/libc/include/stdlib.h
> +++ b/libc/include/stdlib.h
> @@ -25,11 +25,11 @@ unsigned long int strtoul(const char *nptr, char **endptr, int base);
>  long int strtol(const char *nptr, char **endptr, int base);
> 
>  int rand(void);
> -void __attribute__((noreturn)) _abort(void);
> -#define abort() do {                                           \
> -               update_sp_attn_area("abort():" __FILE__         \
> -                                   ":" stringify(__LINE__));   \
> -               _abort();                                       \
> +void __attribute__((noreturn)) _abort(const char *msg);
> +#define abort() do {					\
> +               _abort("abort():" __FILE__		\
> +		      ":" stringify(__LINE__)		\
> +		      ":" stringify(cond));		\

By mistake I added above line..  condition is not applicable in abort call
(above line). Will fix it in next iteration.

-Vasant



More information about the Skiboot mailing list