Commit Graph

420 Commits

Author SHA1 Message Date
Martin Whitaker
148dfd4d54 Apply the USB_2_STEP_INIT option when using an XHCI controller.
This was added to the generic assign_address() method, but the XHCI
driver overrides that.
2022-08-05 20:48:24 +01:00
Martin Whitaker
1316c6c099 Fix scanning of an external USB hub attached to an Intel XHCI (issue #135)
The Intel controller requires unused fields in the input context to be zero.
2022-08-05 20:40:18 +01:00
Sam Demeulemeester
8a3cac8133 Fix an issue while detection Core topology on Core 2 CPU.
Some CPU like Intel Yorkfield (Core 2 Quad) reports max CPUID > 0xB but doesn't support CPUID = 0xB. Check x2apic flag to be sure CPUID 0xB is supported. If not, fallback to older detection method
2022-07-26 20:02:58 +02:00
Lionel Debroux
408fdb8db6 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
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
740df34656 Remove now useless IMC check to allow temperature reporting on more older CPUs 2022-07-23 23:59:49 +02:00
Sam Demeulemeester
cf156adc4a Solve an issue with Core 2 Duo/Quad and same gen CPUs, where HTT flag is enabled in CPUID while the CPU does not support SMT. (#125 #129)
Now compare the number of physical core with the number of reserved APIC to check if SMT is really available or not
2022-07-23 23:47:06 +02:00
Sam Demeulemeester
53f61e6b87 Add 'Heoriady' and 'Golden Empire' to the list of known JEDEC Manufacturers for SPD decoding (#22) 2022-07-23 23:01:53 +02:00
Sam Demeulemeester
37cb966f39 Version change to 6.00 Beta 3 (v6.00-beta3) 2022-07-17 22:31:47 +02:00
Sam Demeulemeester
187bc8609e Add support for nForce 410/430 & 680a/680i/780i/790i chipsets (tested) 2022-07-17 20:28:58 +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
Martin Whitaker
c2e94527e1 Fix handling of EFI memory map when located above 4GB (issue #115)
The code which saves and restores the upper 32 bits of the address
was not being included, due to a typo in the #ifdef expression.
2022-07-13 20:57:02 +01:00
Sam Demeulemeester
6b998e82e7 [TTY/Serial] Always use absolute positioning instead of relying on CR-LF 2022-06-19 16:47:10 +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
680e6ad79b Typo on smp.c (missing ;) 2022-06-19 16:39:03 +02:00
Sam Demeulemeester
231b389b3c Various minor cosmetic changes on acpi.c/h (mainly comments and code format) 2022-06-19 16:39:03 +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
eac4d03462 Parse FADT to find ACPI Timer Base Address and specs 2022-06-19 16:39:03 +02:00
Sam Demeulemeester
cee2d32766 Add a few ACPI Tables Signature that could be useful later 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
Lionel Debroux
63a07258fd Fix the operation of the SMBus functions which require the SMBus controller ID. 2022-06-08 18:00:50 +02:00
Sam Demeulemeester
7758adfb9d Improve readability on disabled code 2022-06-06 22:24:09 +02:00
Sam Demeulemeester
106eabef98 Fuse HYGON and AMD because the SMB controllor is strictly identical on both 2022-06-06 22:24:09 +02:00
Lionel Debroux
e86b04a14a Perform major simplification in smbus.c to reduce code size while keeping the functions readable, removing several unused strings and unnecessary arguments passed to several functions.
Add a bunch of PCI device IDs and driver indications for other SMBus controllers, so as to avoid other persons having to do that work again.
Add support for two PIIX4 devices: the standard PIIX4 PCI device ID, and the ServerWorks CSB5, which has a slight twist.

Co-authored-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Co-authored-by: Sam Demeulemeester <sam@x86.fr>
2022-06-06 22:24:09 +02:00
Sam Demeulemeester
6cd356f831 Add External L2 detection for ALi Aladdin V Chipset (#87) 2022-06-06 19:56:04 +02:00
dependabot[bot]
9ed7e22091
Bump actions/stale from 4 to 5 (#99)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 14:44:47 +02:00
Bensuperpc
c9f36fd4f5
Add github action (#90)
- Add build with ubuntu 18.04 and 20.04
- Add build with GCC and Clang
- Add dependabot
- Add stalebot

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2022-06-05 14:40:15 +02:00
Sam Demeulemeester
fa563a8cb2 Change the way hwquirks are processed. Add a pointer to the needed function on quirk struct, so it can be executed at any point of the code 2022-06-05 14:36:56 +02:00
Sam Demeulemeester
e154320790 v6.00-beta2 release 2022-06-03 00:42:38 +02:00
Sam Demeulemeester
fae2ae9e13
Update README.md with new console parameters 2022-06-01 00:09:55 +02:00
Sam Demeulemeester
e1508a02be Better detection of AMD SBxxx Southbridge using Revision IDs.
Add support for nForce 600a & 700a series
2022-05-25 01:11:11 +02:00
Sam Demeulemeester
69aeda1c27 Discard Memory SKU when filled with 0xFF. Remove a debug function forgotten there 2022-05-24 01:13:37 +02:00
Sam Demeulemeester
7c969db4da Add support for nVidia nForce2 MCP (#86) 2022-05-24 01:00:52 +02:00
Sam Demeulemeester
1383f871d8 Add preliminary support for RPL-S PCH 2022-05-23 01:09:13 +02:00
Sam Demeulemeester
67cb78f4e5 Add support for AMD/ATI Southbridge (SB600->SB900) 2022-05-22 18:33:49 +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
martinwhitaker
4b17a4cc0c
Merge pull request #76 from memtest86plus/debrouxl/size_optimizations
Save space by inlining functions and getting rid of library functions which become unused
2022-05-21 20:48:25 +01:00
Martin Whitaker
3a107018e5 Reset EHCI controller after port scan if no keyboards are found.
Low and full speed USB devices that are attached directly to an EHCI port
have to be handled by a companion controller (either UHCI or OHCI). We hand
over ports when we detect a low or full speed device is attached by setting
the Port Owner bit in the Port Status and Control register. However some AMD
companion controllers fail to detect the device after this has been done.
Resetting the EHCI controller works around this quirk.

This fixes issue #6 and issue #71.
2022-05-21 20:22:03 +01:00
Lionel Debroux
c6ff7b1486 Inline the ctype functions, so as to reduce size. 2022-05-21 10:11:45 +02:00
Lionel Debroux
cd68333f86 Get rid of memcpy(), as __builtin_memcpy() is globally smaller - and faster anyway - in all current and foreseeable occurrences. 2022-05-21 10:11:37 +02:00
Lionel Debroux
438201195d Get rid of out of line memset(), as __builtin_memset() is not larger - even usually smaller - and faster anyway in all current and foreseeable occurrences. 2022-05-21 10:11:37 +02:00
Sam Demeulemeester
dce2cfb079 Fix a detection issue caused by some Pre-ZEN AMD CPUs sometimes incorrectly reporting SMT as supported 2022-05-21 01:31:06 +02:00
Sam Demeulemeester
3bc72c1fd4 Remove unused strings and useless smb_idx argument in get_spd() 2022-05-20 19:10:00 +02:00
Sam Demeulemeester
e0cee8e2c3 Add SMBUS support for Intel 82371AB (PIIX4) and AMD Bulldozer/Kabini (SB800/900) 2022-05-20 18:07:22 +02:00
Sam Demeulemeester
6b253adb9a Include unistd.h in pci.c to use usleep() 2022-05-20 13:46:29 +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
d901f9e8a1 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
Lionel Debroux
caa07482a0 Reorganize struct spd_infos for better alignment (#2), fix left shifts of count > width of type, fix whitespace, improve comments. 2022-05-19 18:45:13 +02:00