MH,
Let me give a bit of background of the issue.
We are facing an issue where 4 bytes of physical memory is getting corrupted (set to 0) at a fixed offset.
This offset is always fixed 0x00A4DDC0 (PFN: 0xA4D). The problem manifests in form of SIGILL for some random user-space application where its text area is corrupted. At this moment we are not able to identify who is causing the corruption. While we continue to investigate that (no HW breakpoint support :(), I thought we could at least mask the problem since we know the corruption is always occurring at a fixed offset.
Therefore we want to reserve the memory so that kernel does not give it to anyone.
We tried passing it via kernel command-line parameter (using memblock) but did not see it working. Finally we modified the function early_reserve_mem_dt() in file "linux-3.12.19/arch/powerpc/kernel/prom.c" to directly reserve the memory.
base1 = 0xA4D000; size1=0x1000;
memblock_reserve(base1, size1);
To check if reservation is working and to monitor the corruption we wrote a kernel module that does a ioremap to page 0xA4D. We then poison it with fixed data. What we found was that, in few runs, this memory was intact and in few others it would change. We tried both memblock_reserve() as well as memblock_remove(). Unfortunately we continue to get the SIGILL at the same offset.
Is there any other way to block a physical memory page?
ioremap code (relevant lines):
static char* sigill_mon_addr;
#define ADDR_TEST 0xA4D00
sigill_mon_addr = (char*)ioremap(ADDR_TEST, 4096);
-Thanks
Nikhil