262 Commits
Author SHA1 Message Date
Lionel Debroux aadd2cbb26 Attempt to enable SSE on K7 if the BIOS neglected to do so. 2026-05-22 20:13:42 +02:00
Lionel Debroux 54143be3ea WIP BROKEN Add SIMD tests for x86 & x86-64: MMX, SSE, SSE2, AVX ( #98 ). 2026-05-22 20:13:42 +02:00
Lionel Debroux 9e67c35a1c WIP BROKEN NX enablement, for now only for the second page directory.
TODO:
    * selective NX enablement on pd0, pd1 and pd3.
      Unconditional NX on the whole pd3 makes memtest86+ reboot in a QEMU-emulated computer.
    * if supported on all x86_64 CPUs, simply enable long mode and NX simultaneously ? A real K8 dual-core processor didn't seem to hate it, at least.
    * startup code: NX enablement for x86, on capable computers (CPUID 0x80000001, edx bit 20).
    * set the appropriate flag in the headers.
2026-05-22 20:13:42 +02:00
Lionel Debroux 4a2a9780b0 Add experimental mode with nontemporal stores (movnt[iq]) in own addr test, the only one where helps with performance across most processors I have access to, both single and multi-socket. Per #79, it saves several dozens of minutes on my 4S Opteron 62xx / 63xx servers equipped with 256 GB of RAM. 2026-05-22 20:13:34 +02:00
Sam Demeulemeester 997d4d2da2 Suppress GCC 12+ warnings from BIOS Direct Access 2026-05-22 15:34:56 +02:00
Nikolaos Barkas d3827673d7 Fix SiS 530 & ALi Aladdin IV/V motherboard cache detection
Adds external L2 cache size detection for Socket 7 boards with SiS 530
  northbridge, and extends the existing ALi quirk to also cover Aladdin IV
  (M1531) in addition to Aladdin V (M1541).

  Tested on: K6-II + SiS 530 with 512KB L2 cache.

  Closes #602
  Co-authored-by: Sam Demeulemeester <github@x86-secret.com>
2026-05-17 19:56:29 +02:00
Sam Demeulemeester 494689a7ac Add many JEDEC IDs for unknown DRAM manufacturers 2026-05-06 22:25:51 +02:00
Sam Demeulemeester eac97205ff Better Cache & DRAM Bandwidth measurement (+Enable SSE2 on x86_64) (#587)
* Enable SSE2 on x86_64 build

* Better Memory Bandwidth measurement
- Moved memory speed measurement to a dedicated file
- Use SSE2 on x86_64 for better DRAM BW measurements
- Add a lot of safeguards to avoid issue with very large L3 cache
- Add a more precise way to target a specific cache
- Change the iteration number from fixed to time-constrained so overall test time is always same
- Added many configuration parameters for fine-tuning

* Revert saving XMM registers to stack.
Instead, make sure to use only GPR for interrupt handling (so it won't touch SIMD regs)
2026-04-07 22:21:55 +02:00
Sam Demeulemeester f0ae889c7e Make Invalid Temperature Sentinel Agnostic
Do not display DDR5 Temperature when not available
2026-04-07 18:52:38 +02:00
Dongyan QianandSam Demeulemeester fb158cdc3e Better CPU temperature display & Fix LA64 temperature overflow (#593)
* system/loongarch: Decode CPU temperature as signed 8-bit

Interpret the low 8 bits of the CPU temperature register as a signed
value, apply the platform-specific offset, and reject readings when the
temperature-valid bit is clear.

At low temperatures the raw register value would otherwise be interpreted
as a large positive number, which breaks the displayed reading.

Reported-by: Mingcong Bai <jeffbai@aosc.io>
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>

* Better display of CPU temp from -99°C to 999°C

* Add sentinel value for CPU_TEMP_INVALID to allow negative temperature

---------

Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
Co-authored-by: Sam Demeulemeester <github@x86-secret.com>
2026-04-03 15:48:30 +02:00
Sam Demeulemeester 7eb2568dfe Add support for Intel Lunar Lake & Panther Lake CPUs 2026-03-23 17:52:55 +01:00
Sam Demeulemeester a90edd63ce Fix tRP measurement on Intel LPDDR5 laptop
Use tRPpb instead of tRPab
2026-03-23 17:52:02 +01:00
Sam Demeulemeester feeb7d2d01 Fix Core Topology Determination on some CPUs (eg: Intel PTL) 2026-03-17 00:15:46 +01:00
Sam Demeulemeester 4fa58699a9 Add support for x2APIC (#583)
* First commit to support x2APIC

* Keep apio_x2apic bool everywhere to avoid compilation issues on LA64.
x2APIC support on LA64 must be checked later (probably different MSRs)

* Various fixes
 - Fix flags in MADT x2APIC (CPU only has ENABLED, not ONLINE
 - Increased chunk index and related function from 8 to 16-bit
 - Increase MAX_APS and MAX_APIC_IDS to 512 (need an APs stack size evaluation to be sure we will not overflow)
2026-02-14 13:35:45 +01:00
Dongyan Qian 450961c81e system/loongarch: Fixes display issues for 2K3000/3B6000M (#589)
On LoongArch, PCIe MMIO space above 4 GiB must be mapped as uncached;
otherwise writes may not reach the device, so framebuffer updates are not visible.
Adjust the PCIe memory window layout according to the Loongson 2K series documentation.

Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2026-01-29 11:05:07 +01:00
Jonathan Teh d39efcdcda hwquirks: Detect cache on VIA VP/VPX (#576)
Extend the existing quirk for VP3/MVP3 to VP/VPX.
2026-01-19 01:09:58 +01:00
Yao Zi 1c075f8cd0 system: loongarch: cpuinfo: Unroll memspeed copy loop (#578)
Unlike x86_64 where rep movsl/movsq could be turned into efficient uOP
to achieve a good performance, on LoongArch a simple loop that copies
only 8 bytes per iteration couldn't fully feed the pipeline.

This makes calculated cache bandwidth suspcious: on my Loongson 3A5000
laptop, memtest86plus reports the same bandwidth for L1 and L2, which is
obviously incorrect.

Let's unroll memspeed loop to copy 64-bytes per iteration, which fits
in a cacheline and should fully feed the pipeline for even future
generations of Loongson cores.

Signed-off-by: Yao Zi <me@ziyao.cc>
2026-01-19 01:09:19 +01:00
martinwhitakerandSam Demeulemeester 3a7a058aed Recognise VT52/VT100/VT220 key escape sequences on serial console (#547)
* Recognise VT52/VT100/VT220 key escape sequences on serial console.

Map function keys to '0' to '9' and cursor keys to 'u', 'd', 'l',
'r', as is done for legacy and USB keyboards. Ignore all other
special key sequences.

* Make serial_echo_print() and tty_goto() static.

These are local to serial.c. Making them static saves a few bytes.

* Update keyboard.h to document cursor key mapping.

* Added some escape codes for terminals & VT100+
Change input order to check TTY first

* Replace comments about PF6-10

---------

Co-authored-by: Sam Demeulemeester <github@x86-secret.com>
2025-10-08 12:51:49 +02:00
Sam Demeulemeester ced9529bea DDR5 DIMM Temperature Reporting (#497)
* Initial commit for DDR5 Temperature report

* Change smbus.h to i2c_x86.h

* Change I2C includes defines name to avoid conflict

* Add dummy get_ram_temp() function on LA64

* Add menu option for RAM/DDR5 Temperature polling
2025-10-06 23:01:33 +02:00
David Corvaglia 2b51351ab7 added serial newline option (#528) 2025-10-05 16:53:19 +02:00
Sam Demeulemeester ae9e085035 Add support for AMD Zen5 Granite Ridge (GRG) ECC polling. (#545)
Fix an issue with Rembrandt ECC polling where only half of the channels where checked
2025-10-05 16:35:53 +02:00
Sam Demeulemeester 2350230351 Unhide SMBUS device to allow SPD reading on early Intel's ICH SB (#544)
* Add quirks for ICH0-5 (SMbus Unhide)

* Minor constant name changes & typo
2025-10-05 16:31:55 +02:00
Sam Demeulemeester ac7d092417 Added various DRAM manufacturers from JEP106 list
Manually reworked strings
2025-10-05 16:26:58 +02:00
Sam Demeulemeester 6888b1d5a0 Add support for Intel Arrow Lake-H (SOC)
Tested OK on NUC 15th Gen.
2025-10-05 16:02:07 +02:00
Lionel Debrouxand01e3 a935afd50a Avoid unnecessary Frame Buffer updates (#543)
Frame Buffer updates are expensive, let's instead uses these CPU cycles
for testing RAM...

Co-authored-by: 01e3 <01e3@ans.pl>
2025-09-14 21:36:34 +02:00
martinwhitaker 2a58a7cb53 Add USB hub quirk to support AMI virtual keyboard (issue #523) (#535)
* Add USB hub quirk to support AMI virtual keyboard (issue #523)

From testing it appears that the AMI virtual devices do not work
correctly if you disable one port on the virtual hub then reuse the
USB address for a device connected to another port on that hub. So
add a quirk to detect the virtual hub from its vendor/product ID
and leave all ports on that hub active when performing the scan for
USB keyboards. This will permanently reserve a bit more memory, but
not significantly so.

* Replace hard-coded USB vendor ID with macro definition.
2025-08-16 22:20:40 +02:00
Lionel DebrouxandSam Demeulemeester f19066d258 Update Intel i801 PCI device IDs list & Add support for MTL-P (#537)
* Update Intel i801 PCI device IDs list from the Linux driver.

* Add support for MTL-P (eg: NUC 14th Gen)

---------

Co-authored-by: Sam Demeulemeester <github@x86-secret.com>
2025-08-14 12:17:27 +02:00
Jonathan Teh 1b5065b494 imc: Enable support for AMD Cezanne (Zen 3 APU) (#525) 2025-07-06 13:06:38 +02:00
Martin Whitaker 106f9ee358 Add optional parameters to usbdebug boot option.
The usbdebug option may now be optionally followed by "=hub" or "=kbd",
which enables details of the configuration and endpoint descriptors to
be printed when scanning for hubs or keyboards respectively. This can
easily result in more than one screenful of information (and we can't
say "press any key to continue" before we've completed the scan and set
up the keyboard handler), so a 1 second delay is added after printing
each line of detailed information.
2025-07-04 18:04:09 +01:00
Sam Demeulemeester 2f9b165eec Add support for AMD Hawk Point FP7 (Phoenix) 2025-05-27 22:02:41 +02:00
Dongyan Qian 07d84f4f34 loongarch: Supports 2K2000/3B6000M (#512)
* loongarch: adjust 2K/3B6000M DDR rate factor
* loongarch: Supports fewer cache layers than L3

For example: 2K2000 chip does not have L3, but has L2.
If L2Cache is not flushed to memory, it will cause read and write data errors after cache_off.
2025-05-12 13:56:30 +02:00
Sam Demeulemeester a47b2bc053 Fix DDR5 SPD parsing issue for XMP 3.0 frequency
On DDR5, limit XMP profile parsing to 2 to avoid conflict between XMP and EXPO
Add a check to skip very low tCK values
2025-04-20 19:16:51 +02:00
Lionel Debroux a10664a251 Make paths more uniform across architectures; adjust the build system and Github workflows accordingly.
* move x86/x86-64-specific files to boot/x86, build/i586, build/x86_64, system/x86, system/imc/x86;
* move build64/la64 to build/loongarch64;
* rename system/imc/loongson to system/img/loongarch.
2025-02-24 20:25:29 +01:00
Sam Demeulemeester 97de11f9f5 Add support for color schemes and implement a dark mode (#496)
Color vs Colour. That is the question.
Closes #439
2025-02-10 23:33:48 +01:00
martinwhitaker e285fbb4b9 Ignore PS/2 mouse events (issue #456) (#484)
If a legacy BIOS has enabled PS/2 mouse input, the bytes received on
port 0x60 may come from either the keyboard or the mouse. Currently
we treat all bytes as keyboard input, which means mouse input will be
translated into arbitrary key codes. This may cause a memory test to
be interrupted or aborted. We should instead disable or ignore any
mouse input.

Although it should be possible to reconfigure the PS/2 controller to
disable mouse input, it's quite likely that there's some quirky H/W
out there that makes this more complicated than it seems. The simple
solution is to detect mouse input by checking whether bit 5 of the
received byte is set and discarding it if so.
2025-01-27 21:54:54 +01:00
Sam Demeulemeester b51c6e75f3 Add Thermaltake and SSTC Jedec IDs 2025-01-27 19:41:36 +01:00
Chao Li 422212b06a system/hwquirks: Optimization Loongson 7A2000 EHCI quirk (#473)
Currentilly, it only compares the root bus DID is 0x7A00 which sometimes
fails, a new logic was added to compare the 7A2000 EHCI DID to fix it.

Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-06 22:51:18 +01:00
Sam Demeulemeester 5a046291fa Add a few RAM manufacturers in JEDEC DB 2024-11-12 00:25:38 +01:00
Jonathan TehandSam Demeulemeester 51b78487f5 hwquirks: Detect cache on VIA VP3/MVP3 (#356)
Add quirk to detect motherboard cache on VIA VP3/MVP3.

Co-authored-by: Sam Demeulemeester <38105886+x86fr@users.noreply.github.com>
2024-11-12 00:10:40 +01:00
Lionel Debroux d2ecbac5fd Add PCI ID for the SMBus controller behind the VT8237S bridge. (#448)
00:11.0 ISA bridge [0601]: VIA Technologies, Inc. VT8237S PCI to ISA Bridge [1106:3372]
2024-11-11 23:57:36 +01:00
Jonathan Teh d551d92b45 temperature: Add support for AMD Excavator (#440)
Read current temperature from SMU via root complex.
2024-11-11 23:49:31 +01:00
Sam Demeulemeester 46e3b43859 Add support for latest AMD Zen5 CPU (Ryzen 9000)
Change DDR5 SPD Bank switch method on AMD according to feedbacks from betatesters
2024-11-10 23:45:49 +01:00
Chao Li 3ce7c3fb39 loongarch: Add 64-bit PCIe memory space mapping and change the stable timer as the main timer (#450)
* system/loongarch: Add 64-bit PCIe memory space mapping

Added the 64-bit PCIe memory space mapping. From 0x8000000000ULL to
0xFD00000000ULL are LoongArch 64-bit PCIe memory spaces and need to be
mapped.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/loongarch: Optimization timer on LoongArch

Since some LoongArch64 CPUs stop the performance counters when ilde, the
running time displayed on the screen is incorrect.

Using stable counter can solve this problem, so remove the performance
counters time, and add stable counter time.

Signed-off-by: Chao Li <lichao@loongson.cn>

---------

Signed-off-by: Chao Li <lichao@loongson.cn>
2024-10-24 19:28:00 +02:00
Chao Li a52ad6aa61 system/loongarch: Fix a bug about the memory boundary. (#447)
In LoongArch, the addresses from 0x30000000 to 0x80000000 are 32-bit PCI
memory space, If the BAR happens start at 0x30000000, a mapping error
will occur according to the old logic, and 0x30000000 should also be
mapped, so fix it.

Signed-off-by: Chao Li <lichao@loongson.cn>
2024-10-17 14:43:27 +02:00
Sam Demeulemeester f34a85ce07 Add support for Intel MTL & ARL CPUs (#441)
* Add CPUID detection for MTL & ARL CPUs

* Add support for ARL SMBus Controler
Add PCI Device polling on Bus 0x80 (instead of fixed 0x00)
Solve issue with DDR5 SPD Bank switching when SPD Write is disabled (using Proc Call)

* Add Live Freq/Timings IMC Polling for Intel MTL & ADL CPUs

* Correct K8 Rev G detection
Fix #361 (PR hijacking)
2024-09-30 13:38:13 +02:00
Chao Li 97922cc4cf Add LoongArch support (#410)
* lib/assert: Add LoongArch assert support

Added LoongArch break 3 assert instruction.

Signed-off-by: Chao Li <lichao@loongson.cn>

* lib/barrier: Add barrier method for LoongArch

Added LoongArch barriers in barrier_spin_wait and barrier_halt_wait
functions.

Signed-off-by: Chao Li <lichao@loognson.cn>

* lib/spinlock: Add LoongArch CPU pause

Because the LoongArch haven't pause instruction, using eight nops to
replace the pause.

Signed-off-by: Chao Li <lichao@loongson.cn>

* lib/string: Make LoongArch use the string function in the file

Since LoongArch GCC doesn't have built-in string functions, use the
string function instance in the sting.c

Signed-off-by: Chao Li <lichao@loongson.cn>

* lib/unistd: Add LoongArch CPU pause

Because the LoongArch haven't pause instruction, using eight nops to
replace the pause.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/acpi: Reduce the way of search RSDP for non-x86 ARCHs

Searching RSDP from legacy BIOS EDBA and reserved areas is available
only on i386 and x64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/cache: Add LoongArch64 cache operations support

Added cache operations support for LoongArch64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/cpuid: Add the compile limit

Make the `cpuid` function action only on i386/x64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/heap: Add heap support for LoongArch64

LoongArch64 uses the low 256MB as the low memory.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/memrw: Add 8-bit and 16-bit memory operations

Added 8-bit and 16-bit memory access operations, which 8-bit uses
`movb` and 16-bit is `movw`.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/memrw: Add LoongArch memory access operations

Added 8/16/32/64-bit memory access operations for LoongArch64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system: Add Loongson PCI vendor ID and Loongson 7A chipset EHCI workaround

1. Added Loongson PCI vendor ID.
2. Added Loongson 7A chipset ECHI workaround.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/io: Add LoongArch64 IO port operations

Added IO port operations for LoongArch64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/reloc64: Add LoongArch64 relocations support

Added R_LARCH_RELATIVE and R_LARCH_NONE relocations support for
LoongArch64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/serial: Add Loongson CPU serial port support

Add the serial port address perfix of Loongson CPU and obtain serial
port clock method.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/smbus: Rename smbus.c to i2c_x86.c

Renamed the smbus.c to i2c_x86.c in i386 and x64 platforms.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/smp: Add LoongArch SMP support

Added LoongArch multi-core support and a way of map to node numbers if
the NUMA is enabled.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/timers: Add LoongArch supports

In LoongArch, there is a stable counter that is independent of other
clocks, it like the TSC in x64. Using it to count the ticks per
millisecond.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/tsc: Add LoongArch support

Usually the frequency of stable counter is not same to CPU frequency, so
using the performance counter for the delay operations.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/usbhcd: Add LoongArch MMIO perfix

Added LoongArch64 MMIO address perfix, use for address the PCI memory
space.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/usbhcd: Add Loongson 7A2000 chipset OHCI BAR offset fix

If the BAR address is not fixed for the Loongson 7A2000 OHCI controller,
some prots will not be usable, This change currently only affects the
LoongArch platform.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system: Add the way to IO access via MMIO

Usually, it is access the IO like PCI IO via MMIO on non-X86 ARCHs, so
a method to access IO via MMIO is added.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system: Add the way to access PCI memory space via MMIO

Some uniformly address ARCHs access the PCI memory depended the MMIO, so
the method to access PCI memory via MMIO is added.

Signed-off-by: Chao Li <lichao@loongson.cn>

* app: Add LoongArch version support

Reduced the version field by two characters to support ARCH name
abbreviations with more than three characters, and added "la64" ARCH
version display.

Singed-off-by: Chao Li <lichao@loongson.cn>

* test/block_move: Add block move test via ASM for LoongArch

Add block move test inline assembly instance for LoongArch.

Signed-off-by: Chao Li <lichao@loongson.cn>

* test/mov_inv_fixed: Add LoongArch ASM version word write operation

Add LoongArch ASM version word write cycle if it uses the HAND_OPTIMISED.

Signed-off-by: Chao Li <lichao@loongson.cn>

* boot: Adjust the AP stack size for LoongArch

LoongArch exception will store all of the GP, FP and CSR on stack, it
need more stack size, make LoongArch AP using 2KB stack size.

Signed-off-by: Chao Li <lichao@loongson.cn>

* boot/efisetup: Add LoongArch CPU halt instruction

Add "idle 0" for LoongArch

Signed-off-by: Chao Li <lichao@loongson.cn>

* boot/efi: Limiting the ms_abi using scope

Make the ms_abi only work on i386 and x64.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/imc/loongson: Add Loongson LoongArch IMC support

Added the Loongson LoongArch CPU IMC instance, support read out the IMC
sequence, currently only supports reading MC0.

Signed-off-by: Chao Li <lichao@loongson.cn>

* app/loongarch: Add intrrupt handler for LoongArch

Added the LoongArch IRQ handler support.

Signed-off-by: Chao Li <lichao@loongson.cn>

* system/loongarch: Add LoongArch ARCH specific files

Added LoongArch ARCH specific files: cpuid.c, cpuinfo.c, hwctrl.c,
memctrl.c, temperature.c, vmem.c, registers.h

They use the same pubilc API for i386 and x64 platforms.

Signed-off-by: Chao Li <lichao@loongson.cn>

* boot: Add LoongArch startup and header

Added the header.S and startup64.S for LoongArch, CPU works on:
1. Page mode.
2. Load and store is cacheable.
3. Instructions is cacheable.
4. DMWn 0 and 1 is used.
5. To access non-cacheable areas, use the perfix 0x8000000000000000.

Signed-off Chao Li <lichao@loongson.cn>

* build64/la64: Add LoongArch64 build files

Add infrastructure files to build memtest86 plus for LoongArch64
platform.

Signed-off-by: Chao Li <lichao@loongson.cn>

* workflows: Add LoongArch64 CI supports

Adjust workflow logci, remvoe 32 and 64 wordsize, replace with "i386,
x86_64 and la64", add LoongArch64 build CI check.

Signed-off-by: Chao Li <lichao@loongson.cn>

---------

Signed-off-by: Chao Li <lichao@loongson.cn>
Signed-off-by: Chao Li <lichao@loognson.cn>
2024-08-30 13:38:46 +02:00
01e3 771d6d4dca Split SPD parsing and printing code from smbus.c to spd.c (#426)
* Split SPD parsing and printing code from smbus.c to spd.c

Move all SPD parsing and printing code from smbus.{c,h} to spd.{c,h}.

Introduce parse_spd() function, moving the parse_spd_* selection logic
from print_smbus_startup_info(), allowing to keep parse_spd_* static.

Remove static from get_spd() and update print_smbus_startup_info()
to use parse_spd() which also simplifies the code flow.

Move LINE_SPD into display.h and rename it to ROW_SPD. Update print_spdi()
to use explicit row number where the SPD info needs to be printed.

Rename ram_info into ram_info_t, rename print_smbus_startup_info()
into print_spd_startup_info.

Do not initialize ram.freq to 0, this is the initial value already.

Do not set curspd.isValid to False, the first thing that parse_spd()
does is setting the entire struct to 0, that also sets isValid to False.

print_spd_startup_info() from smbus.c is technically a skeleton now
so each arch can have its own version, adjusted as needed. Once
LA64 changes land, we can think how we can even make it arch agnostic.

* Add -fexcess-precision=standard to CFLAGS for build(32,64)/Makefile

Recent switch from -std=c11 to -std=gnu11 done in 53ca89f ("Add
initial NUMA awareness support") introduced a regression in SPD
parsing code (and potentially in other places) due to change of
floating point precision. Restore the original behavior by
adding -fexcess-precision=standard to CFLAGS.

Bug: https://github.com/memtest86plus/memtest86plus/issues/425
Fixes: https://github.com/memtest86plus/memtest86plus/commit/53ca89f8aeeea649a1b8c2d2d14ec121f7025f54
2024-08-08 02:41:19 +02:00
Chao Li e99ce97648 Add the 64-bit and 32-bit CC flag
Added a new CC flag into build32 and build64 Makefiles to distinguish
whether compiling to 32-bit or 64-bit code.

[Lionel Debroux: rebased on the memrw functions refactor.]

Signed-off-by: Chao Li <lichao@loongson.cn>
2024-07-22 22:50:15 +02:00
Lionel Debroux 8d966d98f4 Refactor the memrw functions to reduce the redundancy. (#415)
The impact is limited now, but will increase when adding support for more architectures and more bit widths.
2024-07-16 08:55:13 +01:00
Martin Whitaker 778c7b4cc4 Fix the behaviour of sort_pm_map() (issue #392)
The existing algorithm both read and wrote data beyond the end of the
array and, when moving data, moved it in the wrong direction. Replace
it with a bog-standard insertion sort algorithm. The resulting code
is smaller and probably faster, as memmove() is not in-lined.
2024-04-09 20:07:09 +01:00