home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,852 of 4,675   
   wolfgang kern to Rod Pemberton   
   Re: x86 memory testing - dealing with ca   
   08 Apr 19 12:07:59   
   
   From: nowhere@nospicedham.never.at   
      
   On 07.04.2019 08:24, Rod Pemberton wrote:   
   > On Thu, 4 Apr 2019 22:35:12 +0100   
   > James Harris  wrote:   
   >   
   >> Anyone know how portably to test an x86 PC's memory?   
   >   
   > What do you mean by "portably" here?  Reliable methods?  Multiple   
   > generations of processors?  Universal software sequence?   
   > All-of-the-above?   
      
   > Didn't we conclude on a.o.d. that some memory ranges can't be tested due   
   > to memory-mapped devices?  I.e., need to check E820h or create a memory   
   > map first.   
      
   yes, and to answer James question in more detail:   
   all my machines from i286(RIP) AMD486(RIP) to Athlon, Phenom and   
   Bulldozer were/are desktop units and read all ones from pull-up for   
   unpopulated RAM addresses except PCI-devices and BIOS-ROM shadows.   
      
   My older RAM-check worked like this:   
      
    DS flat   
      MOV esi,0x0010_0000   
   L1:   
      MOV eax,[esi]          ;save contents   
      MOV [esi],0xaa55aa55   
      WBINVD   
      CMP [esi],0xaa55aa55   
      MOV [esi],eax          ;restore   
      jnz end_of_block   
      ADD esi,0x0010_0000    ;only first quad of every MB   
      jns L1                 ;test only until 2GB   
      
   this was awful slow of course and I limited it to 2G because some ranges   
   above 2G (firmware hubs ACPI PCI etc) could hang the PC on read already.   
      
   Meanwhile my system learned PCI memory-ranges, TOM1, TOM2 beside E820 info.   
   So I now have only a few additional checks for writable ROM shadows   
   below 1 MB and for gaps between PCI devices (often just mirrors).   
      
   WARNING!   
   many memory addresses in the non-RAM area belong to devices and are read   
   one/write another device register. Better don't touch as long you not   
   know what it is.   
   Some addresses are even not meant to be read at all and hang or crash.   
   __   
   wolfgang   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca