SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
MyungJoo Ham
System SW Lab
SW Platform Team
SWC
ARM Reference Kernel of
Tizen 3
MyungJoo Ham, Ph.D.
Tizen “System Domain” &
“Base Domain” Architect
Samsung Electronics
1. What is it?
2. Idea & Principle
3. Design & Updates
4. Discussion
ARM Reference Kernel of Tizen 3
3
What is “Tizen Reference Kernel”
• Kernel (& BSP) for Tizen Reference Devices
Image from seoz.com
BSP Validated & Tested for the
Reference Devices
4
What is “Tizen Reference Kernel”
• Kernel (& BSP) for Tizen Reference Devices
Image from seoz.com
BSP Validated & Tested for the
Reference Devices
Yet Another BSP?
5
Need for “Tizen Reference Kernel”
• Distribute reference devices
• Tizen-common kernel features & interface
• Basis for next-gen Tizen development
1 KDBUS, User PM-QoS, PASS, DMABUF Sync FW, …
2 CMA, DRM-Exynos, Devfreq, Extcon, Charger-manager,
LAB/Turboboost …
• Support Tizen Vendors!
• Well-known and well-written example.
• Code basis for vendors.
6
Previous Tizen ARM Reference Kernel (~2.2.1)
• Linux 3.0.15
• Obsolete LTS. (Current: 3.4 & 3.10)
• Support RD-PQ (Tizen 2) & RD-210 (Tizen 1 & 2)
• RD-PQ: Exynos4412
• RD-210: Exynos4210 (Linux 2.6.36 for Tizen 1)
• Not Good as Reference
• Too many backported features.
• Too OLD! No LTS/LTSI support
• Many kernel hacks & dirty patches
• git history removed.
1. Forked from production kernel.
2. Hard to read
7
Status of Tizen 3 Reference Kernels
• Two Reference Kernels: ARM / Intel
• ARM (armv7, aarch64)
• Linux 3.10.y
• 3.10.33 @ 2014/05
• Full git history.
• armv6 support (Raspberry Pi) coming soon. (Thanks to Univ. of Warsaw)
• Test & validation phase (integration test with userspace)
• Intel (x86, x86_64)
• Linux 3.14.1
• Recent ATOM SoC support merged @ 3.14
• Test & validation phase (integration test with userspace)
1. What is it?
2. Idea & Principle
3. Design & Updates
4. Discussion
ARM Reference Kernel of Tizen 3
9
Mainline (kernel.org) Compliance 1/3
• Subsystems from Mainline
• No {Forks, Staging, or Android-Kernel}
• Major Subsystems in ARM Reference
• Display Control / Buffer: DRM [GEM+KMS]
• Multimedia: V4L2/VB2
• IO Memory Allocator: CMA/IOMMU w/ buddy allocator
• IO Memory Share: DMABUF
• Charger: power-supply-class
• Suspend-control: Non-opportunistic (original concept)
• = x86 Reference
10
Mainline (kernel.org) Compliance 2/3
• Merge Tizen kernel subsystems into Mainline (upstream!)
• New Subsystems for Embedded Devices (Tizen devices)
• Devfreq, Extcon, CMA, LCD-Panel, …
• Update Subsystems for Embedded Devices (Tizen devices)
• DRM, V4L2, Buddy-Allocator, SD/MMC, Regulator, Clock, …
11
Mainline (kernel.org) Compliance 3/3
• Results
• Run Tizen with Vanilla Kernel!!! (kernel.org direct download)
• Easy to Rebase
• Kept rebased since 3.5-RCx to 3.10.y
•  Easier maintenance.
• Show Case for Vendors
• A few exceptions
• Modem support (not very clean…)
• MHL (mobile HD link) W.I.P.
• MFC, Camera-IP: proprietary firmware
12
Mainline (Das U-Boot) Compliance
• Same Principle with Tizen Kernel
• Upload New Features
• Update Features
•  Boot-Up Tizen Reference Device (RD-PQ) with Vanilla U-Boot and boot-up Tizen
kernel/platform.
Show Case for Vendors
• Tizen.org’s U-Boot vs Mainline-U-Boot
• Better Performance (M0 binary download)
• More M0 hardware debugging support
13
Linux Kernel. LTS? LTSI?
• We “Try” to support recent LTS/LTSI kernels.
• Long-Term Stable (LTS)
• Maintained by Greg K.H.
• Bugfixes for 2 years or longer.
• Up to 2 LTS kernels at the same time.
• Recent: 3.10.39 (2014/5/6)
• Long-Term Stable Initiative (LTSI)
• Maintained by Greg K.H. and some manufacturers
• Forked LTS for Industry. (LTS + Industry Patchset)
• Longer support period.
• Recent: 3.10.31-LTSI (2014/2/24)
14
Fully Utilize Device Tree
• No Hardcoded Board/Machine File
• XML Description of Device “dts”
• Compile with DTC: “dtc”  “dtb”
 Smaller Size / Faster Boot
