+ All Categories
Home > Documents > Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER:...

Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER:...

Date post: 21-Jun-2020
Category:
Upload: others
View: 8 times
Download: 0 times
Share this document with a friend
21
Linux on OpenPOWER: internals, interfaces and integraon Jeremy Kerr Join the Conversaon #OpenPOWERSummit Join the Conversaon #OpenPOWERSummit
Transcript
Page 1: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

Linux on OpenPOWER: internals, interfaces and integration

Jeremy Kerr

Join the Conversation #OpenPOWERSummitJoin the Conversation #OpenPOWERSummit

Page 2: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

2

Outline

Runtime Linux implementation Boot services Management processor implementation

Page 3: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

3

Runtime Linux implementation

“powernv” platform linux: arch/powerpc/platforms/powernv/

Page 4: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

4

Platform description: device tree

cpus { PowerPC,POWER8@10 { i-cache-size = <0x8000>; d-cache-size = <0x10000>; timebase-frequency = <0x1e848000>; clock-frequency = <0xae673780>; ibm,chip-id = <0x0>; …

}

PowerPC,POWER8@18 { … }

Page 5: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

5

Platform interfaces: OPAL API

“Open Power Abstraction Layer” opal-api.h Functions for the kernel platform code to call Shipped as machine firmware

http://github.com/open-power/skiboot/

Page 6: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

6

Platform interfaces: OPAL API

#define OPAL_CONSOLE_WRITE 1#define OPAL_CONSOLE_READ 2#define OPAL_RTC_READ 3#define OPAL_RTC_WRITE 4#define OPAL_CEC_POWER_DOWN 5#define OPAL_CEC_REBOOT 6#define OPAL_READ_NVRAM 7#define OPAL_WRITE_NVRAM 8…

Page 7: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

7

Platform interfaces: OPAL API

OPAL_CONSOLE_WRITE------------------

Parameters:

int64_t term_number int64_t *length const uint8_t *buffer

Returns:

OPAL_SUCCESS OPAL_PARAMETER - invalid term_number OPAL_CLOSED - console device closed OPAL_BUSY_EVENT - unable to write any of buffer

term_number is the terminal number as represented in the device tree.length is a pointer to the length of buffer.

A conforming implementation SHOULD try to NOT do partial writes, althoughpartial writes and not writing anything are valid.

Page 8: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

8

OPAL design

“Library” concept Always invoked through and on behalf of Linux

No interrupts / hidden entry points

Fixed calling convention 64-bit, big-endian mode Exceptions disabled Translation disabled

Page 9: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

9

OPAL interactions

Linux kernel

OPAL

powernv platform

OPAL API

Workload

Page 10: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

10

... plus the OpenPOWER-specific drivers

Standard Linux support for PNOR flash access NX cryptography acceleration & RNG CPU frequency & idle Real-time clock Console IPMI channel I²C HWMON

Again, OPAL simply provides lightweight abstractions

Page 11: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

11

OPAL interactions

Linux kernel

OPAL

powernv platform

OPAL API drivers

Workload

Page 12: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

12

So how do we boot?

Page 13: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

13

Petitboot

Page 14: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

14

Petitboot

Page 15: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

15

Using Linux for boot services

Reuse existing core code! OPAL firmware support OPAL device drivers Network stack Network protocol support (DHCP, DNS, HTTP, ...) Standard storage device drivers Standard network device drivers Standard input device drivers

Page 16: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

16

Boot service functionality in userspace

Customisable as standard Linux application No real-mode code Standard libraries & utilities available

https://github.com/open-power/petitboot

Page 17: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

17

Management controller integration

Standard Baseband Management Controller (BMC)

Usual methods of platform management Chassis power control Sensor readings SOL console Firmware update

Page 18: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

18

OpenPOWER BMC functionality

A few OEM-specific commands Forming the initial reference implementation

Not necessary for the majority of deployments

https://github.com/open-power/docs/

Page 19: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

19

Thank you!

Page 20: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

20

Resources

https://github.com/open-power/ Code repositories for firmware Documentation repositories Issue tracking

Mailing lists: Linux kernel development: [email protected] OPAL/skiboot development: [email protected] Petitboot development: [email protected]

Page 21: Linux on OpenPOWER: internals, interfaces and integration · 2019-03-01 · Linux on OpenPOWER: internals, interfaces and integration Jeremy Kerr Join the Conversation #OpenPOWERSummit.

21

Legal & trademarks

This work represents the view of the author and does not necessarily represent the view of IBM.

IBM, IBM (logo), OpenPOWER, POWER, POWER8, and Power Systems are trademarks or registered trademarks of International Business Machines Corporation in the United States and/or other countries.

Linux is a registered trademark of Linus Torvalds. Other company, product and service names may be trademarks or service marks of others.


Recommended