summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/aarch64/aarch64/machdep.c7
-rw-r--r--sys/arch/amd64/amd64/machdep.c15
-rw-r--r--sys/arch/amd64/amd64/trap.c18
3 files changed, 22 insertions, 18 deletions
diff --git a/sys/arch/aarch64/aarch64/machdep.c b/sys/arch/aarch64/aarch64/machdep.c
index a29ad7e..7c21e62 100644
--- a/sys/arch/aarch64/aarch64/machdep.c
+++ b/sys/arch/aarch64/aarch64/machdep.c
@@ -42,6 +42,13 @@ cpu_startup(struct cpu_info *ci)
}
void
+cpu_halt_others(void)
+{
+ /* TODO: STUB */
+ return;
+}
+
+void
serial_init(void)
{
/* TODO: STUB */
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 07d6cdd..4a885fa 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -174,6 +174,21 @@ cpu_halt_all(void)
for (;;);
}
+/*
+ * Same as cpu_halt_all() but for all other
+ * cores but ourselves.
+ */
+void
+cpu_halt_others(void)
+{
+ if (rdmsr(IA32_GS_BASE) == 0) {
+ __ASMV("cli; hlt");
+ }
+
+ /* Send IPI to all cores */
+ lapic_send_ipi(0, IPI_SHORTHAND_OTHERS, halt_vector);
+}
+
void
serial_init(void)
{
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index 9a3a7ba..6492a29 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -120,20 +120,6 @@ trap_user(struct trapframe *tf)
dispatch_signals(td);
}
-static void
-trap_quirks(struct cpu_info *ci)
-{
- static uint8_t count;
-
- if (ISSET(ci->irq_mask, CPU_IRQ(1)) && count < 1) {
- ++count;
- pr_error("detected buggy i8042\n");
- pr_error("applying I8042_HOSTILE quirk\n");
- i8042_quirk(I8042_HOSTILE);
- return;
- }
-}
-
void
trap_syscall(struct trapframe *tf)
{
@@ -155,8 +141,6 @@ trap_syscall(struct trapframe *tf)
void
trap_handler(struct trapframe *tf)
{
- struct cpu_info *ci;
-
splraise(IPL_HIGH);
if (tf->trapno >= NELEM(trap_type)) {
@@ -164,8 +148,6 @@ trap_handler(struct trapframe *tf)
}
pr_error("got %s\n", trap_type[tf->trapno]);
- ci = this_cpu();
- trap_quirks(ci);
/* Handle traps from userland */
if (ISSET(tf->cs, 3)) {