• Single Tree for Multiple Devices
• Single Binary for Multiple Devices!!
• Enforce code reuse
• Easier maintenance
• Mandatory in Linux-ARM Mainline
• http://www.devicetree.org/Main_Page
• “Device Tree for Dummies” (eLinux)
1. What is it?
2. Idea & Principle
3. Design & Updates
4. Discussion
ARM Reference Kernel of Tizen 3
16
Tizen 3 Reference Kernel Overview
Kernel
Kernel
OAL (OEM Adaptation Layer)
Telephony
Plug-ins
GStreamer
Plug-ins
Sensor
Plug-ins
System
Plug-ins
OpenGL ES/EGL
Graphics Driver
Graphics
Memory
Management
IOMMU
DMA
BUF
Multimedia Power Management
CPUfre
q
Devf
req
Ther
mal
…DRM V4L2
Storage
Block Layer
MMC/Flash
Input, Sensor
(IIO), …
Peripheral
CMA
OpenGL ES
1.0/2.0
X11 GStreamerEFL . . .
Multimedia
FW
Telephony
FW
. . .Sensor FW System FW
. . .
Core
17
Sensors: MAJOR REWORK!!!
• No More Weird Plugins (.so) Required (still supported)
• Along with major rework in sensor framework + (real) sensor fusion.
Sensor Framework (Tizen 3)
Sensor Framework (Tizen 2)
chipA.so chipB.so
Kernel
driver Bdriver B
chipC.so
driver C
chipA.so Standard
“Acceleromete
r” Plugin (XML)
Kernel
driver B
(IIO)
driver B driver C
(IIO)
Standard
“Magnetic”
Plugin (XML)
Sensor
Fusion
Plugins
18
EXTCON (External Connector)
• Yet Another Weird Ad-hoc Kernel Hacks Removed
• Manage status of cable & ports
• A port with multiple cables (docks, multi-cables, …)
• A port with multiple modes (USB, HDMI, TA, …)
• 3.5pi: stereo, stereo+mic, stereo+mic+buttons, stereo+buttons, mono, …
• Compatible with Switch
• Android Switch drivers can be easily ported
• Refer to Linux/Documentation (porting guide for switch driver)
• Extcon drivers export both Switch and Extcon interfaces (compat mode)
• In Reference Device
• MUIC (USB+HDMI+TA+DOCK+…)
• 3.5Pi Jack
19
Charger
• Charger Manager (/drivers/power/charger-manager.c)
• All needed by Tizen userspace are prepared
• No OAL modification required
• OR supply battery/charger interface with power-supply-class
• Use EXTCON for Cable-Input (MUIC in mobile)
• Switch class is no longer available in Linux.
• Note: some SOC (state-of-charge) value is required for mobile
profile. Unless, Tizen will assume that SOC is 0  Shutdown!
20
Power Management
• Recommendation For Tizen 3.0 or later
• Do not use DVFS (CPUfreq/Devfreq) min/max ABIs
• PASS (Power-Aware System Service in Deviced) uses
• Use (keep their standard ABIs for PASS)
• CPUfreq & Devfreq (DVFS for non CPU devices if you have them)
• Thermal FW
• PASS gives hints to DVFS/Hotplug
• based on the info from userspace.
• based on the other kernel ABIs (e.g., Thermal)
• highly configurable. (control knob of performance & power)
21
Graphics
• Tizen Graphics Standard: DRM (Direct Rendering Manager) /
DRI2
drm_fb_helperdrm_mode_config
Linux
DRM Common Framework
GEM
drm_framebuffer fb_infoCrtc
Connector
Encoder
GEM
Allocator
Plane
Common
Specific
drm_framebufferCrtc
Connector
Encoder
Plane
22
Graphics
• Tizen Graphics Standard: DRM (Direct Rendering Manager) /
DRI2
drm_fb_helperdrm_mode_config
Linux
DRM Common Framework
GEM
drm_framebuffer fb_infoCrtc
Connector
Encoder
GEM
Allocator
Plane
Common
Specific
drm_framebufferCrtc
Connector
Encoder
Plane
libdrm updated with Tizen 3
23
Graphics
• Tizen Graphics Standard: DRM (Direct Rendering Manager) /
DRI2
drm_fb_helperdrm_mode_config
Linux
DRM Common Framework
GEM
drm_framebuffer fb_infoCrtc
Connector
Encoder
GEM
Allocator
Plane
Common
Specific
drm_framebufferCrtc
Connector
Encoder
PlaneQuestions from Embedded Vendors…
“What if SoC vendor supports FrameBuffer only?”
Use Framebuffer (No DRM-KMS) + DRM-GEM
libdrm updated with Tizen 3
24
Memory Management 1/3
Kernel / Device Drivers (BSP)
Kernel / Core & Subsystem
X Server
DRM Framework
GEM
Display HDMI
Virtual
Display
Post
Processor
(maybe relocated)
G2D
EFL
Evas
2D GPU
backend
X Video Drivers
Userptr
NEON
2D GPU
backend
PIXMAN
EXA
V4L2
VB2
Codec Camera
GStreamer
OpenMAX
Libdrm
XV Extension
UMM
Open
GL
Multimedia FW
XvImageSink
Core External
Library
Core
Framework
OEM
Adaptation
Kernel
Kernel
GPU
DDK
(G3D)
Radio
* Images from MS Office clipart and Samsung
Gstreamer-
CameraSrc
DMABUF
25
Memory Management 1/3
Kernel / Device Drivers (BSP)
Kernel / Core & Subsystem
X Server
DRM Framework
GEM
Display HDMI
Virtual
Display
Post
Processor
(maybe relocated)
G2D
EFL
Evas
2D GPU
backend
X Video Drivers
Userptr
NEON
2D GPU
backend
PIXMAN
EXA
V4L2
VB2
Codec Camera
GStreamer
OpenMAX
Libdrm
XV Extension
UMM
Open
GL
Multimedia FW
XvImageSink
Core External
Library
Core
Framework
OEM
Adaptation
Kernel
Kernel
GPU
DDK
(G3D)
Radio
* Images from MS Office clipart and Samsung
Gstreamer-
CameraSrc
DMABUF
Being Heavily Updated for Better
Performance & Lower Power.
(Available in LKML as well)
26
Memory Management 2/3
• UMM (Unified Memory Management)
DRM / GEM
DMA Mapping Framework
IOMMUBuddyCMA
IOMMU
Common
Driver
System Memory
V4L2 / VB2
1 2 2 2
27
Memory Management 3/3
• Incoming Features
• DMABUF Synchronization Framework
• Adaptive IOMMU TLB
• Reduced TLB Misses
• Integrated Cache Operations
• No More Userspace Cache Operations
• Reduced Cache Operations
 Better Power-Performance Efficiency
 Upstreaming at the same time.
