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

Pure-Rust boot sequence #74

Merged
merged 86 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
fa7a2a6
[bootstrap] start implementing 32-bit bootstrap crate
hawkw Oct 19, 2016
ed6a9e8
[build] add target for 32-bit module
hawkw Oct 19, 2016
55c2cbc
[build] rename bootstrap crate
hawkw Oct 20, 2016
4b8d438
[build] Rust boot code actually gets linked in now
hawkw Oct 23, 2016
4c985a2
[build] fix make clean task
hawkw Oct 24, 2016
a34f9bb
Merge branch 'master' of github.com:hawkw/sos-kernel into new-rust-boot
hawkw Oct 27, 2016
b74ffa4
[boot] implement page-table mapping in pure Rust
hawkw Jan 23, 2017
27a05ce
[boot] change boot module to make a binary (start on #69)
hawkw Jan 23, 2017
5b052f1
[bootstrap] start implementing 32-bit bootstrap crate
hawkw Oct 19, 2016
12e5f6f
[build] add target for 32-bit module
hawkw Oct 19, 2016
db86de3
[build] rename bootstrap crate
hawkw Oct 20, 2016
7f5e21d
[build] Rust boot code actually gets linked in now
hawkw Oct 23, 2016
29089e2
[build] fix make clean task
hawkw Oct 24, 2016
3cdc945
[boot] implement page-table mapping in pure Rust
hawkw Jan 23, 2017
8c9a603
[boot] change boot module to make a binary (start on #69)
hawkw Jan 23, 2017
e57ba65
Merge branch 'new-rust-boot' of github.com:hawkw/sos-kernel into new-…
hawkw Jan 23, 2017
2da3050
[kernel, x86_64] almost finish rust boot process
hawkw Jan 24, 2017
43989f8
[boot] remove unused data segment descriptor from boot gdt
hawkw Jan 25, 2017
cee4d55
[boot] re-add functions for page table setup
hawkw Jan 25, 2017
c72d7ec
more work on trying to fix boot
hawkw Jan 25, 2017
2da7183
[boot] slightly prettier code for setting long mode?
hawkw Jan 26, 2017
5f1f82c
[boot] make some boot code prettier
hawkw Jan 26, 2017
5b66c91
[boot] fix objcopy mangling the boot executable
hawkw Jan 26, 2017
ce09656
[build] add Make task for getting the last exception
hawkw Jan 26, 2017
d7e2c49
[boot] long mode jump PROBLEM CHANGED
hawkw Jan 26, 2017
b2b639f
[boot] problem changed again
hawkw Jan 26, 2017
fb3ed50
[boot] remove data segment from GDT
hawkw Jan 26, 2017
193aaff
[boot] make GDT pointer much rustier
hawkw Jan 26, 2017
421d0e0
[boot] add support for making a debug and release boot object
hawkw Jan 28, 2017
705c9d5
[boot] fix boot loop entering 64-bit code!
hawkw Jan 28, 2017
219e702
[boot] make GDT loading more idiomatic
hawkw Jan 29, 2017
fad5219
[boot] add a cute macro for setting control register flags
hawkw Jan 29, 2017
aecfd1f
[boot] clean up boot module a little
hawkw Jan 29, 2017
2953f73
[boot] make boot writing to VGA buffer prettier
hawkw Jan 29, 2017
01ba0a7
[boot] add test for multiboot support back in
hawkw Jan 29, 2017
ae70797
[boot] make page table mapping even more idiomatic
hawkw Jan 29, 2017
d776c65
[chore] add .gdb_history to .gitignore
hawkw Jan 29, 2017
c45a7c0
[chore] have travis build the whole kernel, hopefully fixing build
hawkw Jan 29, 2017
2d2a7af
[bootstrap] start implementing 32-bit bootstrap crate
hawkw Oct 19, 2016
c1030b3
[build] add target for 32-bit module
hawkw Oct 19, 2016
62af7fe
[build] rename bootstrap crate
hawkw Oct 20, 2016
acebe89
[build] Rust boot code actually gets linked in now
hawkw Oct 23, 2016
5f221e9
[build] fix make clean task
hawkw Oct 24, 2016
490a879
[boot] implement page-table mapping in pure Rust
hawkw Jan 23, 2017
549ff46
[boot] change boot module to make a binary (start on #69)
hawkw Jan 23, 2017
06fd63e
[bootstrap] start implementing 32-bit bootstrap crate
hawkw Oct 19, 2016
b093f5d
[build] add target for 32-bit module
hawkw Oct 19, 2016
2bc4888
[build] rename bootstrap crate
hawkw Oct 20, 2016
3ea6558
[build] Rust boot code actually gets linked in now
hawkw Oct 23, 2016
0611bc3
[boot] implement page-table mapping in pure Rust
hawkw Jan 23, 2017
a97289e
[boot] change boot module to make a binary (start on #69)
hawkw Jan 23, 2017
6c4d0fe
[boot] remove unused data segment descriptor from boot gdt
hawkw Jan 25, 2017
9bef8eb
[boot] re-add functions for page table setup
hawkw Jan 25, 2017
e248f8a
more work on trying to fix boot
hawkw Jan 25, 2017
4f9cc5c
[boot] slightly prettier code for setting long mode?
hawkw Jan 26, 2017
84a575b
[boot] make some boot code prettier
hawkw Jan 26, 2017
e013c87
[boot] fix objcopy mangling the boot executable
hawkw Jan 26, 2017
7f9917a
[build] add Make task for getting the last exception
hawkw Jan 26, 2017
23afed2
[boot] long mode jump PROBLEM CHANGED
hawkw Jan 26, 2017
3ac63b3
[boot] problem changed again
hawkw Jan 26, 2017
3c34e60
[boot] remove data segment from GDT
hawkw Jan 26, 2017
158acbc
[boot] make GDT pointer much rustier
hawkw Jan 26, 2017
e8e1ba3
[boot] add support for making a debug and release boot object
hawkw Jan 28, 2017
7bf34c8
[boot] fix boot loop entering 64-bit code!
hawkw Jan 28, 2017
7eb5e20
[boot] make GDT loading more idiomatic
hawkw Jan 29, 2017
f14364a
[boot] add a cute macro for setting control register flags
hawkw Jan 29, 2017
da17d8f
[boot] clean up boot module a little
hawkw Jan 29, 2017
5ea9130
[boot] make boot writing to VGA buffer prettier
hawkw Jan 29, 2017
d8f1104
[boot] add test for multiboot support back in
hawkw Jan 29, 2017
5cd395f
[boot] make page table mapping even more idiomatic
hawkw Jan 29, 2017
c3c0256
[chore] add .gdb_history to .gitignore
hawkw Jan 29, 2017
bdafa32
[chore] have travis build the whole kernel, hopefully fixing build
hawkw Jan 29, 2017
cacbc26
Merge branch 'new-rust-boot' of github.com:hawkw/sos-kernel into new-…
hawkw Jan 29, 2017
d1a4a26
[boot] remove boot/main.rs
hawkw Jan 29, 2017
68614c5
[x86_64] add the rest of bss to the bss section
hawkw Jan 29, 2017
e1041ee
[x86_64] start trying to fix page fault in heap
hawkw Jan 29, 2017
2ae3312
[build] attempt to fix travis not having a cross toolchain
hawkw Jan 31, 2017
0e6150a
[travis] attempt to fix bash syntax on travis script
hawkw Jan 31, 2017
1e74bb6
[travis] another attempt to fix travis bash syntax
hawkw Jan 31, 2017
e463c73
[travis] fix even more bad bash syntax
hawkw Jan 31, 2017
e197ff4
[cpu][x86_all] link to boot GDT in cpu module
hawkw Jan 31, 2017
462416c
[cpu, boot][x86_all] fix linking to GDT in CPU crate
hawkw Jan 31, 2017
93eff6d
[cpu][x86_64] remove dead code in IDT gate module
hawkw Jan 31, 2017
447b037
[travis] make ~/bin/ if it doesn't exist on CI
hawkw Jan 31, 2017
1b68031
[travis] also link x86_64 strip on ubuntu
hawkw Jan 31, 2017
efde010
[x86_64][boot] clean up some leftover stuff from asm boot
hawkw Jan 31, 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
256 changes: 256 additions & 0 deletions .gdb_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
stepi
stepi
exit
hbreak _start
hbreak arch_init
continue
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
info address 0007ff00
info address stack_top
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
hbreak boot::set_long_mode
continue
stepi
hbreak _start
hbreak boot::set_long_mode
hbreak arch_init
continue
stepi
stepi
stepi
hbreak _start
continue
stepi
stepi
hbreak _start
continue
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
info
info symbol 0x00fc0039
info stack_top
info address stack_top
continue
stepi
stepi
stepi
hbreak _start
hbreak arch_init
continue
continue
stepi
hbreak boot::set_long_mode
continue
stepi
stepi
stepi
stepi
stepi
continue
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
stepi
[A
python from pygments import get_all_styles as styles
hbreak _start
hbreak boot::set_long_mode
continue
continue
stepi
stepi
stepi
step
step
step
step
step
step
step
step
step
step
step
stepi
stepi
stepi
stepi
stepi
continue
continue
python from pygments.styles import get_all_styles as styles
python for s in styles(): print(s)
q
hbreak _start
mov start
continue
stepi
stepi
hbreak boot::set_long_mode
continue
continue
continue
step
step
info address GDT_PTR
info symbol 0x207b86
info symbol 0x1be15f
stepi
stepi
hbreak boot::set_long_mode
continue
step
step
info gdt
info address GDT_PTR
step
step
step
hbreak boot::set_long_mode
continue
step
q
hbreak boot::set_long_mode
continue
step
step
step
step
hbreak _start
hbreak start
continue
hbreak start
continue
arwp
step
info symbol 0x20814f
info symbol 0x100a48
info address gdt64.ptr
step
step
stepi
stepi
hbreak arch_init
continue
hbreak arch_init
q
hbreak arch_init
continue
continue
hbreak arch_init
continue
stepi
stepi
stepi
q
hbreak arch_init
continue
stepi
q
hbreak boot::set_long_mode
cont
step
step
stepi
stepi
stepi
stepi
stepi
stepi
q
continue
q
hbreak arch_init
continue
step
q
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Created by https://www.gitignore.io/api/assembler,rust,emacs,osx,sublimetext,tags,vagrant,vim,linux

### Kernel binaries ###
/build/
*.iso
*.bin
*.elf
Expand Down Expand Up @@ -156,6 +155,8 @@ Session.vim
tags
.tags1

### GDB ###
.gdb_history

### Linux ###
*~
Expand Down
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ before_install: |
brew update && brew tap homebrew/bundle &&
travis_wait 120 brew bundle;
printf "\n\n[target.x86_64-sos-kernel-gnu]\nlinker = \"/usr/local/bin/x86_64-pc-elf-gcc\"" >> $HOME/.cargo/config;
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
objcopy=$(which objcopy) &&
strip=$(which strip) &&
mkdir -p $HOME/bin &&
ln -s $objcopy $HOME/bin/x86_64-elf-objcopy &&
ln -s $strip $HOME/bin/x86_64-elf-strip
fi
install:
Expand Down Expand Up @@ -74,7 +80,7 @@ install:

script:
- make test
- xargo build --target x86_64-sos-kernel-gnu
- make kernel

# after_success:
# - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then travis-cargo doc && travis-cargo doc-upload; fi
Expand All @@ -92,4 +98,5 @@ env:
global:
# override the default `--features unstable` used for the nightly branch (optional)
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- PATH="$PATH:$HOME/bin"
- secure: Vv4bFCkxM3o7FpKjcxTzQRWdkp5aSfrkmFcxSRLYFhm8tyeh+TRiC2+ucNfscFeOzPTC/hTwatbbpdTIaAZKpyrD/gB4hNiGFdKV1x1pw23KQkiPmQdFKxAHtIS20jeIa44q6kPltTQtZXXuM8s0xc6r+C14Q6igd4HkD0nLhAlKIQpcS/srXoeMheL3vNIroasHUwFgpv1LLJnMqYhCHzNk2Y6CaxYygg5Cy2gS9G1nfxdNVfF4iaUXYZKgU0s3C1GL0ApTtUxW0uT/NS0UBZwttsq9NvwmZSZQIXpfTnn0wHd4cl8MhokUQNEumFouU5rlEIcFS9ulohxaHnn50cqfos+seblKs2E+MJoX8rBO5Kz3dNE3+otZw9CpImskO4EKA2MYwtTC3Ds4uVoleS9PskCMz32jKXqp6WqZkJgpimHrdv0jNBy2ucTMdw91XjRXLA557GPRa/28TPpKkMYrSB02c2IadftexWKDP5Q9uMsfTEgIpXzx/XRQvPoxtJo+rOn9hTbyHWexKEMAuic12FBoYFOMSbRKtpT8kjtd8WeBzc1RmXZYpg5td5EN3v/2fmvM6F6Sz/db4HgNZIccC/j/fWvXN7njRl8bgMC002/tkQs0Ugl1aE5onaK9DTMHquqCLnd9CADwXdQf1YsfxryjhhBfd1WIfuqe1Ww=
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [ # hacked around by
]

build = "build.rs"

# build = false
# [[bin]]
# name = "sos_kernel_full"

Expand Down Expand Up @@ -62,7 +62,7 @@ features = ["spin_no_std"]

[dependencies.vga]
path = "vga"
features = ["kinfo"]
features = ["kinfo", "system_term"]

[dependencies.alloc]
path = "alloc"
Expand All @@ -71,6 +71,3 @@ features = ["buddy_as_system"]
[dependencies.clippy]
version = "0.0.60"
optional = true

[build-dependencies]
nasm-rs = { git = "https://github.com/medek/nasm-rs" }
Loading