Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yabits/ebcvm
EFI Byte Code Virtual Machine in userspace
https://github.com/yabits/ebcvm
bytecode ebc uefi virtual-machine vm
Last synced: about 2 months ago
JSON representation
EFI Byte Code Virtual Machine in userspace
- Host: GitHub
- URL: https://github.com/yabits/ebcvm
- Owner: yabits
- License: mit
- Created: 2018-10-07T16:24:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-29T05:35:17.000Z (almost 2 years ago)
- Last Synced: 2024-06-26T18:58:53.989Z (7 months ago)
- Topics: bytecode, ebc, uefi, virtual-machine, vm
- Language: C
- Homepage:
- Size: 262 KB
- Stars: 73
- Watchers: 9
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-uefi-security - ebvm
README
# ebcvm [![CircleCI](https://circleci.com/gh/yabits/ebcvm.svg?style=shield)](https://circleci.com/gh/yabits/ebcvm)
EFI Byte Code Virtual Machine in Userspace
[ebcvm](https://github.com/yabits/ebcvm) is
a usermode EFI Byte Code (EBC) virtual machine.
It supports all EBC instructions described in UEFI Specification.
It also supports a few UEFI native code emulations and a simple debugger.## Building ebcvm
To build ebcvm, simply run:
```
$ make
```This will build following executables.
* ebcvm: EBC VM
* tools/ebcdisas: Disassembler for EBC binaries
* tools/fnv1: Fowler-Noll-Vo hash toolTo run tests, run:
```
$ make test
```## Usage
```
Usage: ./ebcvm [OPTION] FILE
EFI Byte Code Interpreter
[OPTION]
--debug={0,1} debug mode
--mem=INT size of memory
--stack=INT size of stack
--heap=INT size of heap
--step={0,1} step execution
--reloc={0,1} relocate sections
--help show this help
```## Working with ELVM
Since there is no single EBC binary available in public,
we created an EBC backend for
[ELVM](https://github.com/shinh/elvm).To test EBC backend, run:
```
$ export PATH=`pwd`:$PATH
$ git clone https://github.com/retrage/elvm.git
$ cd elvm && git checkout retrage/ebc-v2
$ make ebc
```The ELVM EBC backend will generate EBC binaries
from EIR and C source code using modified
[8cc](https://github.com/rui314/8cc).## EFI native code emulations
ebcvm has following native code emulations:
* EFI\_BOOT\_SERVICES.AllocatePool()
* EFI\_SYSTEM\_TABLE.ConIn.ReadKeyStroke()
* EFI\_SYSTEM\_TABLE.ConOut.OutputString()## License
ebcvm is released under the [MIT license](LICENSE).