flat assembler
Message board for the users of flat assembler.
Index
> Windows > Small C program to exclude bad RAM address? Goto page Previous 1, 2 |
Author |
|
okasvi 07 Aug 2006, 23:30
your best shot on this is to go to rootkit.com and ask there, but seriously I think it's impossible to do within win9x
|
|||
07 Aug 2006, 23:30 |
|
LocoDelAssembly 08 Aug 2006, 00:50
HAHAHAHAHAHA, http://www.ctyme.com/intr/rb-1741.htm here I read that about Windows
|
|||
08 Aug 2006, 00:50 |
|
LocoDelAssembly 08 Aug 2006, 04:12
OK, here the proof of concept. I tested it on Virtual PC and on my REAL computer (MSI K8N Planitum SLI motherboard). The screenshots are from the real computer, where it says "Memoria física (KB)" it means physical memory and "total" well, total... If you want to test it open boot.asm and press F9 on FASMW. Note that it will write on the floppy disk so make sure that the data on the floppy disk is useless because you will loose it.
Regards, Hernán
Last edited by LocoDelAssembly on 26 Aug 2006, 21:28; edited 1 time in total |
|||||||||||
08 Aug 2006, 04:12 |
|
f0dder 08 Aug 2006, 10:54
Oh, so windows does use E820 to find the usable memory map? Nice!
|
|||
08 Aug 2006, 10:54 |
|
LocoDelAssembly 08 Aug 2006, 18:42
Miserably fails on Win95 and Win98. In both the system hangs, however on WinMe the bootdisk works fine but since it doesn't include "mem" utility I can't know if it recognizes the memory correctly.
This problem is possibly due to the fact that the badRAM range overlaps the usable range reported by the BIOS so E820 BadRAM must be written more intelligently... Regards PS: On Win95 I tested an installed Win95 OSR2 but while its loading it reports a divide overflow error and hangs... The tested Win98 is a bootdisk that hangs just after RAMDrive is loaded. |
|||
08 Aug 2006, 18:42 |
|
vid 08 Aug 2006, 21:05
should it work on NT?
|
|||
08 Aug 2006, 21:05 |
|
LocoDelAssembly 08 Aug 2006, 23:56
At least works on WinXP. But it must be coded in a better way, right now Windows is reported that the whole RAM is available and then the last entry (added by my hook) says that a memory range included in the available range is unavailable. This doesn't confuse Windows XP but Win95/98 dislikes it very much. When I have time I'll try to prevent int 15/e820 from reporting whole ranges as available when them includes bad RAM ranges to prevent overlapping.
|
|||
08 Aug 2006, 23:56 |
|
LocoDelAssembly 26 Aug 2006, 21:36
Code: int15Handler IntHandler 0 cmp ax, $E820 je .serviceHandler jmp far dword [cs:originalHandler] .serviceHandler: The problem actually was that I forgot to give the control to the original handler when the service is not E820... I edited the post with the fixed version, now Win95 doesn't crash anymore but it uses all the physical available memory anyway... WinXP doesn't reports the badRAM range with msinfo32.exe but the task manager shows that the physical memory is decreased (see the screenshots). BTW, anybody here saw my mistake with the handler? ¬¬ |
|||
26 Aug 2006, 21:36 |
|
LocoDelAssembly 27 Aug 2006, 05:01
OK, I give up...
I tested with a hardcoded map but Win98SE enjoys the whole 256 MB of the Virtual PC... WinXP doesn't reports the badRAM range but reports that I have just 184 MB of physical memory in both "My PC" and task manager. I tested an Ubuntu dapper drake 32-bit with this but grub says that there is not enough memory to load kernel it's just capable to boot memtest (which also reports 184 MB of RAM). Now I don't know why Win98SE doesn't see the range marked as ROM because it actually calls E820 but seems that it does nothing with it... Anyway I'm tired of this and I don't need it working because I have no defective RAMs right now so I post it in the hope that it can be useful for someone. Regards, Hernán
Last edited by LocoDelAssembly on 27 Aug 2006, 15:50; edited 1 time in total |
|||||||||||
27 Aug 2006, 05:01 |
|
LocoDelAssembly 27 Aug 2006, 14:04
Quote:
Actually 32-bit. |
|||
27 Aug 2006, 14:04 |
|
LocoDelAssembly 27 Aug 2006, 15:46
Before Int15/E820 hook:
After Int15/E820 hook: Works in WinMe. PS: http://board.flatassembler.net/topic.php?p=42174#42174 doesn't have any effect on WinMe, possible due to the hook reports the bad range after the BIOS reported all the memory as available for use. The solution is spliting the RAM range to exclude the bad range in order to prevent overlapping with the bad ram range (like the hardcoded table does). |
|||
27 Aug 2006, 15:46 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.