28
Multimedia
• Camera
• V4L2 + Default Gstreamer Plugin
or
• HAL + Gstreamer Plugin
• Video Codec
• OpenMX IL Interface (for GstOpenMax)
• Sound Codec
• ALSA
29
Recap…
• Removed weird kernel hacks
• External ports/cables
• Sensors
• Chargers
• Updated DRM
• …
• Updated for better performance & efficiency
• Memory management (DMABUF and its friends)
• Power-Aware System Service (userspace helper for kernel PM)
30
Recap…
• Removed weird kernel hacks
• External ports/cables
• Sensors
• Chargers
• Updated DRM
• …
• Updated for better performance & efficiency
• Memory management (DMABUF and its friends)
• Power-Aware System Service (userspace helper for kernel PM)
Of Course…
That is not ALL!
31
64bit Support (AARCH64)
• Kernel Ready (dev/aarch64 in linux-3.10.git of Tizen.org)
• For Fast Models (ARMv8 Versatile Express Board)
• Fixing incompatible packages in Tizen.org (~1000)
• Remaining build errors: ~50.
• Created test AARCH64 Tizen platform image. (5/12)
• x86_64: Done
Packages (2014/5/23)
Success: 796
Failed: 24
Unresolvable: 25
https://build.tizen.org/project/show?project=devel%3Aarm_toolchain%3AMobile%3AMain
32
Supported Devices with “linux-3.10.git in tizen.org”
• Official
• RD-PQ (a.k.a. M0 or TRATS2), the official Tizen mobile reference
• Not Official
• Odroid X2
• Odroid U3
• Gear2
• RD-210 (a.k.a. U1HD or TRATS), previous official reference
• Some other Exynos4 and Exynos5 boards supported with the vanilla.
• Experimental
• ARMv8 Versatile Express (for Fast Models)
• Out-of-tree
• ARMv6 for Raspberry Pi
1. What is it?
2. Idea & Principle
3. Design & Updates
4. Discussion
ARM Reference Kernel of Tizen 3
34
Update Tizen Reference Kernel Version?
• Which LTS/LTSI to Use?
• “The most recent LTS, 4 months before major Tizen version release”
1 As of 2014.5., Linux 3.10
2 Intel IA Referenece: Linux 3.15
For 3.0, LTS/LTSI won’t be supported.
Intel is also going to support LTS/LTSI from the next version.
• Keep the high code quality for easier rebase (e.g., 3.10  3.16)
• LTSLTSI conversion?
35
Tizen for Smaller Devices (<128/256?)
• Minimize Hardware Reservation
• CMA + IOMMU
• Minimize Kernel Size
• [Trivial but important] “.config” Consolidation
1 We need to publish “minimized .config” for Tizen 3
• Appended DTB (no/minimized board/machine files)
• UcLinux for NO-MMU?
• UcLinux has been poorly maintained recently
1 No new devices/Linux to support
• After porting, it seems to work but no real benefit (for MMU devices)
1 Virtually no memory saving
2 Userspace might suffer from inefficient memory usage.

