The init routine doesn't have to make sure that the IP bit of MSR is
set since the boot loader already takes care of that. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5096 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -158,24 +158,22 @@ int
|
|||||||
arch_int_init2(kernel_args *ka)
|
arch_int_init2(kernel_args *ka)
|
||||||
{
|
{
|
||||||
region_id exception_region;
|
region_id exception_region;
|
||||||
void *ex_handlers;
|
void *handlers;
|
||||||
|
|
||||||
// create a region to map the irq vector code into (physical addres 0x0)
|
// create a region to map the irq vector code into (physical address 0x0)
|
||||||
ex_handlers = (void *)ka->arch_args.exception_handlers.start;
|
handlers = (void *)ka->arch_args.exception_handlers.start;
|
||||||
exception_region = vm_create_anonymous_region(vm_get_kernel_aspace_id(), "exception_handlers",
|
exception_region = vm_create_anonymous_region(vm_get_kernel_aspace_id(), "exception_handlers",
|
||||||
&ex_handlers, REGION_ADDR_EXACT_ADDRESS,
|
&handlers, REGION_ADDR_EXACT_ADDRESS,
|
||||||
ka->arch_args.exception_handlers.size, REGION_WIRING_WIRED_ALREADY, LOCK_RW|LOCK_KERNEL);
|
ka->arch_args.exception_handlers.size,
|
||||||
|
REGION_WIRING_WIRED_ALREADY, LOCK_RW|LOCK_KERNEL);
|
||||||
if (exception_region < 0)
|
if (exception_region < 0)
|
||||||
panic("arch_int_init2: could not create exception handler region\n");
|
panic("arch_int_init2: could not create exception handler region\n");
|
||||||
|
|
||||||
dprintf("exception handlers at %p\n", ex_handlers);
|
dprintf("exception handlers at %p\n", handlers);
|
||||||
|
|
||||||
// copy the handlers into this area
|
// copy the handlers into this area
|
||||||
memcpy(ex_handlers, &__irqvec_start, ka->arch_args.exception_handlers.size);
|
memcpy(handlers, &__irqvec_start, ka->arch_args.exception_handlers.size);
|
||||||
arch_cpu_sync_icache(0, 0x3000);
|
arch_cpu_sync_icache(0, 0x1000);
|
||||||
|
|
||||||
// make sure the IP bit isn't set (putting the exceptions at 0x0)
|
|
||||||
set_msr(get_msr() & ~MSR_IP);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user