I've previously suggested using the (BIOS-based) ACPI tables for both getting the appropriate values and setting them, but people didn't seem terribly enthusiastic about the idea.