Commit graph

14 commits

Author SHA1 Message Date
Axel Heider
30d4fe1937 remove unnecessary brackets
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-09-27 23:09:09 +10:00
Axel Heider
138e809e72 use const qualifier
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
5ef7dd32db mention macro parameter explicitly
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Curtis Millar
3b6a63bb47 Consolidate and update virt <-> phys translation
Move all of the virtual to physical translation functions into a single
common file and use the updated constants.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-06-25 16:30:48 +10:00
Curtis Millar
fba7c896b0 Consolidate kernel virtual memory regions
Each architecture now only needs to describe the bounds of the three
memory regions: the 1:1 mapped physical memory region, the kernel ELF
region (which may or may not overlap the physical memory region) and the
device / kernel page table region.

The physical base address of the 1:1 mapped physcial memory region and
the kernel ELF region must also be specified.

The top of user addressable memory (where in the same virtual address
space as the kernel) is defined by USER_TOP.

The physic memory virtual mapping is described by PPTR_BASE and
PPTR_TOP. The base physical memory address is PADDR_BASE and is the
physical address used to map PPTR_BASE.

Don't use kernelBase when referring to the base of the 1:1 mapped
physical memory window.

The kernel ELF virtual address region is described by KERNEL_ELF_BASE
and extends until the virtual address of the symbol `ki_end` which is
created by the linker. KERNEL_ELF_PADDR_BASE is the base address of
the physical memory region used to map the kernel and is the address to
which KERNEL_ELF_BASE maps.

KERNEL_ELF_BASE and KERNEL_ELF_PADDR_BASE do not need to be aligned to a
page size boundary as they are approriately truncated during boot by the
`map_kernel_window` function.

KDEV_BASE describes the base virtual address of the kernel device region
and the region is assumed to extend to the end of virtual memory.

Note: The offset between PPTR_BASE and PADDR_BASE is used to translate
the virtual address of all untyped objects to physical addresses. This
includes device untyped objects or frame objects where the virtual
address does not fall within the 1:1 mapped physical memory region.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-05-22 12:26:13 +10:00
Qian Ge
512a0200de replacing all ifndef with pargma once
All the kernel header files now use pargma once rather than the ifndef,
as the pre-processed C files do not change while header files
are protected with pargma once. This will also solve any naming issues
caused by ifndef.
2020-03-23 11:04:46 +11:00
Gerwin Klein
79da079239 Convert license tags to SPDX identifiers
This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.
2020-03-09 13:21:49 +08:00
Anna Lyons
d0930f67de style: consistently attach return type
Add attach-return-type to astyle
2019-03-19 14:05:36 +11:00
Anna Lyons
761006e03b style: consistently align pointer with name
Run astyle with align-pointer=name
2019-03-19 14:04:54 +11:00
Anna Lyons
76faadc923 Add seL4_UserTop and move kernelBase to the arch level
- seL4_UserTop is a new constant which represents the top of virtual
memory available to user level
- this commit also rationalises several constants (USER_TOP, kernelBase)
and moves them to the arch level, such that ports only need to define
seL4_UserTop.
2018-12-12 16:24:31 +11:00
Anna Lyons
ce2c058f3d SELFOUR-607: inline remaining irq path functions 2016-08-09 16:18:34 +10:00
Anna Lyons
859091b414 SELFOUR-519: remove duplicated constants
* rename physBaseMapping to BASE_OFFSET
* because physBaseMapping was only used explicity in a few places
* move duplicated arm definions up a level
    - PPTR_TOP
    - PADDR_TOP
    - BASE_OFFSET
2016-08-05 17:08:21 +10:00
Anna Lyons
c5b6a6a58a Refactor duplicated code in hardware.h
One copy to rule them all.
2016-06-07 12:01:14 +10:00
TrusthworthySystems
91b7da8625 Release snapshot 2014-07-18 05:03:59 +10:00