Mais conteúdo relacionado

Destaque (17)

Development Boards for Tizen IoT
Development Boards for Tizen IoTDevelopment Boards for Tizen IoT
Development Boards for Tizen IoT
 
OIC AGL Collaboration
OIC AGL CollaborationOIC AGL Collaboration
OIC AGL Collaboration
 
Pest free home
Pest free homePest free home
Pest free home
 
Waleed cv gis[17]
Waleed cv gis[17]Waleed cv gis[17]
Waleed cv gis[17]
 
CV Sumali_LATEST_Public
CV Sumali_LATEST_PublicCV Sumali_LATEST_Public
CV Sumali_LATEST_Public
 
Unit3 b.doc
Unit3 b.docUnit3 b.doc
Unit3 b.doc
 
DANIEL VEGA MAGO ILUSIONISTA
DANIEL VEGA MAGO ILUSIONISTADANIEL VEGA MAGO ILUSIONISTA
DANIEL VEGA MAGO ILUSIONISTA
 
Facebook Power Editor: Everything You Need to Know
Facebook Power Editor: Everything You Need to KnowFacebook Power Editor: Everything You Need to Know
Facebook Power Editor: Everything You Need to Know
 
hiring ffluid
hiring ffluidhiring ffluid
hiring ffluid
 
