Commit Graph

1468 Commits

Author SHA1 Message Date
Ciro Santilli 六四事件 法轮功
7fda133215 run-gdb-user: killed it, all that was needed was to pass --userland
Fixes part of https://github.com/cirosantilli/linux-kernel-module-cheat/issues/63
2019-06-02 00:00:03 +00:00
Ciro Santilli 六四事件 法轮功
402d1343df x86 asm: expand macros in the most basic SIMD examples
Make it easier on the newbs I guess.
2019-06-02 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
819ef42ea4 kernel modules: hack up quick floating point example 2019-06-02 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
7f917af66b userland: add linkback readme 2019-06-02 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
3c5ec40ad8 tagline: link to c cpp and posix 2019-06-01 00:00:04 +00:00
Ciro Santilli 六四事件 法轮功
6204b9ad6f x86 simd: link to SSE getting started question on SO 2019-06-01 00:00:03 +00:00
Ciro Santilli 六四事件 法轮功
ddae0d52f2 x86 asm: intrinsics from memory 2019-06-01 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
277f67892b link to epi example 2019-06-01 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
26183613e5 x86 asm: addpd managed to extract doubles 2019-06-01 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
a90271c6af asm: start x86 intrinsics examples
Split userland/arch/<arch>/c/ into inline_asm and intrinsics, and move programs
that don't match either up.
2019-05-31 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
a336201b06 build-crosstool-ng: use ./configure relative path
Avoids build error in Ubuntu 16.04...
2019-05-30 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
1f55dec44c arm: thumb understanding++ 2019-05-30 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
ceadb1d776 paddq.S: comment typo 2019-05-30 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
4a4407e7a8 qemu: update to d8dae268c0a3e4e361002aca3b382fedd77f2567
Now on top of QEMU v4.0.0.

Ha, everything just worked. That wasn't fun!

Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/70
2019-05-29 00:00:04 +00:00
Ciro Santilli 六四事件 法轮功
e5682cb5cb readme: link to new procfs SE answer 2019-05-29 00:00:03 +00:00
Ciro Santilli 六四事件 法轮功
4d001f521f gem5: update to 08c79a194d1a3430801c04f37d13216cc9ec1da3
Fix gem5 userland fatal: kernel too old.

Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/64
gem5 x86 boot fails with: "Assertion `locked && curr_frag_id == 0' failed

So we are now back to mainline gem5!
2019-05-29 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
fedb68c62c merge test-user-mode and test-baremetal into test-executables
Differentiate with --mode userland vs --mode baremetal.

The code was basically copied, now it's DRY.
2019-05-29 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
6994dc21af test-gdb: can now run in either userland or baremetal modes
Selection with --mode userland (default because has x86_64) or --mode baremetal.

This is the first userland tool where this choice is done on the command line,
which led to a refactor of supported_archs and is_baremetal and is_userland
into a single self.env['mode'].
2019-05-29 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
b6126a5268 test-gdb: support userland
x86_64 not yet enabled due to silly error checking.
2019-05-28 00:00:03 +00:00
Ciro Santilli 六四事件 法轮功
e7494419fc test-gdb userland 2019-05-28 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
cd44e3b5e2 test-gdb: exit gracefully on failure instead of raising
Just print the traceback instead.

Pass extra CLI options to produce nicer output like --no-show-stdout.
2019-05-28 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
04c54a6369 test-user-mode: classify and skip all failing gem5 tests
Create userlan/posix/kill.c to better test signals.
2019-05-28 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
cc1d8d08d0 test-gdb: bring back to life
Well factored with ./test-baremetal, allowing for target selection.
2019-05-27 00:00:05 +00:00
Ciro Santilli 六四事件 法轮功
24b75f92d8 arm asm el: document virtualization failure after FP enable patch 2019-05-27 00:00:04 +00:00
Ciro Santilli 六四事件 法轮功
6e790042f0 x86 asm: align stack to 16-bits for abort() call
Fixes the failing tests that called abort(). For coincidence, only native
tests were failing.

Asked at: https://stackoverflow.com/questions/56324948/why-does-calling-the-c-abort-function-from-an-x86-64-assembly-function-lead-to
2019-05-27 00:00:03 +00:00
Ciro Santilli 六四事件 法轮功
48079d0843 crosstool-ng: update to crosstool-ng-1.24.0
Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/68

