From dda8e77b8e75372e94bf5f2a1bc2f646bfa3a739 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 29 Feb 2020 18:25:59 -0500 Subject: [PATCH] headers: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelExport.h. There is no good reason to put them in a private header. No functional change (but drivers now have access to these constants.) Change-Id: I7ac00a120ab44fbc110bc858dfd87d69d0061135 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2294 Reviewed-by: Adrien Destugues Reviewed-by: John Scipione --- headers/os/drivers/KernelExport.h | 2 ++ headers/private/system/vm_defs.h | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/headers/os/drivers/KernelExport.h b/headers/os/drivers/KernelExport.h index 27dd312edc..39ef35eef7 100644 --- a/headers/os/drivers/KernelExport.h +++ b/headers/os/drivers/KernelExport.h @@ -113,6 +113,8 @@ typedef struct { /* area protection flags for the kernel */ #define B_KERNEL_READ_AREA (1 << 4) #define B_KERNEL_WRITE_AREA (1 << 5) +#define B_KERNEL_EXECUTE_AREA (1 << 6) +#define B_KERNEL_STACK_AREA (1 << 7) /* MTR attributes for mapping physical memory (Intel Architecture only) */ // TODO: rename those to something more meaningful diff --git a/headers/private/system/vm_defs.h b/headers/private/system/vm_defs.h index 9ca30615af..fa318288e7 100644 --- a/headers/private/system/vm_defs.h +++ b/headers/private/system/vm_defs.h @@ -11,14 +11,6 @@ #include -// additional protection flags -// Note: the VM probably won't support all combinations - it will try -// its best, but create_area() will fail if it has to. -// Of course, the exact behaviour will be documented somewhere... - -#define B_KERNEL_EXECUTE_AREA 0x40 -#define B_KERNEL_STACK_AREA 0x80 - #define B_USER_PROTECTION \ (B_READ_AREA | B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA) #define B_KERNEL_PROTECTION \