diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 16:32:05 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 16:32:05 +0200 |
| commit | be78fcb0acc665d4db8edb9cda53f6863d27dd85 (patch) | |
| tree | e9e33e9e48983f630098eedd3d931edbe86e4410 /include/arch | |
| parent | 9cc125fb3cfdc2c8ae7153b5ae0fe705980835fb (diff) | |
| download | kmi-be78fcb0acc665d4db8edb9cda53f6863d27dd85.tar.gz kmi-be78fcb0acc665d4db8edb9cda53f6863d27dd85.zip | |
Improved header dependency tree
Diffstat (limited to 'include/arch')
| -rw-r--r-- | include/arch/arch.h | 8 | ||||
| -rw-r--r-- | include/arch/cpu.h | 10 | ||||
| -rw-r--r-- | include/arch/irq.h | 9 | ||||
| -rw-r--r-- | include/arch/vmem.h | 22 |
4 files changed, 49 insertions, 0 deletions
diff --git a/include/arch/arch.h b/include/arch/arch.h new file mode 100644 index 0000000..1933555 --- /dev/null +++ b/include/arch/arch.h @@ -0,0 +1,8 @@ +#ifndef APOS_ARCH_H +#define APOS_ARCH_H + +/* functions that an arch has to provide */ + +void arch_setup(void *fdt); + +#endif /* APOS_ARCH_H */ diff --git a/include/arch/cpu.h b/include/arch/cpu.h new file mode 100644 index 0000000..c53a4d6 --- /dev/null +++ b/include/arch/cpu.h @@ -0,0 +1,10 @@ +#ifndef APOS_CPU_H +#define APOS_CPU_H + +#include <apos/types.h> +#include <cpu.h> + +id_t cpu_id(); +/* TODO: add more cpu handling functions */ + +#endif /* APOS_CPU_H */ diff --git a/include/arch/irq.h b/include/arch/irq.h new file mode 100644 index 0000000..3ce6556 --- /dev/null +++ b/include/arch/irq.h @@ -0,0 +1,9 @@ +#ifndef APOS_IRQ_H +#define APOS_IRQ_H + +void init_irq(void *fdt); +void handle_irq(); +void enable_irq(); +void disable_irq(); + +#endif /* APOS_IRQ_H */ diff --git a/include/arch/vmem.h b/include/arch/vmem.h new file mode 100644 index 0000000..8aec154 --- /dev/null +++ b/include/arch/vmem.h @@ -0,0 +1,22 @@ +#ifndef APOS_ARCH_PAGES_H +#define APOS_ARCH_PAGES_H + +#include <vmem.h> + +void map_vmem(struct vm_branch *branch, + pm_t paddr, vm_t vaddr, uint8_t flags, enum mm_order order); + +void unmap_vmem(struct vm_branch *branch, vm_t vaddr); + +int mod_vmem(struct vm_branch *branch, vm_t vaddr, pm_t paddr, uint8_t flags); +int stat_vmem(struct vm_branch *branch, vm_t vaddr, pm_t *paddr, + enum mm_order *order, uint8_t *flags); + +void flush_tlb(); +void flush_tlb_all(); + +void populate_root_branch(struct vm_branch *b); +int setup_kernel_io(struct vm_branch *b, vm_t paddr); +struct vm_branch *init_vmem(void *fdt); + +#endif /* APOS_ARCH_PAGES_H */ |
