diff options
author | Joel Stanley <joel@jms.id.au> | 2015-09-15 12:40:06 +0930 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-09-30 20:59:32 +1000 |
commit | 308f4889524576ca779add4756d83bb95b351af9 (patch) | |
tree | 11f94acc3da56580a068a7b5d006562493155e38 | |
parent | a667be78eb3865cd444d5a19be3378f3b073da15 (diff) | |
download | skiboot-308f4889524576ca779add4756d83bb95b351af9.zip skiboot-308f4889524576ca779add4756d83bb95b351af9.tar.gz skiboot-308f4889524576ca779add4756d83bb95b351af9.tar.bz2 |
Add opal_boot_complete to debug descriptor
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.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[stewart@linux.vnet.ibm.com: use real bit field rather than C bitfield]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/init.c | 3 | ||||
-rw-r--r-- | include/skiboot.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/init.c b/core/init.c index 7baca0d..7ae4dee 100644 --- a/core/init.c +++ b/core/init.c @@ -57,6 +57,7 @@ void skiboot_gcov_done(void); struct debug_descriptor debug_descriptor = { .eye_catcher = "OPALdbug", .version = DEBUG_DESC_VERSION, + .state_flags = 0, .memcons_phys = (uint64_t)&memcons, .trace_mask = 0, /* All traces disabled by default */ .console_log_levels = (PR_DEBUG << 4) | PR_NOTICE, @@ -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.state_flags |= OPAL_BOOT_COMPLETE; + 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..4eec6db 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -56,6 +56,7 @@ static inline bool is_rodata(const void *p) return ((const char *)p >= __rodata_start && (const char *)p < __rodata_end); } +#define OPAL_BOOT_COMPLETE 0x1 /* Debug descriptor. This structure is pointed to by the word at offset * 0x80 in the sapphire binary */ @@ -65,7 +66,7 @@ struct debug_descriptor { u32 version; u8 console_log_levels; /* high 4 bits in memory, * low 4 bits driver (e.g. uart). */ - u8 reserved1; + u8 state_flags; /* various state flags - OPAL_BOOT_COMPLETE etc */ u16 reserved2; u32 reserved[2]; |