self-certification tests (scts) in uefi world · ssd with 1gb free space (recommend) •execution...

38
presented by Self-Certification Tests (SCTs) in UEFI World Fall 2017 UEFI Seminar and Plugfest October 31 – November 3, 2017 Eric Jin (Intel Corporation) Alex Hung (Canonical, Ltd) UEFI Plugfest October 2017 www.uefi.org 1

Upload: others

Post on 25-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

presented by

Self-Certification Tests (SCTs) in UEFI World

Fall 2017 UEFI Seminar and PlugfestOctober 31 – November 3, 2017

Eric Jin (Intel Corporation)Alex Hung (Canonical, Ltd)

UEFI Plugfest – October 2017 www.uefi.org 1

Page 2: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Agenda

• Introduction to SCTs

• UEFI SCT

• PI SCT

• ACPI SCT

• Q&A

UEFI Plugfest – October 2017 www.uefi.org 2

Page 3: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Introduction to SCTs

UEFI Plugfest – October 2017 www.uefi.org 3

Page 4: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Self-Certification Tests (SCTs)

• Toolsets for firmware developers to validate the implementation for the specification compliance.

UEFI SCT - UEFI Spec

PI SCT - PI Spec

ACPI SCT (FWTS) - ACPI Spec

• The official or recommended versions are available on www.uefi.org/testtools

UEFI Plugfest – October 2017 www.uefi.org 4

Page 5: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT

UEFI Plugfest – October 2017 www.uefi.org 5

Page 6: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT

• Current stable version is UEFI 2.5 A SCT

• UEFI 2.6 A SCT is coming soon

• UEFI 2.7 SCT Alpha for Taipei Plugfest

• The components UEFI SCT – focus on the platform/system

IHV SCT – focus on the device/driver

SCRT – focus on runtime service address conversion

EMS – focus on the network stack

UEFI Plugfest – October 2017 www.uefi.org 6

Page 7: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT Framework

UEFI Plugfest – October 2017 www.uefi.org 7

UEFI SCT Framework

Test Agent on UEFI SideTest Manager on OS Side

Message Exchange Service on EthernetTraffic Layer

Remote EFI Interface

Invocation

NetworkPacketUtilityCore

LogUtility

CustomerDefinedUtility

Extend TCL InterpreterScript

Interpreter

GUI Testcase Management

Testcase IDECommunication

Configuration

EFIInterface

EFI ProtocolsRuntime Services

Boot Services

AgentCore

Local EFI Interface

Invocation

Testcase Management

Utility

EFI Test DriverUtility

Agent UI

Utility

EFI Test APP

Utility

Customer DefinedUtility

Page 8: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT Execution

• Execution EnvironmentsUEFI Shell 1.x/2.xSSD with 1GB free space (recommend)

• Execution MethodsCommand line interface with configurable sequenceMenu-driven interface with hierarchical category

• Execution ModesNative mode – execution on the single systemPassive mode – execution on the host/target machine

UEFI Plugfest – October 2017 www.uefi.org 8

Page 9: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Native Execution Demo

UEFI Plugfest – October 2017 www.uefi.org 9

Page 10: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Passive Execution Demo

UEFI Plugfest – October 2017 www.uefi.org

Page 11: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT Result

UEFI Plugfest – October 2017 www.uefi.org 11

Page 12: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT Report

UEFI Plugfest – October 2017 www.uefi.org 12

Page 13: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

UEFI SCT Log

UEFI Plugfest – October 2017 www.uefi.org 13

Page 14: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

EMS Result

UEFI Plugfest – October 2017 www.uefi.org 14

Page 15: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Getting Source Code

• Provide your github account to [email protected] and ask for the access permission

• Download the code

git clone https://www.github.com/UEFI/UEFI-SCT.git

• Compile and build

Refer to the instruction in HowToBuild

UEFI Plugfest – October 2017 www.uefi.org 15

Page 16: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Support and Contact

• Support Email [email protected], CC project maintainers

[email protected] [email protected]

• Information

Subscribe to UTWG mail list ([email protected])

Attend UTWG meetings

UEFI Plugfest – October 2017 www.uefi.org 16

Page 17: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

PI SCT

UEFI Plugfest – October 2017 www.uefi.org 17

Page 18: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

PI SCT

• Test PI Spec Compliance, including PEI/DXE phase.

• Current stable version is PI 1.4 SCT.

• Next release will be PI 1.6 SCT on the Q2, 2018.

• The components

PEIM test

DXE test

SMM test

UEFI Plugfest – October 2017 www.uefi.org 18

Page 19: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

PEI Test• PEI test cases are designed as PEIMs and built in flash image

• Test PEIMs are dispatched and test log are saved in HOBs

