[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] Change in haiku[master]: headers: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelExpo
From:       Gerrit <review () review ! haiku-os ! org>
Date:       2020-02-29 23:26:20
Message-ID: gerrit.1583018778000.I7ac00a120ab44fbc110bc858dfd87d69d0061135 () review ! haiku-os ! org
[Download RAW message or body]

From waddlesplash <waddlesplash@gmail=2Ecom>:

waddlesplash has uploaded th=
is change for review=2E ( https://review=2Ehaiku-os=2Eorg/c/haiku/+/2294 )
=


Change subject: headers: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelEx=
port=2Eh=2E
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=
=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E

h=
eaders: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelExport=2Eh=2E

There =
is no good reason to put them in a private header=2E
No functional change (=
but drivers now have access
to these constants=2E)
---
M headers/os/drivers=
/KernelExport=2Eh
M headers/private/system/vm_defs=2Eh
2 files changed, 2 i=
nsertions(+), 8 deletions(-)



  git pull ssh://git=2Ehaiku-os=2Eorg:22/ha=
iku refs/changes/94/2294/1

diff --git a/headers/os/drivers/KernelExport=2E=
h b/headers/os/drivers/KernelExport=2Eh
index 27dd312=2E=2E39ef35e 100644
-=
-- a/headers/os/drivers/KernelExport=2Eh
+++ b/headers/os/drivers/KernelExp=
ort=2Eh
@@ -113,6 +113,8 @@
 /* area protection flags for the kernel */
 #d=
efine 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=2Eh b/headers/private/system/vm_defs=2Eh
ind=
ex 9ca3061=2E=2Efa31828 100644
--- a/headers/private/system/vm_defs=2Eh
+++=
 b/headers/private/system/vm_defs=2Eh
@@ -11,14 +11,6 @@
 #include <OS=2Eh>=

 
 
-// additional protection flags
-// Note: the VM probably won't suppor=
t all combinations - it will try
-// its best, but create_area() will fail =
if it has to=2E
-// Of course, the exact behaviour will be documented somew=
here=2E=2E=2E
-
-#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 \

-- 
To view,=
 visit https://review=2Ehaiku-os=2Eorg/c/haiku/+/2294
To unsubscribe, or fo=
r help writing mail filters, visit https://review=2Ehaiku-os=2Eorg/settings=


Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I7ac00a120a=
b44fbc110bc858dfd87d69d0061135
Gerrit-Change-Number: 2294
Gerrit-PatchSet: =
1
Gerrit-Owner: waddlesplash <waddlesplash@gmail=2Ecom>
Gerrit-MessageType:=
 newchange

[Attachment #3 (text/html)]

<p>waddlesplash has uploaded this change for <strong>review</strong>.</p><p><a \
href="https://review.haiku-os.org/c/haiku/+/2294">View Change</a></p><pre \
style="font-family: monospace,monospace; white-space: pre-wrap;">headers: Move \
B_KERNEL_{EXECUTE,STACK}_AREA into KernelExport.h.<br><br>There is no good reason to \
put them in a private header.<br>No functional change (but drivers now have \
access<br>to these constants.)<br>---<br>M headers/os/drivers/KernelExport.h<br>M \
headers/private/system/vm_defs.h<br>2 files changed, 2 insertions(+), 8 \
deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: \
pre-wrap;">git pull ssh://git.haiku-os.org:22/haiku refs/changes/94/2294/1</pre><pre \
style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git \
a/headers/os/drivers/KernelExport.h \
b/headers/os/drivers/KernelExport.h</span><br><span>index 27dd312..39ef35e \
100644</span><br><span>--- a/headers/os/drivers/KernelExport.h</span><br><span>+++ \
b/headers/os/drivers/KernelExport.h</span><br><span>@@ -113,6 +113,8 \
@@</span><br><span> /* area protection flags for the kernel */</span><br><span> \
#define B_KERNEL_READ_AREA			(1 &lt;&lt; 4)</span><br><span> #define \
B_KERNEL_WRITE_AREA			(1 &lt;&lt; 5)</span><br><span style="color: hsl(120, 100%, \
40%);">+#define B_KERNEL_EXECUTE_AREA		(1 &lt;&lt; 6)</span><br><span style="color: \
hsl(120, 100%, 40%);">+#define B_KERNEL_STACK_AREA			(1 &lt;&lt; 7)</span><br><span> \
</span><br><span> /* MTR attributes for mapping physical memory (Intel Architecture \
only) */</span><br><span> // TODO: rename those to something more \
meaningful</span><br><span>diff --git a/headers/private/system/vm_defs.h \
b/headers/private/system/vm_defs.h</span><br><span>index 9ca3061..fa31828 \
100644</span><br><span>--- a/headers/private/system/vm_defs.h</span><br><span>+++ \
b/headers/private/system/vm_defs.h</span><br><span>@@ -11,14 +11,6 \
@@</span><br><span> #include &lt;OS.h&gt;</span><br><span> </span><br><span> \
</span><br><span style="color: hsl(0, 100%, 40%);">-// additional protection \
flags</span><br><span style="color: hsl(0, 100%, 40%);">-// Note: the VM probably \
won&#39;t support all combinations - it will try</span><br><span style="color: hsl(0, \
100%, 40%);">-// its best, but create_area() will fail if it has to.</span><br><span \
style="color: hsl(0, 100%, 40%);">-// Of course, the exact behaviour will be \
documented somewhere...</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#define \
B_KERNEL_EXECUTE_AREA	0x40</span><br><span style="color: hsl(0, 100%, 40%);">-#define \
B_KERNEL_STACK_AREA		0x80</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span> #define B_USER_PROTECTION \</span><br><span> 	(B_READ_AREA \
| B_WRITE_AREA | B_EXECUTE_AREA | B_STACK_AREA)</span><br><span> #define \
B_KERNEL_PROTECTION \</span><br><span></span><br></pre><p>To view, visit <a \
href="https://review.haiku-os.org/c/haiku/+/2294">change 2294</a>. To unsubscribe, or \
for help writing mail filters, visit <a \
href="https://review.haiku-os.org/settings">settings</a>.</p><div itemscope \
itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" \
itemtype="http://schema.org/ViewAction"><link itemprop="url" \
href="https://review.haiku-os.org/c/haiku/+/2294"/><meta itemprop="name" \
content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: haiku </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: \
I7ac00a120ab44fbc110bc858dfd87d69d0061135 </div> <div style="display:none"> \
Gerrit-Change-Number: 2294 </div> <div style="display:none"> Gerrit-PatchSet: 1 \
</div> <div style="display:none"> Gerrit-Owner: waddlesplash \
&lt;waddlesplash@gmail.com&gt; </div> <div style="display:none"> Gerrit-MessageType: \
newchange </div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic