Exercise 2: Paging, Addresses, Data
Objectives:
- Reinforce the knowlege from exercise 1
- Learn how to display page table data
- Learn how to convert a logical address to a linear
address
- Learn how to convert a linear address to a physical
address
- Learn how to display storage as ASCII, bytes,
words, and doublewords.
Startup directions:
- Start the dump formatter by typing DF_RET ..\DUMPS.162\DUMP01.DMP
- You should see the standard startup messages.
- The initial register display is what the application
registers were at the time the application (ring 3) program trapped.
- You can see these at any time by entering the
".R" command.
- Use the dump formatter to look at the dump and
answer these questions. The dump formatter is NOT case sensitive.
Note: Paging data may be displayed using the "DP" command, followed
by the address.
Note: The dump process DESTROYS the first entry of the page directory.
You will get quite confused if you try to follow the hardware method to
look at paging information for addresses 0 - 3FFFFF. If you must, use the
'.N' command to find "savepage", which will tell you the physical address
of the page table for that address range.
This may well be the last time you use a physical address in an OS/2 debugging
session. With the notable exceptions of physical memory management and physical
device drivers, OS/2 is almost completely unaware of physical addresses.
The 32-bit virtual address, also called a linear address, and a 'flat'
address, is what is used in general throughout OS/2.
Assuming these registers, answer the following questions:
eax=0000c8cf ebx=00002910 ecx=000000df edx=00000000 esi=00000030 edi=00000060
eip=000000be esp=000014be ebp=000014e6 iopl=2 rf -- -- nv up ei pl zr na pe nc
cs=000f ss=001f ds=001f es=0017 fs=150b gs=0000 cr2=00000000 cr3=001a7000
- What are the base and limit fields for selector
000F? (the base is the linear address...)
- How many 4k pages are in this segment? Hint:
Look closely at the limit field.
- How many physical pages are allocated for the
virtual memory segment starting at F:0?
Hint: DP
0F:0 or DP %10000
- Why are the above two answers different?
- What is the physical address of the data at F:0?
Observation: You now have three ways to address
the data.
a.
Real or V86 (&selector:offset)
b.
Logical (#selector:offset)
c.
d.
We will now display
the same storage many ways, to confirm we know how.