Corporativo Guerrero Silva, Fragoso & Asociados S.C.
Corporativo Guerrero Silva, Fragoso & Asociados S.C.Corporativo Guerrero Silva, Fragoso & Asociados S.C.
Corporativo Guerrero Silva, Fragoso & Asociados S.C.
 
FADN in Cyprus
FADN in CyprusFADN in Cyprus
FADN in Cyprus
 
Cv auxiliar de clínica
Cv auxiliar de clínicaCv auxiliar de clínica
Cv auxiliar de clínica
 
Taller de Intermediarios
Taller de IntermediariosTaller de Intermediarios
Taller de Intermediarios
 
DrupalCamp NYC Panels Presentation - April 2014
DrupalCamp NYC Panels Presentation - April 2014DrupalCamp NYC Panels Presentation - April 2014
DrupalCamp NYC Panels Presentation - April 2014
 
Siemens Energía
Siemens EnergíaSiemens Energía
Siemens Energía
 
xxxx
xxxxxxxx
xxxx
 
01 06-15 LISTA DE PRECIOS ANDORPEL
01 06-15 LISTA DE PRECIOS ANDORPEL01 06-15 LISTA DE PRECIOS ANDORPEL
01 06-15 LISTA DE PRECIOS ANDORPEL
 

Último

Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Último (20)

Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

