Commit Graph

441 Commits

Author SHA1 Message Date
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
Sam Demeulemeester
c2d033b4b4 Correct tCL detection on SDRAM 2022-05-19 17:16:13 +02:00
Sam Demeulemeester
076e133415 Add support for non-DDR RAM in display.c 2022-05-19 16:02:31 +02:00
debrouxl
c1d0c17f23 Add SPD decoding for SDRAM. 2022-05-19 15:07:09 +02:00
Sam Demeulemeester
37edb221d7 Importing minor bug fixes in smbus.c from delayed PR #44
Co-authored-by: 01e3 <01e3@ans.pl>
Co-authored-by: debrouxl <lionel_debroux@yahoo.fr>
2022-05-19 12:01:05 +02:00
Martin Whitaker
f16be176ed Fix triple-fault when starting APs with program loaded above 16MB (issue #63).
In a .code16 section, the default coding for the lgdt instruction only loads
a 24 bit base address from the GDT descriptor. When loaded above 16MB, we
need it to load the full 32 bits.
2022-05-15 12:18:07 +01:00
Martin Whitaker
f98ceb1613 Set the kernel_alignment and min_alignment fields in the Linux setup header.
This shouldn't be needed because we don't set the relocatable_kernel flag,
but the GRUB linuxefi command pays no attention to that. Currently the
linuxefi command also ignores the alignment values, but set them now in
case that changes in the future.
2022-05-15 12:18:07 +01: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
Sam Demeulemeester
c56fbe3257 Change serial console baud rate parameters to match conventional linux kernel - ie: console=ttyS0,115200 for 115200 bps (#64) 2022-05-10 23:59:20 +02:00
Martin Whitaker
e8c8ef69eb Simplify allocation of memory in efisetup.c. 2022-05-09 18:41:14 +01:00
Martin Whitaker
ef3f0bc1e5 Call cpuid_init() before the first call to map_region().
map_region() uses the long mode flag, so that must be initialised first.
2022-05-09 18:17:19 +01:00
Martin Whitaker
e429abec9f Support boot options when booting directly from EFI image (issue #53). 2022-05-08 22:46:27 +01:00
Sam Demeulemeester
a67d346ef7
Update README.md
- Add 'console' parameters details in boot options
- Change the header for the release for binary release
- Remove solved known bugs
2022-05-05 23:19:50 +02:00
Martin Whitaker
af54067228 Execute smp_init() before keyboard_init() in case ACPI tables are overwritten.
When USB keyboard detection is enabled, physical memory pages are reserved
for use by the USB drivers. The physical memory map exposed by pmem.h does
not indicate where the ACPI tables reside, so we may end up using pages
that contain ACPI tables (or for that matter, the boot parameters and boot
command line). So rather than introduce a more complicated memory allocation
scheme, make sure we have finished with all the data passed to us by the
BIOS and/or boot loader before we start probing for USB devices.

The only downside to this is that it is no longer possible to interactively
disable parsing of the ACPI tables - that can now only be done by using the
"nosmp" boot option.
2022-05-04 22:42:31 +01:00
Martin Whitaker
7b41830c40 Change "smp" boot option to "nosmp".
SMP is now enabled by default, so we need an option to disable it.
2022-05-04 22:16:14 +01:00
Martin Whitaker
eaf29f1e39 Mark keyboard reports passed to process_usb_keyboard_report() as const. 2022-05-01 22:43:04 +01:00
Martin Whitaker
260c113bb2 Detect and ignore the HID keyboard "phantom condition" (excessive roll-over). 2022-05-01 22:40:42 +01:00
Martin Whitaker
ddaa8bff3f uhci: update the data toggle bit when reenabling an interrupt transfer.
For the same reason as the preceeding ehci fix.
2022-05-01 22:05:40 +01:00
Martin Whitaker
f7d31df412 ehci: update the data toggle bit when reenabling an interrupt transfer.
Previously every second transfer was dropped. We didn't notice, because
they were normally key release events, which we ignored anyway. However
the new keyboard report handler needs to see the release events.
2022-05-01 18:27:13 +01:00
Martin Whitaker
c3bdb556d1 Move probe_usb_controller() into private functions section of usbhcd.c
No functional change. It was just in the wrong place.
2022-05-01 18:24:39 +01:00
Martin Whitaker
97d6c7140d Improved USB keyboard report handling.
A USB keyboard may return key codes in any of the 6 key code array
positions (issue #48). So we have to compare the latest report to
the previous one to detect new key presses and handle rollover. As
the same change is needed for all HCI types, factor out the common
code into the base driver.
2022-05-01 16:44:46 +01:00
Martin Whitaker
3aebe091cb xhci: mark legacy support regs as volatile and preserve reserved bits. 2022-05-01 11:49:39 +01:00
Martin Whitaker
8284e98761 Don't disable bus master capability when probing USB PCI configuration.
That can cause the SMM to freeze the system when legacy support is
enabled on some AMD XHCI controllers (issue #56).
2022-04-30 11:30:00 +01:00
martinwhitaker
93c9c8ded5
Rework memory mapping to allow for larger program size (#54)
* Improve abstraction in vmem.h and limit memory benchmarking to first 2GB.

The third GB may get used for remapping memory regions that are only
accessed during startup, so it's not safe to use it for the memory
speed tests.

* Fix calculation of end limit for locating memory benchmark workspace.

* Document vmem.h.

* Use window number, not current start address, to detect first window.

* Increase the program low-load range from 1MB to 4MB and make more robust.

If the BIOS has reserved some parts of low memory, there may not be
enough contiguous space left to load the program there (issue #49).
So increase the low-load range to include the first 3MB of high
memory. Also guard against the program being initially loaded
straddling the new boundary.

Co-authored-by: Martin Whitaker <memtest@martin-whitaker.me.uk>
2022-04-28 23:04:01 +02:00
Martin Whitaker
aa40bfb738 Accept up to 4 digits when reading CPU numbers in config menu (issue #50). 2022-04-23 16:06:53 +01:00
Martin Whitaker
e0c0cd55c6 Tidy up code for performing reset via the EFI runtime sevices.
Make this entirely local to hwctrl.c.
2022-04-23 13:25:33 +01:00
Martin Whitaker
a14a6b8e65 Fix start address calculation when booting from 32-bit EFI (issue #52) 2022-04-23 13:17:59 +01:00
Martin Whitaker
faab0a321d Only look for the RDSP in the appropriate EFI system table.
We don't support mixed-mode boot, so we will never find a 32-bit EFI
system table when running from a 64-bit binary.
2022-04-23 09:16:42 +01:00
Martin Whitaker
80bb3f452d ohci: fix startup when the controller is in SUSPEND or RESUME state. 2022-04-23 08:57:55 +01:00
Martin Whitaker
0bd19d9d91 ohci: rename variable used to preserve the frame interval.
For code clarity. No functional change.
2022-04-23 08:49:30 +01:00