Sections.h 760 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Platform.h>
  8. #ifdef __cplusplus
  9. # include <AK/Types.h>
  10. # include <Kernel/BootInfo.h>
  11. #endif
  12. #define READONLY_AFTER_INIT __attribute__((section(".ro_after_init")))
  13. #define UNMAP_AFTER_INIT NEVER_INLINE __attribute__((section(".unmap_after_init")))
  14. #define KERNEL_PD_END (kernel_mapping_base + 0x31000000)
  15. #define KERNEL_PT1024_BASE (kernel_mapping_base + 0x3FE00000)
  16. #define KERNEL_QUICKMAP_PT (KERNEL_PT1024_BASE + 0x6000)
  17. #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000)
  18. #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000)
  19. #define USER_RANGE_CEILING (kernel_mapping_base - 0x2000000)