All Projects → hex-five → multizone-linux

hex-five / multizone-linux

Licence: other
MultiZone® Security Enclave for Linux

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
assembly
5116 projects

Projects that are alternatives of or similar to multizone-linux

Maixpy
MicroPython for K210 RISC-V, let's play with edge AI easier
Stars: ✭ 1,065 (+5816.67%)
Mutual labels:  firmware, risc-v
incubator-teaclave-trustzone-sdk
Teaclave TrustZone SDK enables safe, functional, and ergonomic development of trustlets.
Stars: ✭ 126 (+600%)
Mutual labels:  tee, trusted-execution-environment
sgxwallet
sgxwallet is the first-ever opensource high-performance hardware secure crypto wallet that is based on Intel SGX technology. First opensource product on Intel SGX whitelist. Scales to 100,000+ transactions per second. Currently supports ETH and SKALE, and will support BTC in the future. Sgxwallet is under heavy development and use by SKALE network.
Stars: ✭ 50 (+177.78%)
Mutual labels:  trusted-computing, trusted-execution-environment
Penglai-Enclave
This is the main repo for Penglai.
Stars: ✭ 47 (+161.11%)
Mutual labels:  risc-v, tee
Tasmota-specials
Tasmota unofficial firmware builds. Install via Tasmota WebInstaller
Stars: ✭ 54 (+200%)
Mutual labels:  firmware
unifi-controllable-switch
TOUGHswitch firmware to integrate with the UniFi Controller (experimental).
Stars: ✭ 24 (+33.33%)
Mutual labels:  firmware
bl mcu sdk
bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706, BL616/BL618, BL808 and other series of RISC-V based chips in the future.
Stars: ✭ 147 (+716.67%)
Mutual labels:  risc-v
MKS WIFI upgrade with BeePrint web interface
Firmware for MKS WiFi module from Makerbase with BeePrint Web Interface, tested with Flying Bear Ghost 5/Ghost 4/Reborn
Stars: ✭ 35 (+94.44%)
Mutual labels:  firmware
la-core
Linear algebra accelerators for RISC-V (published in ICCD 17)
Stars: ✭ 58 (+222.22%)
Mutual labels:  risc-v
HUANANZHI-X99-TF
BY99RD25 BIOS for HUANANZHI X99-TF GAMING Motherboard 08/25/2020
Stars: ✭ 27 (+50%)
Mutual labels:  firmware
9444
9444 RISC-V 64IMA CPU and related tools and peripherals.
Stars: ✭ 18 (+0%)
Mutual labels:  risc-v
hutscape.github.io
🏡 Everyday practical home automation projects
Stars: ✭ 34 (+88.89%)
Mutual labels:  firmware
valist
Web3-native software distribution. Publish and install executables, Docker images, WebAssembly, and more. Powered by Ethereum, IPFS, and Filecoin.
Stars: ✭ 107 (+494.44%)
Mutual labels:  firmware
bananapi-zero-ubuntu-base-minimal
BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
Stars: ✭ 77 (+327.78%)
Mutual labels:  firmware
embeddedappsec
Embedded AppSec Best Practices
Stars: ✭ 38 (+111.11%)
Mutual labels:  firmware
srv32
Simple 3-stage pipeline RISC-V processor
Stars: ✭ 88 (+388.89%)
Mutual labels:  risc-v
dlink-decrypt
D-Link firmware decryption PoC
Stars: ✭ 107 (+494.44%)
Mutual labels:  firmware
RescueAVR
An Arduino sketch that is able to do high-voltage programming in order to resurrect bricked AVR MCUs(in addition, you need a bit of HW on a breadboard)
Stars: ✭ 29 (+61.11%)
Mutual labels:  firmware
U8glib-HAL
Customized U8glib for use in Marlin 2.0
Stars: ✭ 40 (+122.22%)
Mutual labels:  firmware
meltdown-spectre-bios-list
a list of BIOS/Firmware fixes adressing CVE-2017-5715, CVE-2017-5753, CVE-2017-5754
Stars: ✭ 16 (-11.11%)
Mutual labels:  firmware

MultiZone for Linux SDK

Initial target is SiFive's Unleashed U540.

