I have four 512 MB RAM modules in one server. The fourth RAM is showing error for only one bit when I use memtest86+ to test the RAMs. Even when I swap the RAM in fourth slot with some other RAM I still get error in RAM in fourth slot at exact same location. So I wanted to block one particular address (or 4kb page, if necessary) of RAM from being used by server. Server is having fedora 11 and is used for test purposes only. It is not hosting any user application. Any idea on how I can block certain portion of RAM from being used? or on what is causing error to come at particular byte irrespective of RAM module installed.
I have recently found out that there is a kernel parameter (to provide at boot, in grub config for example)
memmap=[ammount]M$[startlocation]M
You can supply it many times to lock out parts of the memory.
eg.
memmap=3M$217M
locks out megabytes from 217 to 219
There used to be the "BadMEM" patch for Linux, however it would take a bit of effort to upgrade it to a current keernel.
http://badmem.sourceforge.net/docu/BadMEM-HOWTO.html
That sounds like a possible bad slot on the motherboard as your testing showed. I have never seen a way around this besides just not using that slot. To my knowledge, there is no easy answer. I suppose some software could be created, but like nik said, that would be more of an SO question.
I don't think you can
lock-out
specific parts of a RAM address range.It is owned by the virtual memory management of your OS.
However, this is an interesting application -- to lock out dynamic memory address ranges from the OS. If there is such a technique available (for any OS), I am interested in knowing it.
If it is not available, that sounds like an interesting project to try.
But, that would be a stackoverflow question.
You could write a kernel extension which, when loaded, would just allocate this page and then do nothing else.
Alas I don't know how to do this. When I used to work on IBMs VM system this was built in, but that doesn't help of course.
As Trogy said, that could be a motherboard defect, or even a CPU defect (though somewhat unlikely in this precise case).
I had this same problem, but found the available answers confusing and incomplete, so I put together a step-by-step guide, assuming as little background as I could.