diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-30 20:48:26 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-30 20:48:26 +0200 |
| commit | 6f052e236715846b1a14f9fe59f89346efb809e6 (patch) | |
| tree | c1bbca5a063c428f65c46b34aaf4dbf47e61c213 /include/apos/dev.h | |
| parent | 4f4d9fdc89c27aa3346467a24b621954f4564d3b (diff) | |
| download | kmi-6f052e236715846b1a14f9fe59f89346efb809e6.tar.gz kmi-6f052e236715846b1a14f9fe59f89346efb809e6.zip | |
Add initial version of device memory mapping
Diffstat (limited to 'include/apos/dev.h')
| -rw-r--r-- | include/apos/dev.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/apos/dev.h b/include/apos/dev.h new file mode 100644 index 0000000..1e710a1 --- /dev/null +++ b/include/apos/dev.h @@ -0,0 +1,16 @@ +#ifndef APOS_DEV_H +#define APOS_DEV_H + +#include <apos/types.h> +#include <apos/vmem.h> + +extern pm_t __pre_base; +extern pm_t __pre_top; +extern pm_t __post_base; +extern pm_t __post_top; + +void init_devmem(pm_t ram_base, pm_t ram_top); +vm_t alloc_devmem(struct tcb *t, pm_t dev_start, size_t bytes, uint8_t flags); +void free_devmem(struct tcb *t, vm_t dev_start); + +#endif /* APOS_DEV_H */ |