Copy source tree into build dir since ./ctng started failing out of tree.
I give up.
2019-05-27 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
8eb312c58d baremetal: move aarch64 el.c into dump_regs.c
Also start disassembling registers nicely dump_regs so we can have a
single executable to handle all register queries.
2019-05-27 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
3527c8df5b gem5: update to 865287d5b593b84d6ad91946a9ca4c49e24f9595
Include workaround for: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/64
2019-05-27 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
00b1d43164 readme: create asciidoctor-extract-links to find broken links and fix all of them.
Oh yeah.
2019-05-26 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
12005528ef gdb: move all tests to userland 2019-05-26 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
dbfec89e03 baremetal: fix getting started after userland unification 2019-05-26 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
8138e68810 update kernel version everywhere 2019-05-25 00:00:02 +00:00
Ciro Santilli 六四事件 法轮功
add6eedb76 baremetal: all examples working, all failures accounted for!
SIMD&FP is now enabled in arm from bootloader.
2019-05-25 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
8825222579 xen: document failed attempt 2019-05-25 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
05aa5c7c79 baremetal: build userland/ programs using baremetal path property instead of symlinks
Otherwise I'll go crazy with symlink action.
2019-05-24 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
edfbe9f0d7 build-xen minor improvement 2019-05-23 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
c8c4f89854 asm: make use regular asserts that will just work on baremetal
Previously had wonky line pointer in asm_main. New interface simpler and more portable.

Add tests for ASSERT_EQ_ and family in arm and aarch64, previously on x86_64.

ASSERT_EQ_ and family in ARM can now either take =123, =addr or var, before this
the = was added on macros so var was not possible.

Define the main function directly in assembly, the C driver was useless.
2019-05-23 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
72200dee4e userland: scope every header identifier with lkmc_ 2019-05-21 00:00:01 +00:00
Ciro Santilli 六四事件 法轮功
6fe9e5bae7 baremetal: symlink all programs that currently run on both userland and baremetal 2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
492d9cdf3f arm: udf instruction 2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
c15c43f0b0 tmux: pretty print the command to be executed 2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
5caf50747c gem5: update to 1bfc29b0592eb040a01d7977a14191c3d3d46c51
Work around fatal kernel too old with a hack, I can't stand it anymore.
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
8d40a61e1a bisection: update section, add gem5 linux boot bisect script 2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
c247f98d23 common: emulator name normalize shorthand to full on test results 2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
b5558eeebe linux: updated to v5.1
Fix MS_RDONLY issue https://github.com/cirosantilli/linux-kernel-module-cheat/issues/56

mmap module had trivial update on return value incompatibility.
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
01984c2201 test-boot: run in parallel
--quit-after-boot: fix for gem5, update path to gem5.sh

Improve the printing of results and errors:

- remove newlines from IDs at the end for ./test-boot
- remove newlines from progress for __call__ commands and don't print executed commands at all,
  otherwise there are too many lines per test and it is hard to tell what is going on
- print backtraces for any exception in the threads (bugs while developing this code)

Tests across different archs and emulators are still not running in parallel,
which is a huge loss. TODO.

thread_pool: introduce with API. This was motivate by test-boot, I've had enough
of doing separate error handling for each loop type! Greatly dries up the code, awesome.

common: make --all-emulators work properly with native hopefully for the last time,
./test-baremetal was still failing.

gem5: don't pass --command-line for baremetal. Maybe later we can use it to actually
pass command line arguments to main()? To be seen.
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
75fd708099 gem5: update to e2656006df442a995bf80ee03fa9700d6ec14537
The previous commit was failing to build in .fast due to unused variable on DPRINF:

/path/to/linux-kernel-module-cheat/out/gem5/default/build/ARM/dev/arm/gic_v3.cc: In member function 'virtual Tick Gicv3::read(PacketPtr)':
/path/to/linux-kernel-module-cheat/out/gem5/default/build/ARM/dev/arm/gic_v3.cc:94:21: error: unused variable 'context_id' [-Werror=unused-variable]
     const ContextID context_id = pkt->req->contextId();
                     ^~~~~~~~~~
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
5391bc1bfd Get rid of lkmc_assert_fail in favor of abort + assert
What was missing previously was implementing abort in baremetal.

I had done that previously and forgotten to do this conversion!
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
3b192bacfc gem5: enable SLICC_HTML by default
No downsides as far as I see, so let's just test it by default.
2019-05-21 00:00:00 +00:00
Ciro Santilli 六四事件 法轮功
878eb0ad98 build: use just gcc instead of x86_64-linux-gnu-gcc when host arch == target arch and --gcc-which host
This is particularly important to easily build userland content on host,
as different distros will have different prefixes as mentioned at:
https://github.com/cirosantilli/linux-kernel-module-cheat/issues/66
2019-05-21 00:00:00 +00:00