mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Initialize interrupt controller early on.
This commit is contained in:
parent
c3f7e882dc
commit
d3e24a4579
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203510
@ -101,6 +101,22 @@ platform_cpu_init()
|
||||
/* Nothing special */
|
||||
}
|
||||
|
||||
static void
|
||||
sb_intr_init(int cpuid)
|
||||
{
|
||||
int intrnum, intsrc;
|
||||
|
||||
/*
|
||||
* Disable all sources to the interrupt mapper and setup the mapping
|
||||
* between an interrupt source and the mips hard interrupt number.
|
||||
*/
|
||||
for (intsrc = 0; intsrc < NUM_INTSRC; ++intsrc) {
|
||||
intrnum = sb_route_intsrc(intsrc);
|
||||
sb_disable_intsrc(cpuid, intsrc);
|
||||
sb_write_intmap(cpuid, intsrc, intrnum);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
mips_init(void)
|
||||
{
|
||||
@ -279,6 +295,8 @@ platform_start(__register_t a0, __register_t a1, __register_t a2,
|
||||
memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata);
|
||||
mips_postboot_fixup();
|
||||
|
||||
sb_intr_init(0);
|
||||
|
||||
/* Initialize pcpu stuff */
|
||||
mips_pcpu0_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user