Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader #115

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bdb1d06
Don't truncate module when signing
iankronquist Jun 29, 2017
f12949e
Merge branch 'master' of github.com:iankronquist/kernel-of-truth
iankronquist Jul 8, 2017
ece4e82
First stab at the loader
iankronquist Jul 8, 2017
f0cca1e
Relocation successful
iankronquist Jul 9, 2017
9e064f8
Optimize for a smaller header file
iankronquist Jul 9, 2017
185036c
Make kernel_main a constructor
iankronquist Jul 9, 2017
81a6116
Paging and elf loader
iankronquist Jul 9, 2017
31df394
Align embedded kernel array
iankronquist Jul 9, 2017
0402ffb
Link kernel properly
iankronquist Jul 9, 2017
b53a114
Don't use a silly script to embed the elf kernel
iankronquist Jul 11, 2017
5a5d9d3
Tags should include loader
iankronquist Jul 11, 2017
210bb7b
Don't need Python in the Makefile
iankronquist Jul 11, 2017
014353e
Remove debug lines
iankronquist Jul 11, 2017
e50a476
Define 64 bit symtab macros as macro functions
iankronquist Jul 11, 2017
305d0a9
Remove debug logs & fix warnings
iankronquist Jul 11, 2017
41b00c7
Remove more debug logs
iankronquist Jul 11, 2017
8e3a1ac
Assembly definitions
iankronquist Jul 11, 2017
2ca93d4
Remove silly python script
iankronquist Jul 11, 2017
1ce6181
Fix Makefile loader dependencies & loader header
iankronquist Jul 11, 2017
8519a2e
Initialize BSS.
iankronquist Jul 11, 2017
6fc95a1
More parens around macro argument symbols
iankronquist Jul 11, 2017
d32d4c1
Remove unnecessary instruction
iankronquist Jul 11, 2017
f0f4960
Nuke unused debug code
iankronquist Jul 11, 2017
88eb7ae
Use header e_entry as opposed to init_array
iankronquist Jul 11, 2017
475c2b1
Propagate const
iankronquist Jul 11, 2017
99c5a70
Define funky symbols as typed macros
iankronquist Jul 11, 2017
f0addba
Refactor map bss function
iankronquist Jul 11, 2017
90948f4
Force remap option
iankronquist Jul 12, 2017
8c237b9
Checked wrong cpuid leaf
iankronquist Jul 12, 2017
a10eb1a
Boot remap sections
iankronquist Jul 12, 2017
54d37fe
Pass boot info from loader to kernel
iankronquist Jul 12, 2017
a5d9b41
Bounds check against right table during so loading
iankronquist Jul 12, 2017
6f55997
Add KASLR to readme feature list
iankronquist Jul 12, 2017
58d01f3
Change strip target
iankronquist Jul 12, 2017
3dfec77
Don't fractal map in loader
iankronquist Jul 12, 2017
407c071
Remove unused function
iankronquist Jul 12, 2017
522b985
Unused symbols
iankronquist Jul 12, 2017
6ef784c
Remove unused functions
iankronquist Jul 12, 2017
a2a4e53
Move string functions into own file
iankronquist Jul 12, 2017
d5d94f9
Split monolith into logical little pieces
iankronquist Jul 12, 2017
a87e1e6
Move structure definitions to header file
iankronquist Jul 12, 2017
1e7acfc
Add #pragma once to elf header
iankronquist Jul 12, 2017
3cde7c3
Change inline assembly to make clang-tidy happy
iankronquist Jul 12, 2017
a41b454
Define atomic macro which old clang doesn't have
iankronquist Jul 12, 2017
eebcd94
Split elf and segments into separate files
iankronquist Jul 12, 2017
64005ae
Fix forgotten includes
iankronquist Jul 12, 2017
3423c5c
Clang complains about inline asm
iankronquist Jul 12, 2017
cdf881d
Create clang tidy target
iankronquist Jul 12, 2017
45c75df
Make clang-tidy not error
iankronquist Jul 12, 2017
03ac795
Use toolchain strip
iankronquist Jul 12, 2017
a119ca2
Fix NULL pointer dereference
iankronquist Jul 12, 2017
0c55688
Forgot some loader includes
iankronquist Jul 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More parens around macro argument symbols
iankronquist committed Jul 11, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 6fc95a17d5549d2581f8faab5dd6d87e1314ad6e
4 changes: 2 additions & 2 deletions include/truth/types.h
Original file line number Diff line number Diff line change
@@ -78,9 +78,9 @@ extern uint8_t __kernel_end;

#define container_of(child, parent_type, parent_entry) \
((parent_type)(child - &((parent_type)NULL)->parent_entry))
#define align_as(value, alignment) (value & ~(alignment - 1))
#define align_as(value, alignment) ((value) & ~((alignment) - 1))
#define is_power_of_two(value) ((((value) - 1) & value) == 0)
#define is_aligned(value, alignment) !(value & (alignment - 1))
#define is_aligned(value, alignment) !((value) & ((alignment) - 1))
#define round_next(x, y) (((x) + (y - 1)) & ~(y - 1))
#define static_array_count(x) (sizeof(x) / sizeof(x)[0])