ARM Reference Kernel of TIzen 3 (TDC 2014)

  • 1. MyungJoo Ham System SW Lab SW Platform Team SWC ARM Reference Kernel of Tizen 3 MyungJoo Ham, Ph.D. Tizen “System Domain” & “Base Domain” Architect Samsung Electronics
  • 2. 1. What is it? 2. Idea & Principle 3. Design & Updates 4. Discussion ARM Reference Kernel of Tizen 3
  • 3. 3 What is “Tizen Reference Kernel” • Kernel (& BSP) for Tizen Reference Devices Image from seoz.com BSP Validated & Tested for the Reference Devices
  • 4. 4 What is “Tizen Reference Kernel” • Kernel (& BSP) for Tizen Reference Devices Image from seoz.com BSP Validated & Tested for the Reference Devices Yet Another BSP?
  • 5. 5 Need for “Tizen Reference Kernel” • Distribute reference devices • Tizen-common kernel features & interface • Basis for next-gen Tizen development 1 KDBUS, User PM-QoS, PASS, DMABUF Sync FW, … 2 CMA, DRM-Exynos, Devfreq, Extcon, Charger-manager, LAB/Turboboost … • Support Tizen Vendors! • Well-known and well-written example. • Code basis for vendors.
  • 6. 6 Previous Tizen ARM Reference Kernel (~2.2.1) • Linux 3.0.15 • Obsolete LTS. (Current: 3.4 & 3.10) • Support RD-PQ (Tizen 2) & RD-210 (Tizen 1 & 2) • RD-PQ: Exynos4412 • RD-210: Exynos4210 (Linux 2.6.36 for Tizen 1) • Not Good as Reference • Too many backported features. • Too OLD! No LTS/LTSI support • Many kernel hacks & dirty patches • git history removed. 1. Forked from production kernel. 2. Hard to read
  • 7. 7 Status of Tizen 3 Reference Kernels • Two Reference Kernels: ARM / Intel • ARM (armv7, aarch64) • Linux 3.10.y • 3.10.33 @ 2014/05 • Full git history. • armv6 support (Raspberry Pi) coming soon. (Thanks to Univ. of Warsaw) • Test & validation phase (integration test with userspace) • Intel (x86, x86_64) • Linux 3.14.1 • Recent ATOM SoC support merged @ 3.14 • Test & validation phase (integration test with userspace)
  • 8. 1. What is it? 2. Idea & Principle 3. Design & Updates 4. Discussion ARM Reference Kernel of Tizen 3
  • 9. 9 Mainline (kernel.org) Compliance 1/3 • Subsystems from Mainline • No {Forks, Staging, or Android-Kernel} • Major Subsystems in ARM Reference • Display Control / Buffer: DRM [GEM+KMS] • Multimedia: V4L2/VB2 • IO Memory Allocator: CMA/IOMMU w/ buddy allocator • IO Memory Share: DMABUF • Charger: power-supply-class • Suspend-control: Non-opportunistic (original concept) • = x86 Reference
  • 10. 10 Mainline (kernel.org) Compliance 2/3 • Merge Tizen kernel subsystems into Mainline (upstream!) • New Subsystems for Embedded Devices (Tizen devices) • Devfreq, Extcon, CMA, LCD-Panel, … • Update Subsystems for Embedded Devices (Tizen devices) • DRM, V4L2, Buddy-Allocator, SD/MMC, Regulator, Clock, …
  • 11. 11 Mainline (kernel.org) Compliance 3/3 • Results • Run Tizen with Vanilla Kernel!!! (kernel.org direct download) • Easy to Rebase • Kept rebased since 3.5-RCx to 3.10.y •  Easier maintenance. • Show Case for Vendors • A few exceptions • Modem support (not very clean…) • MHL (mobile HD link) W.I.P. • MFC, Camera-IP: proprietary firmware
  • 12. 12 Mainline (Das U-Boot) Compliance • Same Principle with Tizen Kernel • Upload New Features • Update Features •  Boot-Up Tizen Reference Device (RD-PQ) with Vanilla U-Boot and boot-up Tizen kernel/platform. Show Case for Vendors • Tizen.org’s U-Boot vs Mainline-U-Boot • Better Performance (M0 binary download) • More M0 hardware debugging support
  • 13. 13 Linux Kernel. LTS? LTSI? • We “Try” to support recent LTS/LTSI kernels. • Long-Term Stable (LTS) • Maintained by Greg K.H. • Bugfixes for 2 years or longer. • Up to 2 LTS kernels at the same time. • Recent: 3.10.39 (2014/5/6) • Long-Term Stable Initiative (LTSI) • Maintained by Greg K.H. and some manufacturers • Forked LTS for Industry. (LTS + Industry Patchset) • Longer support period. • Recent: 3.10.31-LTSI (2014/2/24)
  • 14. 14 Fully Utilize Device Tree • No Hardcoded Board/Machine File • XML Description of Device “dts” • Compile with DTC: “dtc”  “dtb”  Smaller Size / Faster Boot • Single Tree for Multiple Devices • Single Binary for Multiple Devices!! • Enforce code reuse • Easier maintenance • Mandatory in Linux-ARM Mainline • http://www.devicetree.org/Main_Page • “Device Tree for Dummies” (eLinux)
  • 15. 1. What is it? 2. Idea & Principle 3. Design & Updates 4. Discussion ARM Reference Kernel of Tizen 3
  • 16. 16 Tizen 3 Reference Kernel Overview Kernel Kernel OAL (OEM Adaptation Layer) Telephony Plug-ins GStreamer Plug-ins Sensor Plug-ins System Plug-ins OpenGL ES/EGL Graphics Driver Graphics Memory Management IOMMU DMA BUF Multimedia Power Management CPUfre q Devf req Ther mal …DRM V4L2 Storage Block Layer MMC/Flash Input, Sensor (IIO), … Peripheral CMA OpenGL ES 1.0/2.0 X11 GStreamerEFL . . . Multimedia FW Telephony FW . . .Sensor FW System FW . . . Core
  • 17. 17 Sensors: MAJOR REWORK!!! • No More Weird Plugins (.so) Required (still supported) • Along with major rework in sensor framework + (real) sensor fusion. Sensor Framework (Tizen 3) Sensor Framework (Tizen 2) chipA.so chipB.so Kernel driver Bdriver B chipC.so driver C chipA.so Standard “Acceleromete r” Plugin (XML) Kernel driver B (IIO) driver B driver C (IIO) Standard “Magnetic” Plugin (XML) Sensor Fusion Plugins
  • 18. 18 EXTCON (External Connector) • Yet Another Weird Ad-hoc Kernel Hacks Removed • Manage status of cable & ports • A port with multiple cables (docks, multi-cables, …) • A port with multiple modes (USB, HDMI, TA, …) • 3.5pi: stereo, stereo+mic, stereo+mic+buttons, stereo+buttons, mono, … • Compatible with Switch • Android Switch drivers can be easily ported • Refer to Linux/Documentation (porting guide for switch driver) • Extcon drivers export both Switch and Extcon interfaces (compat mode) • In Reference Device • MUIC (USB+HDMI+TA+DOCK+…) • 3.5Pi Jack
  • 19. 19 Charger • Charger Manager (/drivers/power/charger-manager.c) • All needed by Tizen userspace are prepared • No OAL modification required • OR supply battery/charger interface with power-supply-class • Use EXTCON for Cable-Input (MUIC in mobile) • Switch class is no longer available in Linux. • Note: some SOC (state-of-charge) value is required for mobile profile. Unless, Tizen will assume that SOC is 0  Shutdown!
  • 20. 20 Power Management • Recommendation For Tizen 3.0 or later • Do not use DVFS (CPUfreq/Devfreq) min/max ABIs • PASS (Power-Aware System Service in Deviced) uses • Use (keep their standard ABIs for PASS) • CPUfreq & Devfreq (DVFS for non CPU devices if you have them) • Thermal FW • PASS gives hints to DVFS/Hotplug • based on the info from userspace. • based on the other kernel ABIs (e.g., Thermal) • highly configurable. (control knob of performance & power)
  • 21. 21 Graphics • Tizen Graphics Standard: DRM (Direct Rendering Manager) / DRI2 drm_fb_helperdrm_mode_config Linux DRM Common Framework GEM drm_framebuffer fb_infoCrtc Connector Encoder GEM Allocator Plane Common Specific drm_framebufferCrtc Connector Encoder Plane
  • 22. 22 Graphics • Tizen Graphics Standard: DRM (Direct Rendering Manager) / DRI2 drm_fb_helperdrm_mode_config Linux DRM Common Framework GEM drm_framebuffer fb_infoCrtc Connector Encoder GEM Allocator Plane Common Specific drm_framebufferCrtc Connector Encoder Plane libdrm updated with Tizen 3
  • 23. 23 Graphics • Tizen Graphics Standard: DRM (Direct Rendering Manager) / DRI2 drm_fb_helperdrm_mode_config Linux DRM Common Framework GEM drm_framebuffer fb_infoCrtc Connector Encoder GEM Allocator Plane Common Specific drm_framebufferCrtc Connector Encoder PlaneQuestions from Embedded Vendors… “What if SoC vendor supports FrameBuffer only?” Use Framebuffer (No DRM-KMS) + DRM-GEM libdrm updated with Tizen 3
  • 24. 24 Memory Management 1/3 Kernel / Device Drivers (BSP) Kernel / Core & Subsystem X Server DRM Framework GEM Display HDMI Virtual Display Post Processor (maybe relocated) G2D EFL Evas 2D GPU backend X Video Drivers Userptr NEON 2D GPU backend PIXMAN EXA V4L2 VB2 Codec Camera GStreamer OpenMAX Libdrm XV Extension UMM Open GL Multimedia FW XvImageSink Core External Library Core Framework OEM Adaptation Kernel Kernel GPU DDK (G3D) Radio * Images from MS Office clipart and Samsung Gstreamer- CameraSrc DMABUF
  • 25. 25 Memory Management 1/3 Kernel / Device Drivers (BSP) Kernel / Core & Subsystem X Server DRM Framework GEM Display HDMI Virtual Display Post Processor (maybe relocated) G2D EFL Evas 2D GPU backend X Video Drivers Userptr NEON 2D GPU backend PIXMAN EXA V4L2 VB2 Codec Camera GStreamer OpenMAX Libdrm XV Extension UMM Open GL Multimedia FW XvImageSink Core External Library Core Framework OEM Adaptation Kernel Kernel GPU DDK (G3D) Radio * Images from MS Office clipart and Samsung Gstreamer- CameraSrc DMABUF Being Heavily Updated for Better Performance & Lower Power. (Available in LKML as well)
  • 26. 26 Memory Management 2/3 • UMM (Unified Memory Management) DRM / GEM DMA Mapping Framework IOMMUBuddyCMA IOMMU Common Driver System Memory V4L2 / VB2 1 2 2 2
  • 27. 27 Memory Management 3/3 • Incoming Features • DMABUF Synchronization Framework • Adaptive IOMMU TLB • Reduced TLB Misses • Integrated Cache Operations • No More Userspace Cache Operations • Reduced Cache Operations  Better Power-Performance Efficiency  Upstreaming at the same time.
  • 28. 28 Multimedia • Camera • V4L2 + Default Gstreamer Plugin or • HAL + Gstreamer Plugin • Video Codec • OpenMX IL Interface (for GstOpenMax) • Sound Codec • ALSA
  • 29. 29 Recap… • Removed weird kernel hacks • External ports/cables • Sensors • Chargers • Updated DRM • … • Updated for better performance & efficiency • Memory management (DMABUF and its friends) • Power-Aware System Service (userspace helper for kernel PM)
  • 30. 30 Recap… • Removed weird kernel hacks • External ports/cables • Sensors • Chargers • Updated DRM • … • Updated for better performance & efficiency • Memory management (DMABUF and its friends) • Power-Aware System Service (userspace helper for kernel PM) Of Course… That is not ALL!
  • 31. 31 64bit Support (AARCH64) • Kernel Ready (dev/aarch64 in linux-3.10.git of Tizen.org) • For Fast Models (ARMv8 Versatile Express Board) • Fixing incompatible packages in Tizen.org (~1000) • Remaining build errors: ~50. • Created test AARCH64 Tizen platform image. (5/12) • x86_64: Done Packages (2014/5/23) Success: 796 Failed: 24 Unresolvable: 25 https://build.tizen.org/project/show?project=devel%3Aarm_toolchain%3AMobile%3AMain
  • 32. 32 Supported Devices with “linux-3.10.git in tizen.org” • Official • RD-PQ (a.k.a. M0 or TRATS2), the official Tizen mobile reference • Not Official • Odroid X2 • Odroid U3 • Gear2 • RD-210 (a.k.a. U1HD or TRATS), previous official reference • Some other Exynos4 and Exynos5 boards supported with the vanilla. • Experimental • ARMv8 Versatile Express (for Fast Models) • Out-of-tree • ARMv6 for Raspberry Pi
  • 33. 1. What is it? 2. Idea & Principle 3. Design & Updates 4. Discussion ARM Reference Kernel of Tizen 3
  • 34. 34 Update Tizen Reference Kernel Version? • Which LTS/LTSI to Use? • “The most recent LTS, 4 months before major Tizen version release” 1 As of 2014.5., Linux 3.10 2 Intel IA Referenece: Linux 3.15 For 3.0, LTS/LTSI won’t be supported. Intel is also going to support LTS/LTSI from the next version. • Keep the high code quality for easier rebase (e.g., 3.10  3.16) • LTSLTSI conversion?
  • 35. 35 Tizen for Smaller Devices (<128/256?) • Minimize Hardware Reservation • CMA + IOMMU • Minimize Kernel Size • [Trivial but important] “.config” Consolidation 1 We need to publish “minimized .config” for Tizen 3 • Appended DTB (no/minimized board/machine files) • UcLinux for NO-MMU? • UcLinux has been poorly maintained recently 1 No new devices/Linux to support • After porting, it seems to work but no real benefit (for MMU devices) 1 Virtually no memory saving 2 Userspace might suffer from inefficient memory usage.