|
@@ -23,14 +23,25 @@ struct opal {
|
|
|
|
|
|
static u32 opal_con_id;
|
|
static u32 opal_con_id;
|
|
|
|
|
|
|
|
+/* see opal-wrappers.S */
|
|
int64_t opal_console_write(int64_t term_number, u64 *length, const u8 *buffer);
|
|
int64_t opal_console_write(int64_t term_number, u64 *length, const u8 *buffer);
|
|
int64_t opal_console_read(int64_t term_number, uint64_t *length, u8 *buffer);
|
|
int64_t opal_console_read(int64_t term_number, uint64_t *length, u8 *buffer);
|
|
int64_t opal_console_write_buffer_space(uint64_t term_number, uint64_t *length);
|
|
int64_t opal_console_write_buffer_space(uint64_t term_number, uint64_t *length);
|
|
int64_t opal_console_flush(uint64_t term_number);
|
|
int64_t opal_console_flush(uint64_t term_number);
|
|
int64_t opal_poll_events(uint64_t *outstanding_event_mask);
|
|
int64_t opal_poll_events(uint64_t *outstanding_event_mask);
|
|
|
|
|
|
|
|
+void opal_kentry(unsigned long fdt_addr, void *vmlinux_addr);
|
|
|
|
+
|
|
static int opal_con_open(void)
|
|
static int opal_con_open(void)
|
|
{
|
|
{
|
|
|
|
+ /*
|
|
|
|
+ * When OPAL loads the boot kernel it stashes the OPAL base and entry
|
|
|
|
+ * address in r8 and r9 so the kernel can use the OPAL console
|
|
|
|
+ * before unflattening the devicetree. While executing the wrapper will
|
|
|
|
+ * probably trash r8 and r9 so this kentry hook restores them before
|
|
|
|
+ * entering the decompressed kernel.
|
|
|
|
+ */
|
|
|
|
+ platform_ops.kentry = opal_kentry;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|