Martin Whitaker
d1382b7a53
Increase timeout delay for starting APs.
2022-02-13 20:25:11 +00:00
Martin Whitaker
2bf1623733
Halt CPU cores that are not active in a test.
...
This saves a lot of power when performing sequential tests.
2022-02-12 19:30:14 +00:00
Martin Whitaker
de32bc5412
Ensure we only use 32-bit reads and writes when accessing APIC registers.
2022-02-12 09:39:18 +00:00
Martin Whitaker
7dd17c26c0
Check whether the BIOS has enabled x2APIC mode, and disable SMP if so.
2022-02-05 18:03:32 +00:00
Martin Whitaker
29b8bbece8
Rework AP startup based on how it's done in Linux.
2022-02-05 18:03:32 +00:00
Martin Whitaker
dcac527068
Don't make assumptions about usable memory.
...
When using a legacy BIOS, the memory regions used by the BIOS are well
defined. This is not the case when using a UEFI BIOS. So include the
stack area in the BSS so the loader knows how much memory to allocate,
and check we have space to relocate the program to either low or high
memory.
There are still some assumptions in the USB driver code that need to
be fixed.
2022-02-02 12:20:39 +00:00
Martin Whitaker
fd141c59c7
Use "CPU core" in preference to "CPU" in comments.
2022-02-01 15:42:44 +00:00
Martin Whitaker
da0d2a9fc3
The apic_id_to_cpu_num[] map needs to be unsigned to support > 256 cores.
2022-02-01 15:40:52 +00:00
Martin Whitaker
16d55b7dad
Remove distinction between physical and virtual CPUs.
...
This is no longer needed, now we can display as many CPUs as we can
physically handle.
2022-01-31 22:59:14 +00:00
Martin Whitaker
17093a96f9
Optimise the AP startup code to reduce the startup delay.
2022-01-31 19:47:32 +00:00
Martin Whitaker
f348add314
Remap numeric keypad to cursor keys.
2022-01-30 15:18:25 +00:00
Martin Whitaker
4589c7dad4
Recognise cursor keys and map them to 'l', 'r', 'u', 'd'.
2022-01-30 15:12:42 +00:00
Martin Whitaker
151870cc0b
Display enabled CPUs as a scrollable list in the config menu.
...
This removes a constraint on the number of CPU cores we can support.
2022-01-30 15:12:04 +00:00
Martin Whitaker
c5e9fa4e18
Increase maximum number of APs to 256.
2022-01-29 16:13:05 +00:00
Martin Whitaker
01365ab2e7
A few more code tweaks and comment typo fixes in the EHCI driver.
2022-01-28 19:55:31 +00:00
Martin Whitaker
8509e3320a
Minor code tweaks - no functional change.
2022-01-23 17:55:57 +00:00
Martin Whitaker
563c8a1ee7
Add support for EHCI USB controller.
2022-01-23 17:38:50 +00:00
Martin Whitaker
5b56d76e03
Minor fixes and refactoring in preparation for EHCI support.
2022-01-23 17:34:08 +00:00
Martin Whitaker
0fded3e321
Store pmem temporary arrays on the stack to reduce memory footprint.
...
Now we have more stack space available for the BSP during initialisation,
we no longer need to store the temporary data off stack.
2022-01-09 21:27:44 +00:00
Martin Whitaker
4400ec6f17
Rename usbkbd to usbhcd to better reflect the new design.
2022-01-08 23:14:50 +00:00
Martin Whitaker
52a87c5d40
Add support for USB hubs.
...
This refactors the USB driver code into a more object-oriented design,
with usbkbd.c being the base class and ohci.c and xhci.c being subclasses.
This makes the code that performs USB device enumeration independent of
the host controller.
2022-01-08 23:00:28 +00:00
Martin Whitaker
84da9f7553
Refactor USB driver code to prepare for supporting USB hubs.
2021-12-29 18:17:46 +00:00
Martin Whitaker
a4c62cae97
XHCI: don't scan USB3 ports - keyboards will only be found on USB2 ports.
2021-12-28 16:14:29 +00:00
Martin Whitaker
9785d8f8b9
Map USB controller registers into the reserved area of virtual memory.
...
This ensures they are accessible when the test is running, and if they
are physically mapped above 4GB.
2021-12-23 17:45:26 +00:00
Martin Whitaker
d9fee4dcbb
Flush caches between writing and verifying test data.
...
Mostly we write and read large chunks of data which will make it likely
that the data is no longer in the cache when we come to verify it. But
this is not always true, and in any case, we shouldn't rely on it.
2021-12-23 11:00:10 +00:00
Martin Whitaker
11c0c6c2f5
Use atomic memory read/write functions in tests.
...
This ensures compiler optimisations won't interfere with the tests.
2021-12-23 10:07:55 +00:00
Martin Whitaker
eb58a63ad4
XHCI: add device attach time delay after starting the controller.
2021-12-22 19:08:14 +00:00
Martin Whitaker
8069b8724b
Initial support for native USB keyboard interface.
...
This adds support for USB keyboards connected directly to an OHCI
or XHCI controller.
2021-12-22 17:31:06 +00:00
Martin Whitaker
a7d17186f3
Improved PCI configuration space access functions.
2021-12-05 14:15:37 +00:00
Martin Whitaker
8f1d81b65d
Add missing includes of stdbool.h.
...
To ensure we aren't dependent on the order of inclusion.
2021-12-05 13:50:25 +00:00
Martin Whitaker
ec676ccab2
Add debug trace for ACPI RSDP search results.
2020-12-11 16:18:45 +00:00
Martin Whitaker
bb667b600f
Use ACPI RSDP address from boot_params if provided by bootloader.
2020-12-11 16:18:04 +00:00
Martin Whitaker
1d2bf57403
Improve and fix scanning for ACPI tables.
2020-12-11 13:27:05 +00:00
Martin Whitaker
27c5fe363f
Add startup option to enable/disable SMP.
2020-12-10 13:51:39 +00:00
Martin Whitaker
725435d5c7
Add support for 24bpp frame buffer.
2020-07-09 15:51:04 +01:00
Martin Whitaker
366e7a1af4
Improve code readability.
2020-06-30 13:58:33 +01:00
Martin Whitaker
7d00dbe26a
Remove duplicate EFI table definitions.
2020-06-30 13:57:15 +01:00
Martin Whitaker
9492c086fe
Move boot_params definitions into separate header file.
2020-06-29 12:09:13 +01:00
Martin Whitaker
fbd3376668
Initial commit.
2020-05-24 21:30:55 +01:00