97b17432b4
bool indicating whether the input value represents a valid BCD byte. The existing bcd2bin() routine will KASSERT if asked to convert a bad value, but sometimes the kernel has to handle BCD data from untrusted sources, so this will provide a mechanism to validate data before attempting conversion. This would be have easier/cleaner if the bcd2bin_data[] array contained an out-of-range value (such as 0xff) in the infill locations that aren't valid, but it's a global symbol that might be referenced by out-of-tree code relying on the current scheme, so I'm leaving that alone.