1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

Merge branch 'devel' of github.com:RWTH-OS/HermitCore into devel

This commit is contained in:
Stefan Lankes 2017-06-15 00:11:48 +02:00
commit e4d5236fe4
4 changed files with 15 additions and 21 deletions

View file

@ -1033,24 +1033,6 @@ int apic_send_ipi(uint64_t dest, uint8_t irq)
return 0;
}
void wakeup_core(uint32_t core_id)
{
// if mwait is available, an IPI isn't required to wakeup the core
if (has_mwait())
return;
// no self IPI required
if (core_id == CORE_ID)
return;
// no IPI required if core is offline
if (!online[core_id])
return;
LOG_DEBUG("wakeup core %d\n", core_id);
apic_send_ipi(core_id, 83+32);
}
static void apic_err_handler(struct state *s)
{
LOG_ERROR("Got APIC error 0x%x\n", lapic_read(APIC_ESR));

View file

@ -225,7 +225,7 @@ static void arch_fault_handler(struct state *s)
else
LOG_WARNING("Unknown exception %d", s->int_no);
LOG_ERROR(" Exception (%d) on core %d at %#x:%#lx, fs = %#lx, gs = %#lx, error code = 0x%#lx, task id = %u, rflags = %#x\n",
LOG_ERROR(" Exception (%d) on core %d at %#x:%#lx, fs = %#lx, gs = %#lx, error code = %#lx, task id = %u, rflags = %#x\n",
s->int_no, CORE_ID, s->cs, s->rip, s->fs, s->gs, s->error, per_core(current_task)->id, s->rflags);
LOG_ERROR("rax %#lx, rbx %#lx, rcx %#lx, rdx %#lx, rbp, %#lx, rsp %#lx rdi %#lx, rsi %#lx, r8 %#lx, r9 %#lx, r10 %#lx, r11 %#lx, r12 %#lx, r13 %#lx, r14 %#lx, r15 %#lx\n",
s->rax, s->rbx, s->rcx, s->rdx, s->rbp, s->rsp, s->rdi, s->rsi, s->r8, s->r9, s->r10, s->r11, s->r12, s->r13, s->r14, s->r15);

View file

@ -207,3 +207,17 @@ void wait_for_task(void)
mwait(0x2 /* 0x2 = c3, 0xF = c0 */, 1 /* break on interrupt flag */);
}
}
void wakeup_core(uint32_t core_id)
{
// if mwait is available, an IPI isn't required to wakeup the core
if (has_mwait())
return;
// no self IPI required
if (core_id == CORE_ID)
return;
LOG_DEBUG("wakeup core %d\n", core_id);
apic_send_ipi(core_id, 83+32);
}

View file

@ -686,8 +686,6 @@ err_t mmnif_init(struct netif *netif)
/* maximum transfer unit */
netif->mtu = 1500;
/* broadcast capability, keep all default flags */
//netif->flags |= NETIF_FLAG_BROADCAST;
/* set link up */
netif->flags |= NETIF_FLAG_LINK_UP;