Rename B_MTR_* constants to "something more meaningful".

The names chosen (e.g. "B_UNCACHED_MEMORY") follow the existing naming
conventions for memory-related constants, of putting the type at the end
of the name: B_KERNEL_BLOCK_ADDRESS, B_FULL_LOCK, B_READ_AREA, etc.

Resolves a very old TODO. No functional change intended.

Change-Id: I31491f6b3abc1e95f915aa302b9f2fb2af14774c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8316
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2024-09-19 16:43:24 +00:00
committed by waddlesplash
parent e323bc248c
commit 5c1f231967
33 changed files with 108 additions and 109 deletions
+8 -9
View File
@@ -114,21 +114,20 @@ typedef struct {
/* address specifications for mapping physical memory */
#define B_ANY_KERNEL_BLOCK_ADDRESS (B_ANY_KERNEL_ADDRESS + 1)
/* memory types for physical memory */
#define B_UNCACHED_MEMORY (1 << 28)
#define B_WRITE_COMBINING_MEMORY (2 << 28)
#define B_WRITE_THROUGH_MEMORY (3 << 28)
#define B_WRITE_PROTECTED_MEMORY (4 << 28)
#define B_WRITE_BACK_MEMORY (5 << 28)
#define B_MEMORY_TYPE_MASK (0xf0000000)
/* 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
#define B_MTR_UC 0x10000000
#define B_MTR_WC 0x20000000
#define B_MTR_WT 0x30000000
#define B_MTR_WP 0x40000000
#define B_MTR_WB 0x50000000
#define B_MTR_MASK 0xf0000000
/* kernel daemon service */