In a nutshell: don't do that.
For an embedded application, you almost certainly shouldn't ever end up in a situation where you have to "determine" these --- you would use parts with strictly defined parameters instead and hard-wire them into the board.
Boot-time auto-detection of SDRAMs is notoriously messy and complicated business, if you want to be able to cope with whatever somebody decides to stick into those DIMM sockets. This issue is one of the few things that distinguishes well-done PC motherboaard BIOSes from el-cheapo ones, so obviously it's hard enough that even with 20 years of experience, not all BIOS programmers manage to get it right. I don't know about you, but I'd be scared at the prospect of having to re-invent *that* whell.
Sure, in principle it should be simple (read out the on-board self-description data out of the SPD chip and use those). But in practice you'll find all kind of nonsense on those SPDs, esp. in the cheaper sticks. And that's before you consider raw SDRAM chips instead of DIMM sockets, which of course won't have an SPD to begin with...