+ All Categories
Home > Documents > Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM...

Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM...

Date post: 20-May-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
18
presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018 Presented by: Meenakshi Agrawal (NXP Semiconductor) Udit Kumar (NXP Semiconductor) www.uefi.org 1
Transcript
Page 1: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

presented by

Capsule update with MM

Fall 2018 UEFI PlugfestOctober 15 – 19, 2018

Presented by:Meenakshi Agrawal (NXP Semiconductor)

Udit Kumar (NXP Semiconductor)

www.uefi.org 1

Page 2: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Agenda

• Introduction• Arm® boot flow• Capsule Structure• Updating capsule with MM• Advantage• Questions

www.uefi.org 2

Page 3: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Introduction• Why we need capsule update

– New features – Bug fixes

• How to update firmware– OS– UEFI Runtime– Some Service processor

• Thing to take care – Security – Reliability

www.uefi.org 3

Application

OS

Flash driver

Flash

Application

OS

UEFI Runtime

FlashDrv

Flash

Page 4: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Arm Boot flow

www.uefi.org 4

Who should own the flash BL3 runtime or UEFI

- BLx is also stored on flash - Security ??

Page 5: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

MM mode

Can secure side of UEFI own flash driver ???

www.uefi.org 5

Page 6: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Arm : Set Variable

MM handler

Flash Driver#

I2C driver#

MM SetVariable ()

Crypto service

FVB Protocol

Secured world Data []

GUID

Name []

Header GUIDMessage Length

MM Communication Head

Function IdReturn Status

Variable Communication Head

VarAccess Comm Data

GUID

Data Size

Name Size

Attributes

Name []

Data []

Page 7: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Capsule Structure

www.uefi.org 7

Presenter
Presentation Notes
Source is taken from UEFI Specs 2.7 (Fig 27)
Page 8: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Capsule Structure

www.uefi.org 8

Page 9: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

How to build capsule

www.uefi.org 9

FmpPayloadSystemFirmwarePkcs7 # gEfiFmpCapsuleGuid

FmpPayload.FmpPayloadSystemFirmwarePkcs7CERTIFICATE : # PKCS7

# PcdSystemFmpCapsuleImageTypeIdGuid##

F/W data : FILE_RAW # PcdEdkiiSystemFirmwareFileGuidDriver (SystemFirmwareUpdateDxe.inf) # gEdkiiSystemFmpCapsuleDriverFvFileGuid

UEFI FIP Image, Signed

with ARM cert_create tool

Presenter
Presentation Notes
## edk2 specific
Page 10: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Traditional Update flow

www.uefi.org 10

Page 11: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Traditional Update flow

www.uefi.org 11

Page 12: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Few rules/OEM specific

www.uefi.org 12

• Flash Storage should accommodate two copies of firmware

• One latest copy and another copy for fallback

• BL2 Image should choose between latest/recovery firmware

• Fip image will be updated (BL31, BL32 and BL33) combined (Consider as RAW FILE)

BL 1

BL 2

BL 3 FIP(UEFI + BL 31 and

BL32)

BL 3 FIP(UEFI + BL 31 and

BL32)

Flash map

BL 1

BL 2

New BL 3 FIP(UEFI + BL 31 and

BL32)

Main BL 3 FIP(UEFI + BL 31 and

BL32)

Page 13: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Updating capsule with MM

www.uefi.org 13

OS UpdateCapsule() ProcessCapsuleImage()

StartFmpImage()

SetFmpImageData()

3

4

1 2

FmpSetImage()

StartImage()

LoadImage()

Page 14: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

FmpSetImage()

• Authenticate System Firmware Image CapsuleAuthenticateSystemFirmware()

• Extract System Firmware Image and update pointers with System Image informationExtractSystemFirmwareImage()

• Extract Config image and update pointers with Config image informationExtractConfigImage()

SystemFirmwareAuthenticatedUpdate()

• Parse config image and get System Firmware image flash address and size.• Perform flash write operation i.e. write System Firmware image in Flash.

Flash driver is in S-EL0ExtractConfigImage()

Make SMC call to inform TF-A to use new image.

1

2

Updating capsule with MM

Page 15: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Advantage

www.uefi.org 15

• Security • Can be used with thin PrePei way of working

Page 16: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

References/Acknowledgment

www.uefi.org 16

• UEFI Specification 2.7

• ARM TF-A (https://github.com/ARM-software/arm-trusted-firmware/tree/master/docs)

• A_Tour_Beyond_BIOS_Capsule_Update_and_Recovery_in_EDK_II(https://github.com/tianocore-docs/Docs/raw/master/White_Papers/A_Tour_Beyond_BIOS_Capsule_Update_and_Recovery_in_EDK_II.pdf)

• Microsoft Walkthrough on Firmware Updates (http://www.uefi.org/sites/default/files/resources/Microsoft_Spring%202018%20UEFI_Plugfest_Template_Day3.pdf)

• EDK-II source code

• ARM TZ

Page 17: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

www.uefi.org 17

Page 18: Capsule update with MM - Unified Extensible Firmware Interface...presented by Capsule update with MM Fall 2018 UEFI Plugfest October 15 – 19, 2018. Presented by: Meenakshi Agrawal

Thanks for attending the Fall 2018 UEFI Plugfest

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

presented by

www.uefi.org 18

NXP, , NXP SECURE CONNECTIONS FOR A SMARTER WORLD are trademarks of NXP B.V. All other product or service names are the property of their respective owners. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. ©2018 NXP B.V.


Recommended