<0|1: clear or set>
K> setperm 0x3000 U 1
0x3000: PTE_P PTE_W -> PTE_P PTE_W PTE_U
K> setperm 0x4000 W 0
0x4000: PTE_P PTE_W PTE_U -> PTE_P PTE_U
K> dumpvm
Usage: dumpvm
K> dumpvm 0x3214 0x4a32
00003210: 68 65 78 64 75 6D 70 5D 00 00 00 00
00003220: 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF
...
00004A20: D0 B8 D0 BD D1 82 D0 B5 D1 80 D1 84 D0 B5 D1 80
00004A30: D1 8C
- Once you finish this, please create a file ``.lab2-extra`` at the root of
your repository directory (under ``jos/``). We will use that file as an
indicator that you finished this extra-credit and then grade your work
accordingly.
Address space layout alternatives
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The address space layout we use in JOS is not the only one possible. An
operating system might map the kernel at low linear addresses while
leaving the *upper* part of the linear address space for user processes.
x86 kernels generally do not take this approach, however, because one of
the x86's backward-compatibility modes, known as *virtual 8086 mode*, is
"hard-wired" in the processor to use the bottom part of the linear
address space, and thus cannot be used at all if the kernel is mapped
there.
It is even possible, though much more difficult, to design the kernel so
as not to have to reserve *any* fixed portion of the processor's linear
or virtual address space for itself, but instead effectively allow
user-level processes unrestricted use of the *entire* 4GB of
virtual address space - while still fully protecting the kernel from
these processes and protecting different processes from each other!
**This completes the lab.** Make sure you pass all of the make grade
tests and don't forget to write up your answers to the questions in
``answers-lab2.txt``.
Commit your changes (including adding ``answers-lab2.txt``) and run
``git tag lab2-final``, ``git push``, and ``git push origin --tags``
in the top directory of your lab repository to hand in your lab.
Please do not forget to create and include the file
``.lab2-extra`` in case if you finished extra-credit challenge: i.e., ``git add .lab2-extra`` before the commit.