Automated Gateware Discovery Using Open Firmware

13
Automated Gateware Discovery Using Open Firmware A presentation on my part time MSc research that aims to lay foundation for automating gateware detection. Presented By: Shanly Rajan Embedded Systems Engineer SKA SA CASPER WORKSHOP:20 AUGUST 2010

description

A presentation on my part time MSc research that aims to lay foundation for automating gateware detection. Presented By: Shanly Rajan Embedded Systems Engineer SKA SA CASPER WORKSHOP:20 AUGUST 2010. Automated Gateware Discovery Using Open Firmware. Overview. Background - OS for FPGAS - PowerPoint PPT Presentation

Transcript of Automated Gateware Discovery Using Open Firmware

Page 1: Automated Gateware Discovery Using Open Firmware

Automated Gateware DiscoveryUsing

Open FirmwareA presentation on my part time MSc research that

aims to

lay foundation for

automating gateware detection.

Presented By:

Shanly Rajan

Embedded Systems Engineer

SKA SA

CASPER WORKSHOP:20 AUGUST 2010

Page 2: Automated Gateware Discovery Using Open Firmware

Overview

Background - OS for FPGAS Open Firmware U-boot Open Firmware Open Firmware design & implementation Implementation Examples Research Status & Future Directions Conclusion

Page 3: Automated Gateware Discovery Using Open Firmware

Recent OS for FPGAs

1994

BORPH OSGATOSFOCA

Virtual Hardware Operating System for Xilinx XC6002

VPOSReconOSFDT for FreeBSDFDT for ROACH

Unified HW/SW OS for PRFPGA systems

OS for ReconfigurableEmbedded Platforms

Research Issues in OS for reconfigurable computing

OF

Page 4: Automated Gateware Discovery Using Open Firmware

Open Firmware Open Firmware : Hardware Independent Boot Code

Boot Time Drivers for testing machine hardware

Building Device Trees which OS later uses

Device Tree : Data Structure that holds information about the set of devices attached to the system, including permanently installed devices and plug-in devices, as described by an Open Firmware.

A FDT:

• Data structure for describing hardware

• Passed to kernel at boot-time

• Alternative to hard-coded platform details

Page 5: Automated Gateware Discovery Using Open Firmware

U-boot Open Firmware U-boot, the bootloader for the powerpc architecture in ROACH has built-in Open

Firmware (OF) support

The device-tree layout for u-boot is strongly inherited from the definition of the Open Firmware IEEE 1275-1994 device-tree

The observation that gateware implementations on FPGA can be treated as pluggable peripherals suggests that it can be represented in the device tree just like any other physical peripheral

Conventional/Traditional Method : Scheme of loading existing device drivers to operate on physical peripherals can also be extended to gateware images as well.

The research facilitates the process of identifying and operating on gateware images by extending the exisiting infrastructure of probing devices in traditional software by using Open Firmware.

Page 6: Automated Gateware Discovery Using Open Firmware

Terminology• Open Firmware (OF) Device Tree (DT)

– Device representation exported by Open Firmware

• Flattened Device Tree (FDT)

– Firmware-independent device tree

• Device Tree Compiler (DTC)

– Convert between .dts and .dtb

• Device Tree Source (.dts)

• Device Tree Blob (.dtb)

– Tokenized form; used by kernel

• Binding

– Documentation of how the DT describes hardware

Page 7: Automated Gateware Discovery Using Open Firmware

OF Device Tree Model

root

platform

uart

bridge

spi

i2c bus

temp

pci bus

ethernet

platform_bus_type

i2c_bus_type

pci_bus_type

Drivers registeredagainst bus types

Page 8: Automated Gateware Discovery Using Open Firmware

Open Firmware Implementation

root{ ……………….. Ethernet Serial Data Capture ........……….. ……………… ………………}

Uboot OF Bootloader Linux OFGateware Implementations

OF Client Interface Calls

Bit stream + Meta-information file dts dtb

DEVICE DRIVER

DEVICE TREE EXTENSION

Serial UART driverEthernet driver

Sound driver

Page 9: Automated Gateware Discovery Using Open Firmware

Serial UART example

FPGA

Uartlite Serial bitUartlite Serial bit

FPGAV5 : serial@d0010000{ device_type = "serial"; compatible = "xlnx,opb-uartlite-1.00.b"; reg = <0xd0010000 10000>; current-speed = <115200>; clock-frequency = <66666666>; xlnx,data-bits = <8>; xlnx,odd-parity = <0>; xlnx,use-parity = <0>; };

FPGAV5 : serial@d0010000{ device_type = "serial"; compatible = "xlnx,opb-uartlite-1.00.b"; reg = <0xd0010000 10000>; current-speed = <115200>; clock-frequency = <66666666>; xlnx,data-bits = <8>; xlnx,odd-parity = <0>; xlnx,use-parity = <0>; };

Uartlite DriverUartlite Driver

DESCRIPTION INVOKES MATCH

OPERATES

DEVICE DRIVER

SERIAL DEVICE

EXTENDING DEVICE TREES

Page 10: Automated Gateware Discovery Using Open Firmware

Treating katADC as a soundcard• Current Status

Aiming to record and playback ADC data captured into BRAMS with a modified sound device driver and utilize sound analysis tools for visualization and playback.

• Future Work

– A mkfdt utility that converts FPGA

bit stream and meta information into

the required flattened device tree format.

– Hot Pluggability

– Adding device drivers specific to radio astronomy.

Page 11: Automated Gateware Discovery Using Open Firmware

BORPH or OF FDT ??

Trade - Off

Ease of Use Performance

Win-Win Approach

Page 12: Automated Gateware Discovery Using Open Firmware

Conclusion

Recent OS for FPGAS - Background Open Firmware U-boot Open Firmware OF design and implementation for ROACH OF implementation examples: serial UART Current progress & Future Directions

ALTERNATIVE APPROACH CONSIDERED(EXTENDING DEVICE TREES)

Page 13: Automated Gateware Discovery Using Open Firmware

Questions

•q

email : [email protected]