Can anyone tell me how can i get/probe the size of core memory larger than 64MB?
CMOS and 15h report no more than 64MB.
size of large memory
RE:size of large memory
1. Call INT 15h AX=E820h. If that doesn't work,
2. Call INT 15h AX=E801h. If that doesn't work,
3. Call INT 15h AH=88h. If that doesn't work,
4. Read memory sizes from CMOS
For methods 2 and 3, get conventional memory size with INT 12h or by reading memory location 0x413
Or, boot your OS with GRUB, and get the memory sizes (or memory map) from GRUB.
2. Call INT 15h AX=E801h. If that doesn't work,
3. Call INT 15h AH=88h. If that doesn't work,
4. Read memory sizes from CMOS
For methods 2 and 3, get conventional memory size with INT 12h or by reading memory location 0x413
Or, boot your OS with GRUB, and get the memory sizes (or memory map) from GRUB.
RE:size of large memory
Could you give some C-code example on how to call these INT's? Or read from CMOS.
RE:size of large memory
I don't know of any OS that calls these interrupts from C. Some of the interrupts return status information in the carry bit, which is difficult to handle from C.
The interrupts run in 16-bit mode, so you need a 16-bit C compiler, or a virtual-8086 mode monitor, or you must switch to real mode before calling the interrupt, then switch back to protected mode when done. All of this is very ugly, which is a good reason to let GRUB do it for you. (GRUB calls these interrupts from file STAGE2/ASM.S, which is asm code.)
If you're interested, here is some NASM code that calls these interrupts:
http://my.execpc.com/~geezer/osd/boot/biosmem.asm
The interrupts run in 16-bit mode, so you need a 16-bit C compiler, or a virtual-8086 mode monitor, or you must switch to real mode before calling the interrupt, then switch back to protected mode when done. All of this is very ugly, which is a good reason to let GRUB do it for you. (GRUB calls these interrupts from file STAGE2/ASM.S, which is asm code.)
If you're interested, here is some NASM code that calls these interrupts:
http://my.execpc.com/~geezer/osd/boot/biosmem.asm