Files
oldlinux-files/Ref-docs/manual Intel386/I386Manual/S06_05.HTM
2024-02-19 00:21:47 -05:00

70 lines
3.5 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Section 6.5</title>
</head>
<body>
<b>up:</b> <a href="C06.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C06.HTM">Chapter 6 -- Protection</a><br>
<b>prev:</b> <a href="S06_04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S06_04.HTM">6.4 Page-Level Protection</a><br>
<b>next:</b> <a href="C07.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C07.HTM">Chapter 7 -- Multitasking</a>
<p>
<hr>
<p>
<h1>6.5 Combining Page and Segment Protection</h1>
When paging is enabled, the 80386 first evaluates segment protection, then evaluates page protection. If the processor detects a protection violation at either the segment or the page level, the requested operation cannot proceed; a protection exception occurs instead.
<p>For example, it is possible to define a large data segment which has some subunits that are read-only and other subunits that are read-write. In this case, the page directory (or page table) entries for the read-only subunits would have the U/S and R/W bits set to x0, indicating no write rights for all the pages described by that directory entry (or for individual pages). This technique might be used, for example, in a UNIX-like system to define a large data segment, part of which is read only (for shared data or ROMmed constants). This enables UNIX-like systems to define a &quot;flat&quot; data space as one large segment, use &quot;flat&quot; pointers to address within this &quot;flat&quot; space, yet be able to protect shared data, shared files mapped into the virtual space, and supervisor areas.
<pre>
Table 6-5. Combining Directory and Page Protection
Page Directory Entry Page Table Entry Combined Protection
U/S R/W U/S R/W U/S R/W
S-0 R-0 S-0 R-0 S x
S-0 R-0 S-0 W-1 S x
S-0 R-0 U-1 R-0 S x
S-0 R-0 U-1 W-1 S x
S-0 W-1 S-0 R-0 S x
S-0 W-1 S-0 W-1 S x
S-0 W-1 U-1 R-0 S x
S-0 W-1 U-1 W-1 S x
U-1 R-0 S-0 R-0 S x
U-1 R-0 S-0 W-1 S x
U-1 R-0 U-1 R-0 U R
U-1 R-0 U-1 W-1 U R
U-1 W-1 S-0 R-0 S x
U-1 W-1 S-0 W-1 S x
U-1 W-1 U-1 R-0 U R
U-1 W-1 U-1 W-1 U W
</pre>
<p>
<hr>
<p><em>
<h3>Note</h3>
<pre>
S -- Supervisor
R -- Read only
U -- User
W -- Read and Write
x indicates that when the combined U/S attribute is S, the R/W attribute
is not checked.
</pre>
</em>
<p>
<hr>
<p>
<hr>
<b>up:</b> <a href="C06.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C06.HTM">Chapter 6 -- Protection</a><br>
<b>prev:</b> <a href="S06_04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S06_04.HTM">6.4 Page-Level Protection</a><br>
<b>next:</b> <a href="C07.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C07.HTM">Chapter 7 -- Multitasking</a>
</body>