Translate physical address to DIMM

I’m trying to write a diagnostic tool that will test memory. Part of what
I would like to do, is if I find a problem, I would like to report which
DIMM has the fault.
Under XP, is there a way to determine which address belongs to which DIMM?
I was hoping that there was some BIOS table that had the memory mappings.
Thanks for any help you can provide.