From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <0e856dc1ce35b2b51ee55663f381c45d@coraid.com> References: <08e97c0e92bc3a82cc2e6746b657a113@ladd.quanstro.net> <20110712115537.6574d0f3@lahti.ethans.dre.am> <0e856dc1ce35b2b51ee55663f381c45d@coraid.com> Date: Tue, 12 Jul 2011 08:49:04 -0700 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] Plan9 on QNAP TS-212 NAS (kw) Topicbox-Message-UUID: ffd8d1bc-ead6-11e9-9d60-3106f5b1d025 well, to elaborate on this. Long ago, you probed by just reading memory until you read back nothing but ffffffffffffffffff. That was a memory hole. Then somebody at one chipset vendor got clever and broke this test. Oops, you have to figure out if maybe your test is failing because somebody got clever. You can in fact figure out memory size on many systems by reading registers in configuration space. On K8/K10/whatever, you can write code to probe the famous "1f" configuration space and read out memory bank info. Core 0 can read it for ALL cpus. I've written this and then lost it :-) but it's pretty easy. Of course, many vendors view such info as "crown jewels" so this is hardly a universal solution. You can, if you want to get really weird, use the I2C bus to probe all installed DDR and figure it out. Silly that the OS has to do this when the BIOS does it but hey ... it's a PC ... of course it's gross. Reference code for MANY chipsets is available in coreboot. But I agree with Erik: frequently memory slots are more of a headache than a bonus. ron