memtest86plus/system
01e3 43b0f64ddb smbus: refactor SPD SKU (part number) handling
Replace SPD SKU reading code repeated multiple times across
all the parse_spd_* functions with a dedicated read_sku function.

Convert spd_infos.sku from len+data into classic NULL-terminated C-string.
Takes the same space, but simplifies handling. Also, use char instead of
uint8_t so no conversion is needed when printing.

Change the way how the end of part number is handled. Stop on the first
non-ASCII character and then trim all trailing spaces. This allows SKUs
with two (or more) spaces inside the name to be handled properly.

Finally, fix incorrect / inconsistent part number length handling, with
the following end result:
 - parse_spd_sdram: 18 [73-90] (no change)
 - parse_spd_rdram: 18 [73-90] (no change)
 - parse_spd_ddr:   18 [73-90] (no change)
 - parse_spd_ddr2:  18 [73-90] (no change)
 - parse_spd_ddr3:  20+1=21 -> 18 [128-145]
 - parse_spd_ddr4:  20+1=21 -> 20 [329-348]
 - parse_spd_ddr5:  29+1=30 -> 30 [521-550] (technicaly no change)

Before:
      text       data        bss      total filename
     13143       3795         18      16956 build32/system/smbus.o
     11735       4359         18      16112 build64/system/smbus.o

     81705      51133      13088     145926 build32/memtest_shared
     79686      58109     294432     432227 build64/memtest_shared

After:
      text       data        bss      total filename
     10784       3887         18      14689 build32/system/smbus.o
     10486       4399         18      14903 build64/system/smbus.o

     79353      51101      13088     143542 build32/memtest_shared
     78438      58077     294432     430947 build64/memtest_shared

gcc-11.3.0.
2022-08-28 18:14:41 +02:00
..
acpi.c Various minor cosmetic changes on acpi.c/h (mainly comments and code format) 2022-06-19 16:39:03 +02:00
acpi.h Various minor cosmetic changes on acpi.c/h (mainly comments and code format) 2022-06-19 16:39:03 +02:00
cache.h Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
cpuid.c Change check to be sure Extended Topology Information (CPUID.0BH:EBX[15:0]) is supported 2022-08-15 22:26:22 +02:00
cpuid.h Add AP Enumeration to distinguish P-Core from E-Core on Hybrid CPUs (#62) 2022-07-16 13:28:53 +02:00
cpuinfo.c Add ACPI Timer as the primary TSC correction source and PIT Timer as fallback 2022-06-19 16:39:03 +02:00
cpuinfo.h Add support for AMD Cezanne APU (Ryzen 5000G) #21 2022-04-01 18:55:43 +02:00
cpulocal.c Faster barrier implementation. 2022-02-28 22:05:21 +00:00
cpulocal.h Faster barrier implementation. 2022-02-28 22:05:21 +00:00
ehci.c Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
ehci.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
font.c Initial commit. 2020-05-24 21:30:55 +01:00
font.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
heap.c Switch to an array of heaps in the heap manager, and heap IDs in the allocation functions. 2022-07-25 12:53:21 +02:00
heap.h Switch to an array of heaps in the heap manager, and heap IDs in the allocation functions. 2022-07-25 12:53:21 +02:00
hwctrl.c Tidy up code for performing reset via the EFI runtime sevices. 2022-04-23 13:25:33 +01:00
hwctrl.h Tidy up code for performing reset via the EFI runtime sevices. 2022-04-23 13:25:33 +01:00
hwquirks.c Add External L2 detection for ALi Aladdin V Chipset (#87) 2022-06-06 19:56:04 +02:00
hwquirks.h Add External L2 detection for ALi Aladdin V Chipset (#87) 2022-06-06 19:56:04 +02:00
io.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
jedec_id.h Various fixes on SPD decoding algorithms (#152) 2022-08-26 21:56:12 +02:00
keyboard.c By default, only enable USB keyboard detection when booted in UEFI mode. 2022-07-24 13:56:41 +01:00
keyboard.h Add usbdebug command line option and conditionally pause at end of USB scan. 2022-04-17 22:46:17 +01:00
memrw32.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
memrw64.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
memsize.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
msr.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
ohci.c Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
ohci.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
pci.c Include unistd.h in pci.c to use usleep() 2022-05-20 13:46:29 +02:00
pci.h Add a way to handle hardware quirks at init or later in the code. Add ASUS TUSL2-C ASB100 Mux as (working) example (#77) 2022-05-20 13:23:25 +02:00
pmem.c Store pmem temporary arrays on the stack to reduce memory footprint. 2022-01-09 21:27:44 +00:00
pmem.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
reloc32.c Faster barrier implementation. 2022-02-28 22:05:21 +00:00
reloc64.c Faster barrier implementation. 2022-02-28 22:05:21 +00:00
screen.c Fix warning about mismatched comparison operands in 32-bit build. 2022-04-13 14:20:46 +01:00
screen.h Add support for Serial/TTY (#32) 2022-04-04 18:31:54 +02:00
serial.c [TTY/Serial] Always use absolute positioning instead of relying on CR-LF 2022-06-19 16:47:10 +02:00
serial.h Correct TTY to match the new temperature location on display 2022-04-16 13:31:28 +02:00
smbios.c Fix an issue where DDR4 Bank switch fail because DMI tables have multiples Type 17 structs reporting unpopulated slots as Type 2 (unknown), overwriting the valid struct with the populated slot. Code cleanup to improve readability 2022-05-20 01:59:27 +02:00
smbios.h Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
smbus.c smbus: refactor SPD SKU (part number) handling 2022-08-28 18:14:41 +02:00
smbus.h smbus: refactor SPD SKU (part number) handling 2022-08-28 18:14:41 +02:00
smp.c Switch to an array of heaps in the heap manager, and heap IDs in the allocation functions. 2022-07-25 12:53:21 +02:00
smp.h Split ACPI Functions from SMP functions. 2022-06-19 16:39:03 +02:00
temperature.c Remove now useless IMC check to allow temperature reporting on more older CPUs 2022-07-23 23:59:49 +02:00
temperature.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
timers.c Add ACPI Timer as the primary TSC correction source and PIT Timer as fallback 2022-06-19 16:39:03 +02:00
timers.h Add ACPI Timer as the primary TSC correction source and PIT Timer as fallback 2022-06-19 16:39:03 +02:00
tsc.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
uhci.c Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
uhci.h Disable UHCI legacy support and make sure all UHCI registers are initialised. 2022-04-09 22:42:59 +01:00
usb.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
usbhcd.c Simple maintenance improvements (#145) 2022-08-15 17:51:48 +02:00
usbhcd.h USB improvements (#116) 2022-07-16 13:34:08 +02:00
vmem.c Add option to map_region to indicate we only use the region during startup. 2022-02-28 22:05:21 +00:00
vmem.h Rework memory mapping to allow for larger program size (#54) 2022-04-28 23:04:01 +02:00
xhci.c Apply the USB_2_STEP_INIT option when using an XHCI controller. 2022-08-05 20:48:24 +01:00
xhci.h Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00