introduction to the jasmine openssd...
TRANSCRIPT
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected])
Introduction to the
Jasmine OpenSSD Platform
Prof. Dongkun Shin ([email protected])
TA – Junho Lee ([email protected])
TA – Somm Kim ([email protected])
Embedded Software Laboratory
Sungkyunkwan University
http://nyx.skku.ac.kr
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 2
Contents
• Introduction to the Jasmine OpenSSD Platform
• Device Inspection
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected])
Introduction to the
Jasmine OpenSSD Platform
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 4
Storage Abstraction
• Abstraction given by block device drivers
• Operations
– Identify(): returns N
– Read (start sector #, # of sectors)
– Write (start sector #, # of sectors, data)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 5
The OpenSSD Project
• It is REAL SSD.
• An initiative to promote research and education on the SSD technology
• Provides an “OpenSSD platform” for developing open-source SSD firmware.
• Started as a collaborative work between SKKU and Indilinx.– Prof. Jin-Soo Kim
– Prof. Sang-Won Lee
– Prof. Dongkun Shin
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 6
Indilinx Barefoot Controller
SRAM
(96KB)
NAND Flash
NAND Controller
INDILINX
BarefootTM
Controller
Clock
Generator
Controller
ROM
Controller
ARM7TDMI-S
Core
Buffer
Manager
SATA
Device
DRAM
ControllerMemory Utility
APB Bridge
UART
GPIO
Timer
WDT
PMU
ICU
SATA Host interface DRAM
AHB
DRAM Access Bus
JTAG
JTAG debug port
Code, variable
Micro processor
BufferRead/write to flash
For debug
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 7
Barefoot Features
• ARM7TDMI-S running up to 87.5MHz
• 96KB SRAM
• SATA 2.0 (3Gbps)
• Mobile SDRAM controller up to 64MB
• NAND flash 8/12/16-bit BCH ECC per sector
• SDRAM 2-byte RS ECC per 128 +4 bytes
• Maximum 64CE’s (4 channels, 8 banks/ch)
– We will only use 2 channels, 4 way. (8 banks)
• System bus running up to 175MHz
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 8
Technical Resource
• Download resources from OpenSSD Wiki
– http://www.openssd-project.org
– Technical Reference Manual
– FTL Developer’s Guide
– Jasmine Firmware
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 10
Device Inspection
• You are responsible for your H/W damages after
today inspection, except for flash modules.
• The only way to escape from damaged H/W.
– Examine your Jasmine board IN DETAIL before CLASS ENDS
• Be very careful.
– If damage occurs during use, it may not be available during repair.
– You may not be able to proceed with the project.
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 11
Indilinx Jasmine Board
NAND Flash Module
UARTJTAG
Mobile SDRAM
Barefoot Controller
(ARM7TDMI-S)
SATA 3.0Gbps
Power
Power Switch
Factory Mode Jumper
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 12
Indilinx Jasmine Board
You only use this jumper.
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 15
Using Device with the USB Interface
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 16
Using Device with the SATA Interface
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 18
Software Prerequisites
• ARM EABI cross compiler for windows
– To build firmware binary for the ARM controller
– Install the toolchain ‘Win 7’ compatible mode (for Win 10 user)
– Available at course homepage
• Firmware installer
– To install the firmware on Jasmine
– Available at course homepage
• Serial Driver (Win 7)
– Available at course homepage
• Putty
– To debug firmware via serial communication
– Google it.
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 19
Firmware / Installer Preparation
• Download Jasmine Firmware v1.1.0.
• Modify uart_printf function. (./OpenSSD-1.1.0/target_spw/uart.c)
• Set compile options. (./include/jasmine.h)– #define OPTION_UART_DEBUG 1
• Specify the target FTL. (./build_gnu/Makefile)– FTL = greedy
• Build firmware. (./OpenSSD-1.1.0/build_gnu/build.bat)– Without Admin Permission
void uart_printf(const char * msg, ...) {char out[256];va_list ap;int len = 0;va_start(ap, msg);len = vsnprintf(out, sizeof(out) - 1, msg, ap);va_end(ap);if ( len >= 0 ) {out[len] = '\0';uart_print(out); }}
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 20
Install Firmware: Factory Mode
• Firmware installer (./OpenSSD-1.1.0/build_gnu/install.exe)– Put the installer into ./OpenSSD-1.1.0/build_gnu folder
• Power-down Jasmine board
• Factory Mode– Firmware uploading mode
• Power-up Jasmine board as ‘Factory Mode’
• Run installer (./OpenSSD-1.1.0/build_gnu/install.exe)– With Admin Permission
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 21
Install Firmware: Factory Mode
Scan (bad) list will be
saved in block 0 for
each flash
If 2nd process fails, even
you’ve done the 4th
process. Ignore the
error message, try 3rd
one, and redo the
whole process(1-2-3)
- Order
1-2-3 (Normal)
1-5-y-4-3 (Exception)
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 22
uart_printf() for Debugging
• Set OPTION_UART_DEBUG in include/jasmine.h
• Clean(OpenSSD-1.1.0/clean.bat)
• Re-build the firmware
• Debugging log will be sent to host in ‘Normal Mode’
• Example
– uart_printf(“Total FTL DRAM %d Kb”,dram_size);
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 24
Run Firmware: Normal Mode
• Power-down Jasmine board
• Power-up Jasmine board as ‘Normal Mode’
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 25
Format & Mount & I/O
ICE3028: Embedded System Design, Fall 2019, Dongkun Shin ([email protected]) 26
To End up Today…
• Set up Putty to receive debugging log from OpenSSD.
• Put some uart_printf() in ./OpenSSD-1.1.0/sata_main.c to print
out the student ID & your name.
– Hint: Main()
• You should read the Jasmine Technical Reference Manual by
the next lab. (Tues.)
– Chapter 1 & 2
– A simple quiz is scheduled.