Difference between revisions of "Meminfo.c32"

From Syslinux Wiki
Jump to: navigation, search
m (Wiki formatting.)
m (Minor wiki formatting.)
 
Line 52: Line 52:
 
| colspan="6" | boot: meminfo.c32
 
| colspan="6" | boot: meminfo.c32
 
|-
 
|-
| colspan="6" | [[#INT_15h|INT 15h]] = f000:f859 [[#DOS_RAM|DOS RAM]]: 639K (0x9fc00) [[#INT_12h|INT 12h]]: 639K (0x9fc00)
+
| colspan="6" | [[#INT_15h|INT 15h]] = f000:f859  [[#DOS_RAM|DOS RAM]]: 639K (0x9fc00)  [[#INT_12h|INT 12h]]: 639K (0x9fc00)
 
|-
 
|-
| colspan="6" | [[#INT_15h_88|INT 15 88]]: 0xfc00 (64512K) [[#INT_15h_e801|INT 15 E801]]: 0x3c00 (15360K) 0x0300 (49152K)
+
| colspan="6" | [[#INT_15h_88|INT 15 88]]: 0xfc00 (64512K)  [[#INT_15h_e801|INT 15 E801]]: 0x3c00 (15360K) 0x0300 (49152K)
 
|- style="text-align: right; "
 
|- style="text-align: right; "
| style="background-color: yellow; color: blue; " | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 <br />1 <br />2 <br />3 <br />4 <br />5  
+
| style="background-color: yellow; color: blue; " | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<br />1<br />2<br />3<br />4<br />5
| style="background-color: lime; color: fuchsia; " | &nbsp;0000000000000000 <br />000000000009f000 <br />00000000000e8000 <br />0000000000100000 <br />0000000003ff0000 <br />00000000fffc0000  
+
| style="background-color: lime; color: fuchsia; " | &nbsp;0000000000000000<br />000000000009f000<br />00000000000e8000<br />0000000000100000<br />0000000003ff0000<br />00000000fffc0000
| style="background-color: aqua; color: red; " | &nbsp;000000000009f000 <br />0000000000001000 <br />0000000000018000 <br />0000000003ef0000 <br />0000000000010000 <br />0000000000040000  
+
| style="background-color: aqua; color: red; " | &nbsp;000000000009f000<br />0000000000001000<br />0000000000018000<br />0000000003ef0000<br />0000000000010000<br />0000000000040000
| style="background-color: blue; color: yellow; " | &nbsp;000000000009f000 <br />00000000000a0000 <br />0000000000100000 <br />0000000003ff0000 <br />0000000004000000 <br />0000000100000000  
+
| style="background-color: blue; color: yellow; " | &nbsp;000000000009f000<br />00000000000a0000<br />0000000000100000<br />0000000003ff0000<br />0000000004000000<br />0000000100000000
| style="background-color: olive; color: white; " | &nbsp;1 [-] <br />2 [-] <br />2 [-] <br />1 [-] <br />3 [-] <br />2 [-]  
+
| style="background-color: olive; color: white; " | &nbsp;1 [-]<br />2 [-]<br />2 [-]<br />1 [-]<br />3 [-]<br />2 [-]
| style="background-color: black; color: white; text-align: left; " | &nbsp;usable<br />&nbsp;reserved <br />&nbsp;reserved <br />&nbsp;usable <br />&nbsp;ACPI reclaim <br />&nbsp;reserved
+
| style="background-color: black; color: white; text-align: left; " | &nbsp;usable<br />&nbsp;reserved<br />&nbsp;reserved<br />&nbsp;usable<br />&nbsp;ACPI reclaim<br />&nbsp;reserved
 
|}
 
|}
 +
  
 
== Meaning ==
 
== Meaning ==
Line 73: Line 74:
 
{| style="text-align: left; white-space: nowrap; border: 1px dashed darkgray; font-family: monospace; " cellpadding="0" cellspacing="0" bgcolor="#f9f9f9"
 
{| style="text-align: left; white-space: nowrap; border: 1px dashed darkgray; font-family: monospace; " cellpadding="0" cellspacing="0" bgcolor="#f9f9f9"
 
|- style="text-align: right; "
 
|- style="text-align: right; "
| style="background-color: yellow; color: blue; " | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0  
+
| style="background-color: yellow; color: blue; " | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0
| style="background-color: lime; color: fuchsia; " | &nbsp;0000000000000000  
+
| style="background-color: lime; color: fuchsia; " | &nbsp;0000000000000000
| style="background-color: aqua; color: red; " | &nbsp;000000000009f000  
+
| style="background-color: aqua; color: red; " | &nbsp;000000000009f000
| style="background-color: blue; color: yellow; " | &nbsp;000000000009f000  
+
| style="background-color: blue; color: yellow; " | &nbsp;000000000009f000
| style="background-color: olive; color: white; " | &nbsp;1 [-]  
+
| style="background-color: olive; color: white; " | &nbsp;1 [-]
 
| style="background-color: black; color: white; text-align: left; " | &nbsp;usable
 
| style="background-color: black; color: white; text-align: left; " | &nbsp;usable
 
|}
 
|}
Line 113: Line 114:
 
* 2: reserved
 
* 2: reserved
 
* 3: ACPI reclaim
 
* 3: ACPI reclaim
<!-- The text "ACPI reclaim" seems to be "too long" for an output of 80 columns. -->
+
<!-- In v.6.04-pre1, the text "ACPI reclaim" seems to be "too long" for an output of 80 columns. -->
 +
<!-- The reason: 1 "x" character added to each of the 3 hex output columns. -->
 
* 4: ACPI NVS
 
* 4: ACPI NVS
 
* 5: unusable
 
* 5: unusable

Latest revision as of 07:30, 10 August 2019

Meminfo.c32 displays the range/size of various memory functions.

Example

Here's an example (with some extra formatting for clarity) from within bochs with 64 MiB of RAM.

boot: meminfo.c32
INT 15h = f000:f859  DOS RAM: 639K (0x9fc00)  INT 12h: 639K (0x9fc00)
INT 15 88: 0xfc00 (64512K)  INT 15 E801: 0x3c00 (15360K) 0x0300 (49152K)
       0
1
2
3
4
5
 0000000000000000
000000000009f000
00000000000e8000
0000000000100000
0000000003ff0000
00000000fffc0000
 000000000009f000
0000000000001000
0000000000018000
0000000003ef0000
0000000000010000
0000000000040000
 000000000009f000
00000000000a0000
0000000000100000
0000000003ff0000
0000000004000000
0000000100000000
 1 [-]
2 [-]
2 [-]
1 [-]
3 [-]
2 [-]
 usable
 reserved
 reserved
 usable
 ACPI reclaim
 reserved


Meaning

INT 15h e820

Results from INT 15h AX=e820h. This is, for the most part, the most important of all of the memory functions, as it provides a map of available memory. The information is displayed as the last few lines of the output (in this instance, 6) starting (in the example) with:

       0  0000000000000000  000000000009f000  000000000009f000  1 [-]  usable

Line numbers are printed in hex as 8 characters wide with a space prefix. Each line represents the purpose/availability, address and length/size of a block of memory.

The first 64 bit hex quantity is the start address. The second is the length/size. The third is the end address (excluding the listed byte; calculated as start plus length). The next number is decimal for the type of memory. The next column is bracketed, either a single hyphen or a hex number representing the extended attributes.

The last column is the string representation of the type:

  • 1: usable
  • 2: reserved
  • 3: ACPI reclaim
  • 4: ACPI NVS
  • 5: unusable


INT 15h

INT 15h = f000:f859  DOS RAM: 639K (0x9fc00)  INT 12h: 639K (0x9fc00)

List the segment and offset of the INT 15h handler, as read from the interrupt vector table.


DOS RAM

INT 15h = f000:f859  DOS RAM: 639K (0x9fc00)  INT 12h: 639K (0x9fc00)

It appears that this reads a value directly from memory.


INT 12h

INT 15h = f000:f859  DOS RAM: 639K (0x9fc00)  INT 12h: 639K (0x9fc00)

The results from calling INT 12h. List the available low memory (under 640k).


INT 15h 88

INT 15 88: 0xfc00 (64512K)  INT 15 E801: 0x3c00 (15360K) 0x0300 (49152K)

Results from INT 15h, AH=88h. Return the size of extended memory (total RAM in KiB as a 16 bit quantity).


INT 15h e801

INT 15 88: 0xfc00 (64512K)  INT 15 E801: 0x3c00 (15360K) 0x0300 (49152K)

Results from INT 15h AX=e801h. Extended memory size with a larger limit (superseding AH=88h). The first pair of values is the return (in CX) and size of memory between 1 MiB and 16 MiB. The second pair of values is the return (in DX) and size of memory above 16 MiB in 64 KiB pages.

References