Commit dec12943 authored by Jesse Barnes's avatar Jesse Barnes Committed by Tony Luck

[IA64] fix early SAL init for sn2

sn2 does early initialization of the SAL so it can use it for early console
support.  Unfortunately, the loop to find the SAL entry point was buggy so
when we tried out new EFI and SAL system table layouts, the loop didn't
terminate.  Here's the fix (doh!, use two different loop counters instead of
one and just return if we find the SAL entry point).
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 46d3fb56
......@@ -163,13 +163,12 @@ static int __init pxm_to_nasid(int pxm)
void __init early_sn_setup(void)
{
void ia64_sal_handler_init(void *entry_point, void *gpval);
efi_system_table_t *efi_systab;
efi_config_table_t *config_tables;
struct ia64_sal_systab *sal_systab;
struct ia64_sal_desc_entry_point *ep;
char *p;
int i;
int i, j;
/*
* Parse enough of the SAL tables to locate the SAL entry point. Since, console
......@@ -185,19 +184,21 @@ void __init early_sn_setup(void)
0) {
sal_systab = __va(config_tables[i].table);
p = (char *)(sal_systab + 1);
for (i = 0; i < sal_systab->entry_count; i++) {
for (j = 0; j < sal_systab->entry_count; j++) {
if (*p == SAL_DESC_ENTRY_POINT) {
ep = (struct ia64_sal_desc_entry_point
*)p;
ia64_sal_handler_init(__va
(ep->sal_proc),
__va(ep->gp));
break;
return;
}
p += SAL_DESC_SIZE(*p);
}
}
}
/* Uh-oh, SAL not available?? */
printk(KERN_ERR "failed to find SAL entry point\n");
}
extern int platform_intr_list[];
......
......@@ -833,6 +833,8 @@ extern int ia64_sal_oemcall_nolock(struct ia64_sal_retval *, u64, u64, u64,
extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64,
u64, u64, u64, u64, u64);
extern void ia64_sal_handler_init(void *entry_point, void *gpval);
#endif /* __ASSEMBLY__ */
#endif /* _ASM_IA64_SAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment