Skip to content

Commit

Permalink
Enable QEMU debug exit
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Mar 14, 2022
1 parent 38218c8 commit 30e6a07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,10 @@ jobs:
Invoke-Expression "$LLVM_OBJCOPY --strip-debug -O elf32-i386 target/x86_64-unknown-hermit-loader/debug/rusty-loader"
if: ${{ matrix.os == 'windows-latest' }}
- name: Test loader
run:
qemu-system-x86_64 -display none -smp 1 -m 64M -serial stdio -kernel target/x86_64-unknown-hermit-loader/debug/rusty-loader -initrd data/x86_64/hello_world -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand
run: |
qemu-system-x86_64 -smp 1 \
-cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr,rdrand \
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-display none -m 64M -serial stdio \
-kernel target/x86_64-unknown-hermit-loader/debug/rusty-loader \
-initrd data/x86_64/hello_world
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ Afterwards, the loader is stored in `target/x86_64-unknown-hermit-loader/debug/`
As final step the unikernel application `app` can be booted with following command:

```bash
$ qemu-system-x86_64 -display none -smp 1 -m 64M -serial stdio -kernel path_to_loader/rusty-loader -initrd path_to_app/app -cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr
qemu-system-x86_64 -smp 1 \
-cpu qemu64,apic,fsgsbase,rdtscp,xsave,xsaveopt,fxsr \
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-display none -m 64M -serial stdio -enable-kvm \
-kernel path_to_loader/rusty-loader \
-initrd path_to_app/app
```

It is important to enable the processor features _fsgsbase_ and _rdtscp_ because it is a prerequisite to boot RustyHermit.
Expand Down

0 comments on commit 30e6a07

Please sign in to comment.