Commit Graph

141 Commits

Author SHA1 Message Date
Lionel Debroux
055fddbac3 Move x86/x86-64-specific files to build32/x86, build64/x86 and system/x86; adjust Github workflows accordingly. 2024-11-12 10:53:37 +01:00
martinwhitaker
9ef7eae74e
Improve BadRAM pattern collection and add more condensed error reporting modes (#454)
* badram: Make DEFAULT_MASK depend on ARCH_BITS, not x86_64 architecture.

* badram: Don't display leading zeros for BadRAM addresses.

* badram: Merge patterns immediately when there is no additional cost.

The current algorithm only starts merging patterns when num_patterns
equals MAX_PATTERNS, which can lead to having several patterns that
could have been merged into one at no additional cost. e.g.

patterns = [
  (0x00, 0xfffffffffffffff8),
  (0x08, 0xfffffffffffffff8)
]

can appear, even though

patterns = [
  (0x00, 0xfffffffffffffff0)
]

represents the exact same addresses at the same cost.

So, at the same time as we test whether an address is already covered,
also check if we can cheaply combine the new address with an existing
pattern.

* badram: Factor out code that wraps to a new line when necessary.

In preparation for next commit.

* badram: Add more modes for recording/displaying error maps.

The original code just supported recording and displaying patterns suitable
for use with the Linux BadRAM extension or GRUB badram command. With some
minor changes it can be made to record address ranges and display them
either in the format used by the Linux memmap boot command line option
or as a simple list of memory page numbers (which can be used with the
Windows bcdedit program).

* badram: Increase the number of stored patterns/ranges.

* Update README to include the new error reporting modes.
2024-11-11 23:57:21 +01:00
Sam Demeulemeester
52c6c64d57 Bump version to v7.20 2024-11-11 15:28:41 +01:00
martinwhitaker
0a543a41f2
x86_64: preserve r8-11 over call to interrupt handler. (#430)
The x86_64 SysV calling convention does not require r8-r11 to be
preserved by the callee. So we need to save and restore them in the
low-level interrupt handling code in case the C interrupt() function
uses them.
2024-09-28 22:19:27 +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: 53ca89f8ae
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
Chao Li
fa583c906b app/main: Adjust the inline ASM to i386 only
Make the inline ASM code in function run_at() x86 arch only.

Singed-off-by: Chao Li <lichao@loongson.cn>
2024-07-07 20:32:58 +02:00
Lionel Debroux
53ca89f8ae
Add initial NUMA awareness support (#378)
* Add a file containing useful macro definitions, currently a single top-level macro for obtaining the size of an array; use it to replace a sizeof(x) / sizeof(x[0]) construct in system/smbus.c . This requires switching the GCC build mode from C11 to C11 with GCC extensions.

* Initial NUMA awareness (#12) support: parse the ACPI SRAT to build up new internal structures related to proximity domains and affinity; use these structures in setup_vm_map() and calculate_chunk() to skip the work on the processors which don't belong to the proximity domain currently being tested.

Tested on a number of 1S single-domain, 2S multi-domain and 4S multi-domain platforms.

SKIP_RANGE(iterations) trick by Martin Whitaker.
2024-03-13 01:43:26 +01:00
Martin Whitaker
ded371e9da Note that BadRAM patterns exclude errors found in tests 0 and 7.
This was mentioned in the individual test descriptions in the README,
but easily missed (issue #384). Add a note in the BadRAM section of
the README and also in the error display heading.
2024-03-05 23:12:51 +00:00
Sam Demeulemeester
5dde13b0a1
Preliminary ECC support for AMD Zen CPUs (#353)
* Initial commit for ECC support. Preliminary support for AMD Zen.

* Clear ECC registers at startup

* Add config flag (enable_ecc_polling) to toggle ECC polling. (Currently disabled by default for v7 release)
2023-11-29 12:53:05 +01:00
Lionel Debroux
9b9c65b968
Reduce padding and relocations (#355)
* Optimize the JEP106 list by using __attribute__((packed)) to remove padding. The x86 & x86_64 series support unaligned accesses just fine, after all, and this is not remotely a hot path.

* Optimize several string-related constructs by switching to fixed-length char arrays, which avoids pointers + relocations.

* app/interrupt.c: array of different-length strings, but most of those are lengthy enough for this to be a clear win, especially on x86_64;
* system/usbhcd.c: array of same-length strings;
* tests/tests.h: array of structs containing same-length strings.

* Reduce the size of the list of tests by using a narrower type for the cpu mode, which reduces padding.
2023-11-29 12:45:17 +01:00
Sam Demeulemeester
fc2826726b Early Bump to v7.00
Requested by many betatesters due to the amount of changes since 6.20 release
ECC support for a few platforms planned before v7.00 release
2023-08-06 20:33:30 +02:00
Sam Demeulemeester
d892a6851d
Carry on after a unsafe read on a non-existent MSR (#310)
Allow Memtest86+ to continue if a MSR read instruction lead to a GPF
2023-08-06 20:26:33 +02:00
Lionel Debroux
df803bf294 Fix memory error addresses displayed by badram reporting mode (#308). 2023-07-28 09:39:54 +02:00
Sam Demeulemeester
de4f4768fc Fix various temperature-related issues on older Atom CPUs
Also, remove the no_temperature var to keep only the enable_temperature flag
Older Atom still have the enable_temperature flag hard-coded to false until further tests are done
2023-05-18 16:03:48 +02:00
Sam Demeulemeester
9e3958714b
Add support for MMIO UART console (#300)
8/16/32-bit MMIO supported, with configuration options as kernel parameters.
2023-05-12 15:49:00 +02:00
Sam Demeulemeester
7aeac7271f
Add Memory Controller Registers polling to get current DRAM Timings/Frequency (#306)
Read the memory controller configuration (instead of just relying on SPD data) to get the actual live settings.

Currently supported platforms:
* Intel SNB to RPL (Core 2nd Gen to Core 13th Gen) - Desktop only (no Server nor Mobile)
* AMD SMR to RPL (Zen to Zen4) - Desktop only (no Server, Mobile nor APU).


Individual commits below for archival:

* First functions skeleton for reading IMC/ECC Registers

* Change directory name from 'chipsets' to 'mch' (Memory Controller Hub)

* Add Intel HSW and fix new files encoding

* First Intel HSW IMC implementation

* Add an option to disable MCH registers polling

* Remove old include from Makefiles

* Better Makefile and padding fixes

* Statically init 'imc' struct to generate string relocation record

* Small typos & code fixes

* Add IMC support for Intel Core 6/7/8/9th Gen (SKL/KBL/CFL/CML) This is a bit more complex than Haswell and below because MMIO switched to 64-bit with Skylake (lot of) betatesting needed

* Add IMC read support for Intel SNB/IVB (2nd/3rd gen Core)

* Fix hard-lock on Intel SNB/IVB due to wrong access type on MCHBAR pointer

* Move AMD SMN Registers & offsets to a specific header file

* Add IMC Read support for AMD Zen/Zen2 CPUs

* Change 'IMC' to 'MCH' in Makefiles to match actual mch/ directory

* Add IMC Reading support for Intel ADL&RPL CPUs (Core Gen12&13)

* Add support for Intel Rocket Lake (Core 11th Gen) and AMD Vermeer

* Add IMC reading for AMD Zen4 'Raphael' AM5 CPUs

* Various Cleanup #1 
Change terminology from Intel-based 'MCH' (Memory Controller Hub) to more universal 'IMC' (Integrated Memory Controller) Integrate imc_type var into imc struct. Remove previously created AMD SNM header file

* Various Cleanup 2

* Change DDR5 display format for IMC specs
DDR5 Freq can be > 10000 and timings up to 63-127-127-127, which overwflow the available space.
This commit remove the raw frequency on DDR5 (which may be incorrect due to Gear mechanism) and leave a bit of space to display the Gear engaged in the future
2023-05-12 15:33:28 +02:00
Sam Demeulemeester
5dcd424ea7 Bump version to v6.20 2023-05-07 16:55:03 +02:00
Sam Demeulemeester
79bb781431 Better handling of big FAIL banned in case of errors 2023-03-29 18:29:59 +02:00
Sam Demeulemeester
c6b04e5414 Display big banner only once 2023-03-29 17:58:12 +02:00
Sam Demeulemeester
22663f89bb
Add support for AMD K8 temperature reporting. (#268)
Add various quirks to handle AMD temp sensors erratas
2023-02-13 22:29:17 +01:00
Sam Demeulemeester
ce2c29eddc Bump version to v6.10 2023-02-02 23:52:18 +01:00
Lionel Debroux
8f788b27e1 Add support for configuring the error reporting mode through the command line. Fixes #83. 2023-01-23 15:49:45 +01:00
Lionel Debroux
f24e897883 Add support for configuring the CPU sequencing mode through the command line. Reorder tests in app/config.c::parse_option alphabetically. Fixes #82. 2023-01-23 15:49:45 +01:00
martinwhitaker
d0399fd287
Add a command line option to disable the big PASS/FAIL status display. (#227) 2023-01-04 16:16:55 +01:00
Anders Wenhaug
68deff493f
Change how BadRAM patterns are aggregated to minimize the number of covered addresses (#178)
* BadRAM: Rename pattern -> patterns

* BadRAM: Refactor COMBINE_MASK and add clarifying comment

* BadRAM: Extract DEFAULT_MASK into variable

* BadRAM: Add is_covered() for checking if pattern is already covered by one of the existing patterns

* BadRAM: Initialize patterns to 0

* BadRAM: Change how addr/masks are merged to minimize number of addresses covered by badram

Prior to this patch, a list of up to MAX_PATTERNS (=10) addr/mask tuples
(aka. pattern) were maintained, adding failing addresses one by one to
the list until it was full. When full, space was created by forcing a
merge of the new address with the existing pattern that would grow the
least (with regards to number of addresses covered by the pattern) by
merging it with the new address. This can lead to a great imbalance in
the number of addresses covered by the patterns. Consider the following:

MAX_PATTERNS=4 (for illustrative purposes).
The following addresses are faulted and added to patterns:
0x00, 0x10, 0x20, 0x68, 0xa0, 0xb0, 0xc0, 0xd0

This is the end result with the implementation prior to this commit:

patterns = [
  (0x00, 0xe8),
  (0x00, 0x18),
  (0x68, 0xf8),
  (0x90, 0x98)
]
Total addresses covered: 120.

This commit changes how the merges are done, not only considering a
merge between the new address and existing patterns, but also between
existing patterns. It keeps the patterns in ascending order (by .addr)
in patterns, and a new address is always inserted into patterns (even if
num_patterns == MAX_PATTERNS, patterns is of MAX_PATTERNS+1 size). Then,
if num_patterns > MAX_PATTERNS, we find the pair of patterns (only
considering neighbours, assuming for any pattern i, i-1 or i+1 will
be the best candidate for a merge) that would be the cheapest to
merge (using the same metric as prior to this patch), and merge those.

With this commit, this is the result of the exact same sequence of
addresses as above:
[
  (0x00, 0xe0),
  (0x68, 0xf8),
  (0xa0, 0xe8),
  (0xc0, 0xe8)
]
Total addresses covered: 72.

A drawback of the current implementation (as compared to the prior)
is that it does not make any attempt at merging patterns until
num_patterns == MAX_PATTERNS, which can lead to having several patterns
that could've been merged into one at no additional cost. I.e.:

patterns = [
  (0x00, 0xf8),
  (0x08, 0xf8)
]
can appear, even if
patterns = [
  (0x00, 0xf0)
]
represents the exact same addresses with one pattern instead of two.

* fixup! BadRAM: Change how addr/masks are merged to minimize number of addresses covered by badram

Co-authored-by: Anders Wenhaug <anders.wenhaug@solutionseeker.no>
2023-01-03 23:12:47 +01:00
Martin Whitaker
03cd8d1898 Fix disabling SMP using F2 at startup dialogue.
smp_init() used to be called after the startup dialogue, so F2 only
needed to change the enable_smp flag. Now smp_init() is called earlier,
we also need to reset num_available_cpus.
2023-01-03 11:38:55 +00:00
Sam Demeulemeester
da7b9b955d Move Memtest86+ version number to an external file (along with the the latest GIT commit hash) (#75) 2023-01-03 00:39:10 +01:00
Sam Demeulemeester
036922ab26 Bump version to v6.01 2022-12-30 16:41:28 +01:00
Sam Demeulemeester
9a86f115f4 Add 'press any key to remove' message on banner
By default, don't re-display FAIL banner after it has been discarded (#130 & #173)
Add an option to re-display FAIL banner even if previously discarded
2022-11-27 23:34:43 +01:00
Sam Demeulemeester
d3bc8fa7c2 V6.00 Final Release - Fix title '+' char shift 2022-10-23 20:21:09 +02:00
Sam Demeulemeester
1ee1078cf5
V6.00 Final Release PR (#187)
* Avoid FAIL banner being partially overwriten by new errors

* Remove beta on main title

* Remove v6 Beta Disclaimer & some README.me changes for release
2022-10-23 17:32:17 +02:00
Sam Demeulemeester
ddbee66c85 Fix a cast issue that broke the run time clock on (very) fast CPUs 2022-09-14 20:47:29 +02:00
Sam Demeulemeester
0f8981412c
Various fixes on SPD decoding algorithms (#152)
* [DDR5] Fix rounding errors on SPD Timings

* [DDR5] Add a rounding factor of ~0.3% according to JEDEC to solve the last rounding issue found on NETAC Modules

* [DDR5] Add missing package ranks per channel parameter in total module capacity algorithm

* [DDR4] Fix rounding issues in SPD timings & frequency

* [DDR3] Fix rounding issues in SPD timings & frequency decoding. Check XMP Profile #2. Add a quirk for Kingston based on very early XMP 1.0 specs

* [DDR2] Fix CAS detection & rounding issues in SPD timings w/ EPP

* [DDR] Correct SPD timings rounding issues & add support for x.5 CAS latencies

* [SDR] Correct SPD Timings decoding due to rounding errors

* Add various JEP106 Manufacturers found while debugging

* Update timings display function to handle x.5 CAS
2022-08-26 21:56:12 +02:00
a1346054
9660eead4e
Simple maintenance improvements (#145)
* Fix typos

* Add missing final newline

* Trim trailing whitespace
2022-08-15 17:51:48 +02:00
Martin Whitaker
13d9569041 By default, only enable USB keyboard detection when booted in UEFI mode.
Most legacy BIOSs will support USB legacy keyboard emulation. Using that
will avoid having to reserve memory for the USB drivers, and should
improve the chance of having a working keyboard without having to work
around various USB device quirks.
2022-07-24 13:56:41 +01:00
Sam Demeulemeester
37cb966f39 Version change to 6.00 Beta 3 (v6.00-beta3) 2022-07-17 22:31:47 +02:00
Sam Demeulemeester
034372f4bf
Add much bigger PASS/FAIL banner (#113)
The goal is to see the actual test result (PASS or FAIL) far away.
2022-07-17 20:20:52 +02:00
martinwhitaker
e6e0f0c8e7
USB improvements (#116)
* Add new heap manager.

* Convert OHCI driver to use new heap manager.

* Convert UHCI driver to use new heap manager.

* Convert EHCI driver to use new heap manager.

* Convert XHCI driver to use new heap manager.

* Convert SMP to use new heap manager.

* Add a "usbinit" boot option to handle various buggy USB devices.

This replaces the "keyboard=buggy-usb" option, and adds a second
workaround to handle the problem seen in issue #107.
2022-07-16 13:34:08 +02:00
Sam Demeulemeester
89e2643de4
Add AP Enumeration to distinguish P-Core from E-Core on Hybrid CPUs (#62)
Add AP Enumeration to distinguish E-Core from P-Core on Intel Hybrid CPUs, and exclude them from the selected cores by default.  Including E-Cores slows down some tests and takes longer to catch memory errors.

A new exclude_ecores flag has been added in config.c to include E-Cores if needed.
2022-07-16 13:28:53 +02:00
01e3
1c88824a7d
Optimize screen & serial output handling. (#85)
- Enable VGA/FB to output box drawing characters while maintaining VT100
   character set for serial. Shorten and simplify the screen setup code.

 - Track the background color to decide if the serial output needs to be
   inverted. Remove no longer needed logic for known areas of the screen that
   need to be inverted. As a bonus - popup menu can now be also inverted on
   serial.

 - Reduce the amount of data sent to serial by using CR+LF when possible
   instead of always relying on absolute positioning. Add tty_print()
   for positioning the cursor, remove no longer needed tty_print().

 - Remove no longer needed "LF -> LF+CR" logic from serial_echo_print().

Before (gcc-11.3.0-x86_64):
      text       data        bss      total filename
       929        357         64       1350 system/serial.o
      3517       1356         54       4927 app/display.o

After (gcc-11.3.0-x86_64):
      text       data        bss      total filename
       907        336         64       1307 system/serial.o
      3442       1242         54       4738 app/display.o

Co-authored-by: Sam Demeulemeester <38105886+x86fr@users.noreply.github.com>
2022-06-19 16:40:30 +02:00
Sam Demeulemeester
a5576974cf Add ACPI Timer as the primary TSC correction source and PIT Timer as fallback 2022-06-19 16:39:03 +02:00
Sam Demeulemeester
221a66da1a Split ACPI Functions from SMP functions.
Add ACPI Table detection for FADT & HPET (as we need better timers)
2022-06-19 16:39:03 +02:00
Sam Demeulemeester
6cd356f831 Add External L2 detection for ALi Aladdin V Chipset (#87) 2022-06-06 19:56:04 +02:00
Sam Demeulemeester
e154320790 v6.00-beta2 release 2022-06-03 00:42:38 +02:00
Sam Demeulemeester
0adcdfa160 Fix display issue when current temperature and/or max temperature >= 100°C 2022-05-22 18:02:54 +02:00
Sam Demeulemeester
bc8235f50d
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
Sam Demeulemeester
076e133415 Add support for non-DDR RAM in display.c 2022-05-19 16:02:31 +02:00
Sam Demeulemeester
722b1b2899 Fix console kernel parameters parsed too late at boot (#66). Reorder global init to start tty after config parsed. Allow a wider options for console argument (ie: console - console=ttySx - console=ttySx,115200 2022-05-12 16:55:52 +02:00