Improve SDR sensor number mapping for sensor nums above 510

The recent submission to support SDR records defining Type 01 records
for sensors did not work when the system had more than 510 sensors. A
recent change supplied a system that enumerated more sensors then IPMI
can support. The change highlighted an error in how the Type 01
records were built.

This commit handles systems with a larger set of sensors. The code for
handling SDR # 511 correctly creates sensor number 768. It then fills
sensors to the limit of LUN 3.

Tested:
A SUT that supplied 1946 sensors was used to implement and test the
code.
Test cases:
"ipmitool sdr elist" returns 765 sensors
"ipmitool sensor list" returns 765 sensors
"ipmitool -l <lun> raw 4 0x2d <sn>" performed the correct behavior for
luns 0-3, sensor numbers 0, 254, 255.

Ported From:
https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/45744

Change-Id: I8e5160c93e79a366b897554efdd60e2edcd3594a
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Signed-off-by: Willy Tu <wltu@google.com>
2 files changed