• One Shell app parses the HOBs to generate the test result

UEFI Plugfest – October 2017 www.uefi.org 19

PEI DXE SHELL

SCT Framework

Shell App

Test Result

Test Results in

HOBs

PEIMsTest

PEIMs

Page 20: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

DXE Test

• DXE test is a series of DXE test drivers plus dependency

• User can give the input thru the configuration files

• DXE test result is displayed on the Menu-driven UI directly

• Log files are provided to record execution details

UEFI Plugfest – October 2017 www.uefi.org 20

Page 21: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

SMM Test• SMM SCT is comprised of two parts

The SMM test entry point invoked by the DXE driver

The corresponding SMM test driver is loaded into SMRAM during boot

• SMM test driver is built into flash with platform SMM drivers

• Test SMI handlers are registered into SMRAM

• Shell application retrieves the test result from buffers

UEFI Plugfest – October 2017 www.uefi.org

SMM DXE SHELL

SCT Framework

Test Result

SMI Handles

DXE Drivers

Tests

Page 22: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Getting PI SCT

• The related document/binary/source can be

downloaded fromhttps://sourceforge.net/projects/pi-sct/

• Please refer to the GetStarted and UserGuide for the usage and build instructions

UEFI Plugfest – October 2017 www.uefi.org 22

Page 23: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Support and Contact

Please email project administrators

[email protected]

[email protected]

UEFI Plugfest – October 2017 www.uefi.org 23

Page 24: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

ACPI SCT

UEFI Plugfest – October 2017 www.uefi.org 24

Page 25: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Firmware Test Suite

• FWTS 15.08.00 was recommended as the ACPI 5.1 SCT in 2015

• FWTS 17.03.00 was recommended as the ACPI 6.1 SCT in 2017

• Current version is FWTS 17.09.00 Alpha for ACPI 6.2 SCT for this Plugfest

UEFI Plugfest – October 2017 www.uefi.org 25

Page 26: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

FWTS Framework & Tests

UEFI Plugfest – October 2017 www.uefi.org 26

Linux Kernel

UEFI Runtime Services

ACPI Tables and AML

ACPICA

HardwareEtc.

Firmware Test Suite

ACPI UEFI etc…

Page 27: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

FWTS Architecture – ACPI

UEFI Plugfest – October 2017 www.uefi.org 27

ACPI

ACPI Tables

FADT MCFG Method ChecksumMore ACPI

tables…

• ACPI tables & headers & checksum• ACPI methods• Processors (P & C states)https://wiki.ubuntu.com/FirmwareTestSuite/Reference or fwts --show-tests / fwts --show-tests-full

Page 28: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Getting FWTS – LIVE

• Download - http://fwts.ubuntu.com/fwts-live/

• Make bootable fwts-live USB disk– Linux:

• Identify USB disk: dmesg | tail -10 | grep Attached

• Copy image: sudo dd if=fwts-live-17.09.00.img of=/dev/sdb ; sync

– Windows: Use “Win32 Disk Imager”

UEFI Plugfest – October 2017 www.uefi.org 28

Page 29: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Using FWTS – LIVE

UEFI Plugfest – October 2017 www.uefi.org 29

Page 30: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Using FWTS – LIVE

UEFI Plugfest – October 2017 www.uefi.org 30

Page 31: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Using FWTS – LIVE

UEFI Plugfest – October 2017 www.uefi.org 31

Page 32: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Using FWTS – LIVE

UEFI Plugfest – October 2017 www.uefi.org 32

Page 33: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Results.log – Header

UEFI Plugfest – October 2017 www.uefi.org 33

Page 34: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Results.log – Test Body

UEFI Plugfest – October 2017 www.uefi.org 34

Page 35: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Results.log – Summary

UEFI Plugfest – October 2017 www.uefi.org 35

Page 36: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Information & Contacts

• Source Code git clone git://kernel.ubuntu.com/hwe/fwts.git

git clone https://github.com/ColinIanKing/fwts

• https://wiki.ubuntu.com/FirmwareTestSuite

• Subscribe to [email protected]

• Activities Subscribe to UTWG mail list ([email protected])

Attend UTWG meetings

Attend UEFI Plugfests

UEFI Plugfest – October 2017 www.uefi.org 36

Page 37: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Q&A

UEFI Plugfest – October 2017 www.uefi.org 37

Page 38: Self-Certification Tests (SCTs) in UEFI World · SSD with 1GB free space (recommend) •Execution Methods Command line interface with configurable sequence Menu-driven interface with

Thanks for attending the Fall 2017 UEFI Plugfest

For more information on the UEFI Forum and UEFI Specifications, visit http://www.uefi.org

presented by

UEFI Plugfest – October 2017 www.uefi.org 38