[Skiboot] [PATCH 1/2] Add opal_boot_complete to debug descriptor

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Sep 15 14:57:07 AEST 2015


On 09/15/2015 08:40 AM, Joel Stanley wrote:
> This tells us when we've entered the host. First use case is knowing if
> we can can rely on host communication working, such as receiving and
> acting on an opal_msg.

Good one.. May be we can use this for FSP based system for EPOW/DPO events..

Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>

-Vasant

> 
> Signed-off-by: Joel Stanley <joel at jms.id.au>
> ---
>  core/init.c       | 3 +++
>  include/skiboot.h | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/core/init.c b/core/init.c
> index 7baca0d..d5c1779 100644
> --- a/core/init.c
> +++ b/core/init.c
> @@ -60,6 +60,7 @@ struct debug_descriptor debug_descriptor = {
>  	.memcons_phys	= (uint64_t)&memcons,
>  	.trace_mask	= 0, /* All traces disabled by default */
>  	.console_log_levels = (PR_DEBUG << 4) | PR_NOTICE,
> +	.opal_boot_complete = false,
>  };
>  
>  static bool try_load_elf64_le(struct elf_hdr *header)
> @@ -454,6 +455,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
>  	printf("INIT: Starting kernel at 0x%llx, fdt at %p (size 0x%x)\n",
>  	       kernel_entry, fdt, fdt_totalsize(fdt));
>  
> +	debug_descriptor.opal_boot_complete = true;
> +
>  	fdt_set_boot_cpuid_phys(fdt, this_cpu()->pir);
>  	if (kernel_32bit)
>  		start_kernel32(kernel_entry, fdt, mem_top);
> diff --git a/include/skiboot.h b/include/skiboot.h
> index 4b58597..c12fa67 100644
> --- a/include/skiboot.h
> +++ b/include/skiboot.h
> @@ -65,7 +65,7 @@ struct debug_descriptor {
>  	u32	version;
>  	u8	console_log_levels;	/* high 4 bits in memory,
>  					 * low 4 bits driver (e.g. uart). */
> -	u8	reserved1;
> +	bool	opal_boot_complete : 1;	/* True as we jump to host OS */
>  	u16	reserved2;
>  	u32	reserved[2];
>  
> 



More information about the Skiboot mailing list