flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
JuanPedro 05 Dec 2004, 19:12
Actually I meant to write "small assembler program"; somebody told me that one couldn't write it in C
|
|||
![]() |
|
f0dder 05 Dec 2004, 19:44
With linux, you can (or could?) mark areas of memory as bad, and not have them used by the memory manager. With win9x, there might be a system.ini or registry settings, but I wouldn't know it. For NT, I believe there's a boot.ini switch to limit the amount of memory seen by the OS - but that would mean you can only use ~180 megs of those 256 megs. It might be possible to write a driver that allocates the specific areas of memory that are bad.
In case you haven't seen it, have a look at http://www.memtest86.com/ to pinpoint the exact areas that are bad. |
|||
![]() |
|
JuanPedro 05 Dec 2004, 23:49
f0dder, thank you very much for your reply. It's the closest I've got to a hint about how to proceed to fix it. Do you know anybody or any forum or any way to get this driver written? Do you think it's even possible? I've posted this questions to some C and C++ forums and everybody, without exception has told me it's not possible to do. However, it's seems to me logically possible so I'm surprised.
Juan P.S. I have the exact address of the area that's bad (windiag.exe determined it) |
|||
![]() |
|
rea 06 Dec 2004, 01:44
I have a question and a sugestion, then where is the problem in the RAM or in the mother board????
The suesgtion is, I guess is posible to write a application pheraphs not necesary to be a driver, but instead of mark the address permanently, alloc some memory there making a "shield" around this address, dont know if is posible to use the mark of allocation directly for an address instead of let the OS select where is, if is posible that, then your programm will only run at startup, allocate a shield around this addres and by this flag of allocation, any other programm not will be able of request this memory. Pheraphs you get the idea, andpheraphs is exactly equal dificult than do the driver, but instead of limit your memory to 160 you make make a shield of about some Kb, and you dont loss much memory ![]() Hope that sugestion serve, and the question that remain is: is posible to do a like allocation directly for a range of address, only for the porpuose of dont let others application use exactly this range of memory? |
|||
![]() |
|
Matrix 06 Dec 2004, 05:44
if its @ the end , win 9x has a function to set maximum memory to use, it clips the end
|
|||
![]() |
|
pelaillo 06 Dec 2004, 13:00
There's a thread in order to get started writing a driver of your own:
http://board.flatassembler.net/topic.php?t=256 |
|||
![]() |
|
JuanPedro 06 Dec 2004, 13:09
Matrix, any idea of what function is that of win 9x that allows you to clip the end? It may work; I don't mind switching back to win98.
|
|||
![]() |
|
JuanPedro 06 Dec 2004, 13:11
pelaillo, as far as you know, is there a function that could be used in a driver to either reserve or exclude memory with a certain phisical address?
|
|||
![]() |
|
f0dder 06 Dec 2004, 13:45
Juan, if you're on NT, get hold of Four-F's KMD tutorials and perhaps also the NTDDK (for documentation). I'm pretty sure there's a way to allocate a specific memory region. Since your bad region isn't near the start or end of your memory region, I guess there's a good chance the memory isn't allocated by other drivers/applications if you load your driver at system boot.
It's been a while since I did driver development, and I never really touched memory allocation, so I don't know whether there's an "easy" API to use, or if you have to build MDLs describing the bad areas. But once you find the right APIs to use, it should be very easy to develop the driver. It probably has to be done from a driver, though - I know of no ring3 APIs that allow you to reserve physical memory. |
|||
![]() |
|
pelaillo 06 Dec 2004, 14:39
JuanPedro, as per f0dder's advice, the allocation cannot be done in ring3 because any allocation will be in virtual memory and is windows that decide the final physical address to use.
In win98 you may allocate the memory before booting windows (config.sys ?) or using a simple ring0 resident program that allocate the bad region. Once allocated, win98 detect it as used and skip it (by compatibility with old DOS programs) |
|||
![]() |
|
Matrix 06 Dec 2004, 14:52
run msconfig.exe
click to special, then set memory limiting that's all |
|||
![]() |
|
rea 06 Dec 2004, 15:38
Where is Four-F? I was trying access http://masm32.cjb.net/ but I cant get the redirection and I dont know the real name
![]() Last edited by rea on 06 Dec 2004, 16:49; edited 1 time in total |
|||
![]() |
|
f0dder 06 Dec 2004, 16:15
I posted a topic on hiro's board, have a look: http://www.win32asmcommunity.net/board/topic.php?p=153796
|
|||
![]() |
|
JuanPedro 07 Dec 2004, 00:54
f0dder, pelaillo, what you say about winNT allowing me to allocate a specific memory region is also valid for XP?
I'll switch to NT if I have to; I currently have XP and I'm curious. Thanks |
|||
![]() |
|
JuanPedro 07 Dec 2004, 01:44
f0dder, I just now realized about the topic you posted on hiro's board. It's great, thank you very much !!!!!
I don't understand most of it but you and these guys are terrific; I'll try to follow it and see what I can get from it. Juan |
|||
![]() |
|
JuanPedro 07 Dec 2004, 04:10
I went into the topic posted into hiro's board and, even though I didn't understand much, I was able to realize that the suggested approaches led to something very similar to what Matrix suggested. In addition, as I was able to find out, Matrix approach is also do-able in XP (via boot.ini). This is very clean, easy and achieves the same thing as the suggestions in hiro's board.
f0dder, I wander if the approach suggested by the people who reponded to your posted topic may be used to actually selectively take out that memory address (0b5d9270) instead of just cutting off everything above 190MB as I had to do. |
|||
![]() |
|
rea 07 Dec 2004, 06:59
Some like this should be nice, http://msdn.microsoft.com/library/en-us/memory/base/creating_guard_pages.asp?frame=true
I have also watched that Windows CE have a function for alloc a address http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecoreos5/html/wce50lrfAllocPhysMem.asp But is only for Windows CE, altought pheraphs something similar is posible for Windows. Like write a driver that combine this two concepts using allocation and some flags like PAGE_GUARD|NOREAD|NOWRITE. Hehe, altought I think it should not be a easy problem?? to solve?? |
|||
![]() |
|
f0dder 07 Dec 2004, 15:07
I had a quick poke around, and I guess some of these might be starting points if you feel like playing with driver development - unfortunately I don't have the time to play around myself right now :/
NTOSKRNL::IoAllocateMdl NTOSKRNL::MmAllocatePagesForMdl NTOSKRNL::MmProbeAndLockPages |
|||
![]() |
|
LocoDelAssembly 06 Jul 2006, 03:09
Any progress?
![]() I'm having the same trouble with a computer but with two defective address located at 6.0 MB and 6.5 MB. As you can see I can't just set a config to exclude all memory above 6.0 MB. Apart of MmAllocatePagesForMdl I found IoReportResourceForDetection and IoReportDetectedDevice that seems to be another way. The computer has a WinMe installed (and the user does not want another OS), can I use those function over WinME freely? Any other ideas of how to exclude memory regions will be much appreciated. Regards |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.