U540 BSP components:

  • MultiZone: loaded to flash via OpenOCD => 0x2000_0000;
  • ZSBL: loaded to flash via OpenOCD => 0x2080_0000;
  • FSBL: loaded to mSD card => 0x0800_0000 L2 LIM;
  • BBL Linux: loaded to mSD card => 0x8000_0000 DDR;

This repository is maintained by Hex Five Security. For Questions or feedback - send email to info 'at' hex-five.com

Get it Ready

Prebuilt RISC-V Toolchain

Download Hex Five's reference toolchain or build your own:

  1. GNU Embedded Toolchain - v2018.12.26: http://hex-five.com/riscv-gnu-toolchain-20181226

  2. OpenOCD - v2018.12.26: http://hex-five.com/riscv-openocd-20181226

Install the Toolchain

Install the prebuilt RISC-V toolchain for Linux:

sudo apt update
sudo apt upgrade -y
sudo apt install git make default-jre libftdi1-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
wget https://hex-five.com/wp-content/uploads/riscv-gnu-toolchain-20181226.tar.xz
tar -xvf riscv-gnu-toolchain-20181226.tar.xz
wget https://hex-five.com/wp-content/uploads/riscv-openocd-20181226.tar.xz
tar -xvf riscv-openocd-20181226.tar.xz
git clone https://github.com/hex-five/multizone-sdk
sudo apt-get install libusb-0.1-4
sudo apt-get install picocom
sudo apt-get install screen

Note: for the Ubuntu 19.04 LTS you may need to install the libncurses5 package.

sudo apt-get install libncurses5:i386 
sudo apt-get install libncurses5:amd64

Add environment variables and a path to allow the Makefiles to find the toolchain by editing the ~/.bashrc and placing the following text at the bottom of the file:

export RISCV=/home/<username>/riscv-gnu-toolchain-20181226
export OPENOCD=/home/<username>/riscv-openocd-20181226
export PATH="$PATH:/home/<username>/riscv-gnu-toolchain-20181226/bin"

Note: <username> shall be replaced by your username.

Close and restart the terminal session for these changes to take effect.

Flash Programming Instructions

  1. Download the prebuilt MultiZone for Linux package from Hex Five's website (http://hex-five.com/multizone-linux-20190808):
$ wget https://hex-five.com/wp-content/uploads/multizone-linux-20190808.tar.xz
$ tar -xvf multizone-linux-20190808.tar.xz
$ cd multizone-linux-release/
  1. Flash the Board (Multizone & ZSBL):
$ ./flash.sh board
  1. Flash the SD Card (FSBL & BBL)
$ ./flash.sh </dev/sdX>

Note: </dev/sdX> shall be replaced with the device name of the SD card (e.g, /dev/mmcblock0 or /dev/sda).

MultiZone Instructions

(If you just want to test the Multizone for Linux SDK reference image, please skip directly to "Demo".)

  1. Clone the MultiZone for Linux SDK repo:
$ git clone https://github.com/hex-five/multizone-linux
  1. Build the MultiZone SDK for the U540:
$ make BOARD=U540
  1. Load the MultiZone SDK image to flash (0x2000_0000):
$ make load BOARD=U540

Demo

The MultiZone system contains four zones:

  • Zone 1: Multizone demo console accessible via Linux device /dev/multizone1;
  • Zone 2: Multizone demo console accessible via Linux device /dev/multizone2;
  • Zone 3: Multizone demo console accessible via UART 115200/8/N/1 (expansion board);
  • Zone 4: MultiZone Heartbeat LED D4 and message echo;

Get the board ready

Set the mode select switches to '0001':

      USB   LED    Mode Select                  Ethernet
 +===|___|==****==+-+-+-+-+-+-+=================|******|===+
 |                | | | |X|X|X|                 |      |   |
 |                | | | | | | |                 |      |   |
 |        HFXSEL->|X|X|X| | | |                 |______|   |
 |                +-+-+-+-+-+-+                            |
 |        RTCSEL-----/ 0 1 2 3 <--MSEL                     |
 |                                                         |

Operate the Demo

  1. Power the board.

  2. Connect to the UART by setting the baudrate to 115200/8/N/1:

$ picocom /dev/<ttyUSB_DEVICE> -b 115200

Note: <ttyUSB_DEVICE> shall be replaced with the correct UART device name (e.g, ttyUSB0, ttyUSB1).

You should be able to see on the terminal the FSBL loading the BBL image:

