diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-11 01:27:40 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-11 01:27:40 -0400 |
commit | 1d258c4bfeaab845b250006ed8bf3df6776b5c11 (patch) | |
tree | 863e6db51e33c1e70984c6d09d2139c8e8463043 /sys | |
parent | 26e17c070f845e4d93bff080eead9f5d22253319 (diff) |
kernel/amd64: bus: Move MMIO_OFFSET to bus.h
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/bus_machdep.c | 8 | ||||
-rw-r--r-- | sys/include/arch/amd64/bus.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/bus_machdep.c b/sys/arch/amd64/amd64/bus_machdep.c index 3d4b302..33dc7c4 100644 --- a/sys/arch/amd64/amd64/bus_machdep.c +++ b/sys/arch/amd64/amd64/bus_machdep.c @@ -36,14 +36,6 @@ #include <vm/pmap.h> /* - * Hyra assumes that the bootloader uses PDE[256] for some - * higher half mappings. To avoid conflicts with those mappings, - * this offset is used to start device memory at PDE[257]. This - * will give us more than enough space. - */ -#define MMIO_OFFSET (VM_HIGHER_HALF + 0x8000000000) - -/* * Map a physical device address into the kernel address * space. * diff --git a/sys/include/arch/amd64/bus.h b/sys/include/arch/amd64/bus.h index 8f9bc39..b9d3362 100644 --- a/sys/include/arch/amd64/bus.h +++ b/sys/include/arch/amd64/bus.h @@ -32,6 +32,14 @@ #include <sys/types.h> +/* + * Hyra assumes that the bootloader uses PDE[256] for some + * higher half mappings. To avoid conflicts with those mappings, + * this offset is used to start device memory at PDE[257]. This + * will give us more than enough space. + */ +#define MMIO_OFFSET (VM_HIGHER_HALF + 0x8000000000) + typedef uint64_t bus_addr_t; int bus_map(bus_addr_t addr, size_t size, int flags, void **vap); |