summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-18 16:38:42 -0400
committerIan Moffett <ian@osmora.org>2025-06-18 16:38:42 -0400
commitd14e578d268e6bd75cb410b13836a2104d02ba45 (patch)
treee045f9e72043d6eb07fd456eee11674c5ca6a9e3
parenta0e53b514961ee83b723a657b109856a16bf5362 (diff)
kernel/aarch64: Make stubs up to date
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/arch/aarch64/aarch64/machdep.c7
-rw-r--r--sys/arch/aarch64/aarch64/proc_machdep.c6
-rw-r--r--sys/arch/aarch64/aarch64/reboot.c18
-rw-r--r--sys/arch/aarch64/pci/pci_machdep.c14
-rw-r--r--sys/include/arch/aarch64/cpu.h1
5 files changed, 28 insertions, 18 deletions
diff --git a/sys/arch/aarch64/aarch64/machdep.c b/sys/arch/aarch64/aarch64/machdep.c
index 7c21e62..2a956b8 100644
--- a/sys/arch/aarch64/aarch64/machdep.c
+++ b/sys/arch/aarch64/aarch64/machdep.c
@@ -76,6 +76,13 @@ md_sync_all(void)
return 0;
}
+void
+cpu_halt_all(void)
+{
+ /* TODO: Stub */
+ for (;;);
+}
+
/*
* Get the descriptor for the currently
* running processor.
diff --git a/sys/arch/aarch64/aarch64/proc_machdep.c b/sys/arch/aarch64/aarch64/proc_machdep.c
index 97902e5..cc58af9 100644
--- a/sys/arch/aarch64/aarch64/proc_machdep.c
+++ b/sys/arch/aarch64/aarch64/proc_machdep.c
@@ -37,17 +37,17 @@
* @ip: Instruction pointer.
*/
int
-md_fork(struct proc *p, struct proc *parent, uintptr_t ip)
+md_spawn(struct proc *p, struct proc *parent, uintptr_t ip)
{
/* TODO: STUB */
return 0;
}
-void
+uintptr_t
md_td_stackinit(struct proc *td, void *stack_top, struct exec_prog *prog)
{
/* TODO: STUB */
- return;
+ return 0;
}
void
diff --git a/sys/arch/aarch64/aarch64/reboot.c b/sys/arch/aarch64/aarch64/reboot.c
index 6d82133..372012a 100644
--- a/sys/arch/aarch64/aarch64/reboot.c
+++ b/sys/arch/aarch64/aarch64/reboot.c
@@ -30,9 +30,25 @@
#include <sys/reboot.h>
#include <sys/param.h>
+/*
+ * Typically the reset vector is at address 0 but this can
+ * be remapped if the vendor is feeling silly.
+ */
+void(*g_cpu_reboot)(void) = NULL;
+
void
cpu_reboot(int method)
{
- /* TODO: STUB */
+ g_cpu_reboot();
for (;;);
}
+
+/*
+ * arg0: Method bits
+ */
+scret_t
+sys_reboot(struct syscall_args *scargs)
+{
+ cpu_reboot(scargs->arg0);
+ __builtin_unreachable();
+}
diff --git a/sys/arch/aarch64/pci/pci_machdep.c b/sys/arch/aarch64/pci/pci_machdep.c
index fa92165..8de6cc9 100644
--- a/sys/arch/aarch64/pci/pci_machdep.c
+++ b/sys/arch/aarch64/pci/pci_machdep.c
@@ -30,20 +30,6 @@
#include <sys/types.h>
#include <dev/pci/pci.h>
-pcireg_t
-pci_readl(struct pci_device *dev, uint32_t offset)
-{
- /* TODO: STUB */
- return 0;
-}
-
-void
-pci_writel(struct pci_device *dev, uint32_t offset, pcireg_t val)
-{
- /* TODO: STUB */
- return;
-}
-
/*
* Map a BAR into kernel memory.
*
diff --git a/sys/include/arch/aarch64/cpu.h b/sys/include/arch/aarch64/cpu.h
index 2f62d95..8c2d837 100644
--- a/sys/include/arch/aarch64/cpu.h
+++ b/sys/include/arch/aarch64/cpu.h
@@ -39,6 +39,7 @@ struct cpu_info {
struct cpu_info *self;
};
+__dead void cpu_halt_all(void);
void cpu_startup(struct cpu_info *ci);
void cpu_halt_others(void);