[Skiboot] [PATCH v3 2/3] debug_descriptor: Claim reserved field for host kernel log buffer

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu May 31 14:46:53 AEST 2018


On Thu, 2018-05-31 at 13:59 +0930, Joel Stanley wrote:
> This will be used by the dump region opal call.
> 
> This bumps the version of the debug descriptor to indicate this field is
> now in use. However, any users of the descriptor should remain
> compatible as the non-reserved fields behave in the same way as
> previously.
> 
> Signed-off-by: Joel Stanley <joel at jms.id.au>
> ---
>  include/skiboot.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/skiboot.h b/include/skiboot.h
> index b4bdf37795dd..9a49bfca74a5 100644
> --- a/include/skiboot.h
> +++ b/include/skiboot.h
> @@ -69,13 +69,13 @@ static inline bool is_rodata(const void *p)
>   */
>  struct debug_descriptor {
>         u8      eye_catcher[8]; /* "OPALdbug" */
> -#define DEBUG_DESC_VERSION     1
> +#define DEBUG_DESC_VERSION     2
>         u32     version;
>         u8      console_log_levels;     /* high 4 bits in memory,
>                                          * low 4 bits driver (e.g. uart). */
>         u8      state_flags; /* various state flags - OPAL_BOOT_COMPLETE etc */
> -       u16     reserved2;
> -       u32     reserved[2];
> +       u16     reserved;
> +       u64     log_buf_phys;           /* Pointer to kernel log buffer */

What about passing the size of the buffer ?

Ben.
>         /* Memory console */
>         u64     memcons_phys;
> @@ -90,7 +90,7 @@ struct debug_descriptor {
>         u64     trace_phys[DEBUG_DESC_MAX_TRACES];
>         u32     trace_size[DEBUG_DESC_MAX_TRACES];
>         u32     trace_tce[DEBUG_DESC_MAX_TRACES];
> -};
> +} __packed;
>  extern struct debug_descriptor debug_descriptor;
>  
>  static inline bool opal_booting(void)


More information about the Skiboot mailing list