Commit Graph

10 Commits

Author SHA1 Message Date
Martin Whitaker
4078b7760e Faster barrier implementation.
The old barrier implementation was very slow when running on a multi-socket
machine (pcmemtest issue 16).

The new implementation provides two options:

  - when blocked, spin on a thread-local flag
  - when blocked, execute a HLT instruction and wait for a NMI

The first option might be faster, but we need to measure it to find out. A
new boot command line option is provided to select between the two, with a
third setting that uses a mixture of the two.
2022-02-28 22:05:21 +00:00
Martin Whitaker
311a597766 Remove unnecessary memory fence from spin_lock().
The x86 locked instructions enforce total memory ordering, so the
additional fence is redundant.
2022-02-28 22:05:21 +00:00
Martin Whitaker
f8b82eb0bd Exclude copyright notices from Doxygen file descriptions. 2022-02-19 19:56:55 +00:00
Martin Whitaker
76adad2fe6 Add ability to generate internal API documentation using Doxygen. 2022-02-19 16:17:40 +00:00
Martin Whitaker
d09c5ed7b4 Remove the power-saving delay loop from the usleep function.
Now we halt inactive CPU cores, this should no longer be needed.
2022-02-19 13:04:26 +00:00
Martin Whitaker
c23b129e55 Remove delay loop from spinlock wait.
Now we halt CPU cores that are going to be idle for a lengthy period,
we don't need to try to save power in other ways. And anyway, this was
not very effective.
2022-02-12 19:33:53 +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
808cd46582 Enable entry of address limits greater than 4GB on 32-bit build. 2020-05-29 20:42:26 +01:00
Martin Whitaker
c688a83888 Add string terminator to read_value() buffer. 2020-05-29 20:00:34 +01:00
Martin Whitaker
fbd3376668 Initial commit. 2020-05-24 21:30:55 +01:00