SiFive FSBL:       2019-08-7-d8f6e2f
Using FSBL DTB
HiFive-U serial #: 00000068
Loading boot payload.........................

Once the BBL boots Linux, Linux starts executing:

bbl loader
...
  1. Login to Linux using the root accout:
Welcome to Buildroot
buildroot login: root
Password: hexfive 
# 
  1. Connect to Zone1 via Linux:
# screen /dev/multizone1

You shall be able to see and operate the terminal running on Zone1:

=====================================================================
      	           Hex Five MultiZone(TM) Security                   
    Copyright (C) 2018 Hex Five Security Inc. All Rights Reserved    
=====================================================================
This version of MultiZone(TM) is meant for evaluation purposes only. 
As such, use of this software is governed by your Evaluation License.
There may be other functional limitations as described in the        
evaluation kit documentation. The full version of the software does  
not have these restrictions.                                         
=====================================================================
Machine ISA   : 0x00101105 RV64 ACIMU 
Vendor        : 0x00000000  
Architecture  : 0x00000000  
Implementation: 0x00000000 
Hart ID       : 0x00000000 
CPU clock     : 1000 MHz 

Z1 > 

Note: you may need to type 'restart' to see the full initial screen.

  1. Connect to Zone2 via Linux using SSH:
$ ssh [email protected]
The authenticity of host '192.168.0.2 (192.168.0.2)' can't be established.
ECDSA key fingerprint is SHA256:5CMY+vBWX7VIyJ+ejpwtw9kojdYogIdBFPSJ9YmG33g.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.2' (ECDSA) to the list of known hosts.
[email protected]'s password: hexfive
# screen /dev/multizone2

Note: you may need to delete the old key before executing the SSH command.

ssh-keygen -f "/home/<username>/.ssh/known_hosts" -R "192.168.0.2"
  1. Operate the Zone2 console:
=====================================================================
      	           Hex Five MultiZone(TM) Security                   
    Copyright (C) 2018 Hex Five Security Inc. All Rights Reserved    
=====================================================================
This version of MultiZone(TM) is meant for evaluation purposes only. 
As such, use of this software is governed by your Evaluation License.
There may be other functional limitations as described in the        
evaluation kit documentation. The full version of the software does  
not have these restrictions.                                         
=====================================================================
Machine ISA   : 0x00101105 RV64 ACIMU 
Vendor        : 0x00000000  
Architecture  : 0x00000000  
Implementation: 0x00000000 
Hart ID       : 0x00000000 
CPU clock     : 1000 MHz 

Z2 >  pmp
0x20020000 0x2002FFFF r-x NAPOT 
0x08002000 0x08002FFF rw- NAPOT 

Z2 > 
  1. In case the HiFive Unleashed U540 is connected to the Microchip / Microsemi Aloe Vera kit, it's possible to operate Zone3 via the UART (J36) available on the expansion board:
$ picocom /dev/<ttyUSB_DEVICE> -b 115200

Note: <ttyUSB_DEVICE> shall be replaced with the correct UART device name (e.g, ttyUSB0, ttyUSB1).

You shall be able to see and operate the terminal running on Zone3:

=====================================================================
      	           Hex Five MultiZone(TM) Security                   
    Copyright (C) 2018 Hex Five Security Inc. All Rights Reserved    
=====================================================================
This version of MultiZone(TM) is meant for evaluation purposes only. 
As such, use of this software is governed by your Evaluation License.
There may be other functional limitations as described in the        
evaluation kit documentation. The full version of the software does  
not have these restrictions.                                         
=====================================================================
Machine ISA   : 0x00101105 RV64 ACIMU 
Vendor        : 0x00000000  
Architecture  : 0x00000000  
Implementation: 0x00000000 
Hart ID       : 0x00000000 
CPU clock     : 1000 MHz 

Z3 > 

Note:
Alternative way to run the demo via Ethernet (no UART connection required):

Open a first SSH session as described above then connect to Zone1 via:

# screen /dev/multizone1

Open a second SSH sessions as described above then connect to Zone2 via:

# screen /dev/multizone2

To terminate screen sessions type: crtl-a k.

MultiZone and HEX-Five are registered trademarks of Hex Five Security, Inc.

MultiZone technology is protected by patents US 11,151,262 and PCT/US2019/038774

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].