diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/attrs.h | 1 | ||||
| -rw-r--r-- | include/apos/vmem.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/apos/attrs.h b/include/apos/attrs.h index 469b7bd..64ec27d 100644 --- a/include/apos/attrs.h +++ b/include/apos/attrs.h @@ -8,5 +8,6 @@ #define __weak __attribute__((weak)) #define __main __section(".kernel.start") __noinline +#define __init __section(".init.start") __noinline #endif /* APOS_COMPILER_ATTRIBUTES_H */ diff --git a/include/apos/vmem.h b/include/apos/vmem.h index daa9d10..38432ee 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -26,7 +26,8 @@ struct sp_mem { #define mem_container(ptr)\ container_of(ptr, struct sp_mem, sp_n) - +#define __va(x) (((char *)(x)) + VM_DMAP - RAM_BASE) +#define __pa(x) (((char *)(x)) + RAM_BASE - VM_DMAP) /* general overview of the different functions: * (un)map_vmem: map one known page of physical memory to one known page of |
