SlideShare a Scribd company logo
Profiling the ACPICA
Namespace and Event
Handing
September, 2019, SUSE Labs Conference 2019, Špindlerův
mlýn
Joey Lee
SUSE Labs Taipei
jlee@suse.com
2
Agenda
• Components in ACPICA
• ACPICA in Linux Kernel
• Definition blocks and ACPI Namespace
• The Fixed event and GPE handling
• Q&A
3
ACPICA
• The ACPI Component Architecture (CA) is the core
of Advanced Configuration and Power Interface
(ACPI) subsystem in Linux kernel.
• The ACPICA provides the fundamental ACPI
services that are independent of any operating
system. [1]
• Mainly maintained by Intel
‒ https://github.com/acpica/acpica.git
4
ACPICA (cont.)
• ACPICA’s services include an AML
parser/interpreter, ACPI namespace management,
ACPI table management and event handling [1].
• The OS Services Layer (OSL) is a conversion layer
between the OS-independent ACPICA to a particular
host operating system. [1]
5
ACPI Namespace and Event handing
• ACPI Namespace
‒ A static tree structure reflects to AML definition blocks
which is an abstract layer of hardware devices in platform.
• ACPI Event handing
‒ ACPICA provides event mechanisms to define and to
handle the dynamic behavior at runtime.
Components in ACPICA
7
ACPICA components
• ACPI fundamental: Namespace Management, Table
Management, Event Handling, Resource Manager,
Hardware Management, Utilities
• AML interpreter: Dispatcher, Executer, Parser,
Disassembler, Debugger
• OS Services Layer (OSL)
‒ ACPICA implements OSL for user space of Unix, Linux,
Windows and BSD.
‒ Linux Kernel’s ACPI subsystem maintains a OSL
(drivers/acpi/osl.c) to adapt ACPICA.
8
Kernel or Userland
ACPICA Core Components
ACPICA
root
Namespace AML Interpreter
Tables
node node
Events
OSL
Parser
Resources
Hardware
Utilities
Disassembler
Dispatcher
Executer
Debuggernode node node
AcpiOs*
Acpi*Acpi*
Acpi*
Acpi*
Acpi*
Acpi*
9
ACPICA tools
• iasl: ASL compiler / AML decompiler
• Tools: acpidump, acpixtract, acpinames, acpiexec...
• Tests: ASL grammar validation Test Suite (ASLTS),
ASL test cases
• Generate: generation tools, release tools
10
ACPICA and Tools
Components
Namespace
AML Interpreter
Tables
Events
OSL
Parser
Resources
Hardware
Utilities
Disassembler
Dispatcher
Executer
Debugger
Tools
acpidump acpiexec
Compiler
TestsGenerate
release
linux
msvc
unix
msvc9
efi
acpixtract
root
node node
node node
node
iasl
osunix* oslinux* oswin* osbsd* efi*
aslts
Acpi*Acpi*
AcpiOs*
ACPICA in Linux Kernel
12
ACPI host and ACPICA
• OSL in Linux Kernel: drivers/acpi/osl.c
• ACPICA-to-host: All ACPICA-to-host interactions
pass through the OSL via direct calls to the AcpiOs*
interfaces from ACPICA. [1]
• Host-to-ACPICA
‒ Synchronous: the host making direct calls to the various
public Acpi* interfaces. [1]
‒ Asynchronous: The host calls ACPICA to install an
appropriate handler at initialization time. This handler is
then invoked by ACPICA whenever the requested event
occurs. (handle fixed events or GPE) [1]
13
OSL Services
• Environmental: enable acpi mode
• Memory Management: mm
• Multitasking Support
• Mutual Exclusion and Synchronization
• Interrupt handling: IRQ
• Address Spaces
• Stream I/O: printk
14
Platform
Kernel
ACPICA in Linux Kernel
Firmware ACPI Tables
RSDP XSDT
Hardware
ACPI
ACPICA
root
bus
driver device
Namespace
AML
Interpreter
Tables
node node
Event
FADT DSDT
SSDT2SSDT1
Resource
Hardware
mm
OSL
resource printkEFIIRQqueue
PCI
CPU
Memory
pm
AcpiOs*
Acpi*
Acpi*
Definition blocks and ACPI Namespace
16
ACPI Tables
• Definition blocks tables
‒ AML (ACPI Machine Language) format
‒ DSDT (differentiated system description table), SSDT
(secondary system description tables)
• Data tables
‒ TDL (Table Definition Language)
‒ FADT, MADT, ECDT, SRAT, etc. - essentially any table
other than a DSDT or SSDT. [2]
• The iasl tool supports AML and TDL
17
ACPI Namespace
• The ACPI Namespace is a large data structure that
is constructed and maintained by the ACPICA
Subsystem component. [1]
• Constructed primarily from the AML defined within
an ACPI Differentiated System Description Table
(DSDT), the namespace contains a hierarchy of
named ACPI objects. [1]
root
Namespace
node node
18
Definition blocks, Namespace and
ACPI devices
Tables
OSL
EFI
ACPI Tables
RSDP XSDT
FADT DSDT
SSDT2SSDT1
root
Namespace
AML
Interpreter
node node
bus
driver device
19
Definition blocks, Namespace and
ACPI devices
[1]Load
20
Definition blocks, Namespace and
ACPI devices
[1]Load
[2]
21
Definition blocks, Namespace and
ACPI devices
[1]Load
[2]
[3] Parse
22
Definition blocks, Namespace and
ACPI devices
[1]Load
[2]
[3] Parse
[4] handle
23
Definition blocks, Namespace and
ACPI devices
[1]Load
[2]
[3] Parse
PCI
CPU
Memory
Companion
Companion
Companion
PCI
CPU
Memory
[4] handle
24
Namespace Initialization
• Firmware puts definition blocks tables (DSDT and
SSDT*) to memory.
• Table Management component loads DSDT and
SSDT.
‒ OSL helps to get RSDP for loading ACPI tables
• Table Management component forwards DSDT/SSDT
points to Namespace Management component.
• Namespace Management component requests AML
interpreter to parse tables.
• Base on parsing result, Namespace Management
component creates ACPI namespace.
25
ACPICA
Table to Namespace
tables
2) AcpiTbLoadNamespace
namespace
2.1.1) AcpiNsParseTable
2.1.1.1) AcpiNsExecuteTable
3.1) AcpiNsInitOneObject
2.1) AcpiNsLoadTable
3) AcpiNsInitializeObjects
2.1.2) AcpiDsInitializeObjects
0) acpi_load_tables
(AcpiLoadTables)
Kernel
drivers/acpi/bus.c
events
1) AcpiEvInstallRegionHandlers
dispatcher
2.1.1.1) AcpiPsExecuteTable
parser
2.1.1.1.1) AcpiPsCreateScopeOp
2.1.1.1.5) AcpiPsParseAml
2.1.1.1.2) AcpiDsCreateWalkState
2.1.1.1.3) AcpiDsInitAmlWalk
2.1.1.1.4) AcpiDsScopeStackPush
2.1.1.1.6) AcpiDsDeleteWalkState
2.1.1.1.7) AcpiPsDeleteParseTree
26
ACPICA
Evaluate method/object
namespace
1) AcpiNsValidateHandle
2) AcpiNsEvaluate
2.1) AcpiNsGetNode
2.4) AcpiNsCheckReturnValue
3) AcpiNsResolveReferences
0) acpi_evaluate_object
(AcpiEvaluateObject)
Kernel
drivers/acpi/utils.c
tables
2.2.1) AcpiTbCheckDsdtHeader
dispatcher
2.2) AcpiPsExecuteMethod
parser
2.2.3) AcpiPsUpdateParameterList
2.2.4) AcpiPsCreateScopeOp
2.2.7) AcpiPsParseAml
2.2.8) AcpiPsDeleteParseTree
2.2.9) AcpiPsUpdateParameterList
2.2.2) AcpiDsBeginMethodExecution
2.2.5) AcpiDsCreateWalkState
2.2.6) AcpiDsInitAmlWalk
executer
2.3) AcpiExResolveNodeToValue
27
The relation between layers
28
The relation between layers
29
The relation between layers
30
The relation between layers
31
The relation between layers
32
The relation between layers
33
The relation between layers
34
The relation between layers
35
The relation between layers
36
Class diagram for ACPI Namespace
The Fixed event and GPE handling
38
Event types in ACPICA
• ACPI Fixed Events and General Purpose Events
(GPEs)
‒ System Control Interrupts (SCIs) be generated
• Event types in control method
‒ Notify events that are generated via the execution of the
ASL Notify keyword in a control method. [1]
‒ Events that are caused by accesses to an address space
or operation region during the execution of a control
method. [1]
39
System Control Interrupts (SCIs)
• SCI
‒ IRQ9 on x86. (otherwise checking SCI_INT in FADT)
• SCI handlers
‒ AcpiEvGpeXruptHandler, AcpiEvSciXruptHandler in
ACPICA
‒ acpi_global_event_handler in Linux Kernel
40
ACPI Events
OSL
root
Namespace
AML
Interpreter
node node
bus
driver device
Hardware
Event
Platform Firmware ACPI Registers
Hardware
FADT PM1a
IRQ
GPE0
PM1b
GPE1
Sleep
Timer
41
ACPI Events
[1]Set
42
ACPI Events
[1]Set
[2]SCI[2]SCI
43
ACPI Events
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
44
ACPI Events (Fixed Event)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
[4] Button
45
ACPI Events (Fixed Event)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
[4] Button
Input [5] input
[5]Keycode
46
ACPI Events (GPE)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
_Exx _Lxx
_GPE
47
ACPI Events (GPE)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
[4]
_Exx _Lxx
_GPE
[5]
48
ACPI Events (GPE)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
[4]
_Exx _Lxx
_GPE
[5]
[6]Access
Address space
[6] Notify
49
ACPI Events (GPE)
[1]Set
[2]SCI[2]SCI
[3]
[3]Read
Clear
[4]
_Exx _Lxx
_GPE
[5]
[6]Access
Address space
[6] NotifyPCI
CPU
Memory
PCI
CPU
Memory
Interactive
Interactive
interactive
50
Fixed Events
• Fixed Events
‒ ACPI events that have a predefined meaning in the ACPI
specification. e.g. power button, timer overflows.
‒ These events are handled directly by the OS handlers. [2]
‒ ACPI register: PM1 = PM1a | PM1b
‒ PM1x_STS.8: PWRBTN_STS
‒ PM1x_STS.9: SLPBTN_STS
‒ PM1x_STS.10: RTC_STS
….
51
ACPICA
Events (fixed)
events
1) AcpiEvFixedEventDetect
1.3) AcpiEvFixedEventDispatch
2) AcpiEvGpeDetect
3) AcpiEvSciDispatch
Kernel
0) acpi_ev_sci_xrupt_handler
(AcpiEvSciXruptHandler)
1.1) AcpiHwRegisterRead
Kernel/irq
drivers/acpi
1.2) acpi_global_event_handler
(AcpiGbl_GlobalEventHandler)
bus.csysfs.c
1.3.1) acpi_device_fixed_event
(AcpiGbl_FixedEventHandlers[Event].Handle)
button.c
1.3.1.x) notify
hardware
52
GPEs
• GPEs
‒ GPEs are ACPI events that are not predefined by the ACPI
specification.
‒ These events are usually handled by evaluating control
methods, which are objects in the namespace and can
access system hardware.
‒ ACPI registers: GPE0_BLK, GPE1_BLK
‒ Control Methods: _GPE._Lxx, _GPE._Exx
‒ X86: reference GPE0_STS register in the Intel I/O Controller Hub
(ICH) datasheet.
‒ watch -n 1 cat /sys/firmware/acpi/interrupts/gpe[012]
[0123456789ABCDEF]
53
ACPICA
Events (GPE)
events
1) AcpiEvFixedEventDetect
2) AcpiEvGpeDetect
2.1) AcpiEvDetectGpe
2.1.4) AcpiEvGpeDispatch
2.1.4.4.1) AcpiEvQueueNotifyRequest
3) AcpiEvSciDispatch
Kernel
0) acpi_ev_sci_xrupt_handler
(AcpiEvSciXruptHandler)
hardware
2.1.4.4.2.2) AcpiPsExecuteMethod
executer
2.1.4.4.2.3) AcpiExResolveNodeToValue
Kernel/irq
drivers/acpi
ec.csysfs.c osl.c
2.1.1) AcpiHwRead
2.1.4.1) AcpiHwLowSetGpe
2.1.4.2) AcpiHwClearGpe
2.1.2) acpi_global_event_handler
(AcpiGbl_GlobalEventHandler)
2.1.3) acpi_ec_gpe_handler
(GpeHandlerInfo->Address)
Kernel/workqueue
queue
Namespace
2.1.4.4.2.1) AcpiNsGetNode
2.1.4.4.2.4) AcpiNsCheckReturnValue
2.1.4.4.2) AcpiNsEvaluate
parser
2.1.4.4) AcpiEvAsynchExecuteGpeMethod
2.1.4.3) acpi_os_execute
54
Example: EC and _Qxx
• A general-purpose event is raised from the GPE bit
tied to an embedded controller, the embedded
controller driver uses another naming convention
defined by ACPI for the embedded controller driver
to determine which control method to queue for
execution.
• The name of the control method to queue is always
of the form _Qxx where xx is the number of the
query acknowledged by the embedded controller.
55
Class diagram for _Qxx event handling
56
Summary
• The interactive between two framework: Linux
Kernel and ACPICA
• ACPI Namespace: An abstract layer between
hardware platform and OS
• ACPI event handing: To define and handle the
dynamic behavior between platform and OS
Q&A
58
Reference
• [1] ACPI Component Architecture User Guide and
Programmer Reference Revision 6.2, May 31, 2017
• [2] Advanced Configuration and Power Interface
(ACPI) Specification Version 6.3, January 2019
Thank you.
59
Feedback to
jlee@suse.com
Corporate Headquarters
Maxfeldstrasse 5
90409 Nuremberg
Germany
+49 911 740 53 0 (Worldwide)
www.suse.com
Join us on:
www.opensuse.org
61
Unpublished Work of SUSE. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose.
The development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.

More Related Content

What's hot

SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Linaro
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
Linaro
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
Linaro
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linaro
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Linaro
 
Linux device drivers
Linux device drivers Linux device drivers
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPIKernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Anne Nicolas
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareLinaro
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
Linaro
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
Linaro
 
Platform Drivers
Platform DriversPlatform Drivers
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel Module
SUSE Labs Taipei
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
Buland Singh
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
Joseph Lu
 
Spi drivers
Spi driversSpi drivers
Spi drivers
pradeep_tewani
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
Jian-Hong Pan
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
 
Pcie drivers basics
Pcie drivers basicsPcie drivers basics
Pcie drivers basics
Venkatesh Malla
 
Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protections
Shubham Dubey
 

What's hot (20)

SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPIKernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel Module
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Pcie drivers basics
Pcie drivers basicsPcie drivers basics
Pcie drivers basics
 
Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protections
 

Similar to Profiling the ACPICA Namespace and Event Handing

Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux Kernel
Kernel TLV
 
RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACI
Joel W. King
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
Gustavo Rene Antunez
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
Ted Jung
 
Identifying and Supporting 'X-compatible' Hardware Blocks
Identifying and Supporting 'X-compatible' Hardware BlocksIdentifying and Supporting 'X-compatible' Hardware Blocks
Identifying and Supporting 'X-compatible' Hardware Blocks
Chen-Yu Tsai
 
MattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxMattsonTutorialSC14.pptx
MattsonTutorialSC14.pptx
gopikahari7
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
Docker, Inc.
 
Tech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product UpdateTech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product Update
AdaCore
 
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC DirectivesFortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
Jeff Larkin
 
MattsonTutorialSC14.pdf
MattsonTutorialSC14.pdfMattsonTutorialSC14.pdf
MattsonTutorialSC14.pdf
George Papaioannou
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
Jiannan Ouyang, PhD
 
Honorable Squires
Honorable SquiresHonorable Squires
Honorable Squires
ESUG
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
byonggon chun
 
The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10
mark-smith
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
abinaya m
 
ONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
ONIE: Open Network Install Environment @ OSDC 2014 Netways, BerlinONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
ONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
Nat Morris
 
RISC V in Spacer
RISC V in SpacerRISC V in Spacer
RISC V in Spacer
klepsydratechnologie
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
KundanSingh887495
 
Public vs. Private Cloud Performance by Flex
Public vs. Private Cloud Performance by FlexPublic vs. Private Cloud Performance by Flex
Public vs. Private Cloud Performance by Flex
StackIQ
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 

Similar to Profiling the ACPICA Namespace and Event Handing (20)

Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux Kernel
 
RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACI
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Identifying and Supporting 'X-compatible' Hardware Blocks
Identifying and Supporting 'X-compatible' Hardware BlocksIdentifying and Supporting 'X-compatible' Hardware Blocks
Identifying and Supporting 'X-compatible' Hardware Blocks
 
MattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxMattsonTutorialSC14.pptx
MattsonTutorialSC14.pptx
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
 
Tech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product UpdateTech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product Update
 
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC DirectivesFortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
 
MattsonTutorialSC14.pdf
MattsonTutorialSC14.pdfMattsonTutorialSC14.pdf
MattsonTutorialSC14.pdf
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
 
Honorable Squires
Honorable SquiresHonorable Squires
Honorable Squires
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
 
The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
ONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
ONIE: Open Network Install Environment @ OSDC 2014 Netways, BerlinONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
ONIE: Open Network Install Environment @ OSDC 2014 Netways, Berlin
 
RISC V in Spacer
RISC V in SpacerRISC V in Spacer
RISC V in Spacer
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
 
Public vs. Private Cloud Performance by Flex
Public vs. Private Cloud Performance by FlexPublic vs. Private Cloud Performance by Flex
Public vs. Private Cloud Performance by Flex
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 

More from SUSE Labs Taipei

Locked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelLocked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernel
SUSE Labs Taipei
 
SUSE shim and things related to it
SUSE shim and things related to itSUSE shim and things related to it
SUSE shim and things related to it
SUSE Labs Taipei
 
The bright future of SUSE and openSUSE
The bright future of SUSE and openSUSEThe bright future of SUSE and openSUSE
The bright future of SUSE and openSUSE
SUSE Labs Taipei
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
SUSE Labs Taipei
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
SUSE Labs Taipei
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build Service
SUSE Labs Taipei
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
SUSE Labs Taipei
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
SUSE Labs Taipei
 
Looking into trusted and encrypted keys
Looking into trusted and encrypted keysLooking into trusted and encrypted keys
Looking into trusted and encrypted keys
SUSE Labs Taipei
 
Use bonding driver with ethernet
Use bonding driver with ethernetUse bonding driver with ethernet
Use bonding driver with ethernet
SUSE Labs Taipei
 
Use build service API in your program
Use build service API in your programUse build service API in your program
Use build service API in your program
SUSE Labs Taipei
 
Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driver
SUSE Labs Taipei
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
SUSE Labs Taipei
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
SUSE Labs Taipei
 
oS KDE Repos & MM
oS KDE Repos & MMoS KDE Repos & MM
oS KDE Repos & MM
SUSE Labs Taipei
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceSUSE Labs Taipei
 

More from SUSE Labs Taipei (18)

Locked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelLocked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernel
 
SUSE shim and things related to it
SUSE shim and things related to itSUSE shim and things related to it
SUSE shim and things related to it
 
The bright future of SUSE and openSUSE
The bright future of SUSE and openSUSEThe bright future of SUSE and openSUSE
The bright future of SUSE and openSUSE
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build Service
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Looking into trusted and encrypted keys
Looking into trusted and encrypted keysLooking into trusted and encrypted keys
Looking into trusted and encrypted keys
 
Use bonding driver with ethernet
Use bonding driver with ethernetUse bonding driver with ethernet
Use bonding driver with ethernet
 
Use build service API in your program
Use build service API in your programUse build service API in your program
Use build service API in your program
 
Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driver
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
 
openSUSE12.2 Review
openSUSE12.2 ReviewopenSUSE12.2 Review
openSUSE12.2 Review
 
oS KDE Repos & MM
oS KDE Repos & MMoS KDE Repos & MM
oS KDE Repos & MM
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build Service
 
Coscup 2012-urfkill
Coscup 2012-urfkillCoscup 2012-urfkill
Coscup 2012-urfkill
 

Recently uploaded

Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 

Recently uploaded (20)

Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 

Profiling the ACPICA Namespace and Event Handing

  • 1. Profiling the ACPICA Namespace and Event Handing September, 2019, SUSE Labs Conference 2019, Špindlerův mlýn Joey Lee SUSE Labs Taipei jlee@suse.com
  • 2. 2 Agenda • Components in ACPICA • ACPICA in Linux Kernel • Definition blocks and ACPI Namespace • The Fixed event and GPE handling • Q&A
  • 3. 3 ACPICA • The ACPI Component Architecture (CA) is the core of Advanced Configuration and Power Interface (ACPI) subsystem in Linux kernel. • The ACPICA provides the fundamental ACPI services that are independent of any operating system. [1] • Mainly maintained by Intel ‒ https://github.com/acpica/acpica.git
  • 4. 4 ACPICA (cont.) • ACPICA’s services include an AML parser/interpreter, ACPI namespace management, ACPI table management and event handling [1]. • The OS Services Layer (OSL) is a conversion layer between the OS-independent ACPICA to a particular host operating system. [1]
  • 5. 5 ACPI Namespace and Event handing • ACPI Namespace ‒ A static tree structure reflects to AML definition blocks which is an abstract layer of hardware devices in platform. • ACPI Event handing ‒ ACPICA provides event mechanisms to define and to handle the dynamic behavior at runtime.
  • 7. 7 ACPICA components • ACPI fundamental: Namespace Management, Table Management, Event Handling, Resource Manager, Hardware Management, Utilities • AML interpreter: Dispatcher, Executer, Parser, Disassembler, Debugger • OS Services Layer (OSL) ‒ ACPICA implements OSL for user space of Unix, Linux, Windows and BSD. ‒ Linux Kernel’s ACPI subsystem maintains a OSL (drivers/acpi/osl.c) to adapt ACPICA.
  • 8. 8 Kernel or Userland ACPICA Core Components ACPICA root Namespace AML Interpreter Tables node node Events OSL Parser Resources Hardware Utilities Disassembler Dispatcher Executer Debuggernode node node AcpiOs* Acpi*Acpi* Acpi* Acpi* Acpi* Acpi*
  • 9. 9 ACPICA tools • iasl: ASL compiler / AML decompiler • Tools: acpidump, acpixtract, acpinames, acpiexec... • Tests: ASL grammar validation Test Suite (ASLTS), ASL test cases • Generate: generation tools, release tools
  • 10. 10 ACPICA and Tools Components Namespace AML Interpreter Tables Events OSL Parser Resources Hardware Utilities Disassembler Dispatcher Executer Debugger Tools acpidump acpiexec Compiler TestsGenerate release linux msvc unix msvc9 efi acpixtract root node node node node node iasl osunix* oslinux* oswin* osbsd* efi* aslts Acpi*Acpi* AcpiOs*
  • 11. ACPICA in Linux Kernel
  • 12. 12 ACPI host and ACPICA • OSL in Linux Kernel: drivers/acpi/osl.c • ACPICA-to-host: All ACPICA-to-host interactions pass through the OSL via direct calls to the AcpiOs* interfaces from ACPICA. [1] • Host-to-ACPICA ‒ Synchronous: the host making direct calls to the various public Acpi* interfaces. [1] ‒ Asynchronous: The host calls ACPICA to install an appropriate handler at initialization time. This handler is then invoked by ACPICA whenever the requested event occurs. (handle fixed events or GPE) [1]
  • 13. 13 OSL Services • Environmental: enable acpi mode • Memory Management: mm • Multitasking Support • Mutual Exclusion and Synchronization • Interrupt handling: IRQ • Address Spaces • Stream I/O: printk
  • 14. 14 Platform Kernel ACPICA in Linux Kernel Firmware ACPI Tables RSDP XSDT Hardware ACPI ACPICA root bus driver device Namespace AML Interpreter Tables node node Event FADT DSDT SSDT2SSDT1 Resource Hardware mm OSL resource printkEFIIRQqueue PCI CPU Memory pm AcpiOs* Acpi* Acpi*
  • 15. Definition blocks and ACPI Namespace
  • 16. 16 ACPI Tables • Definition blocks tables ‒ AML (ACPI Machine Language) format ‒ DSDT (differentiated system description table), SSDT (secondary system description tables) • Data tables ‒ TDL (Table Definition Language) ‒ FADT, MADT, ECDT, SRAT, etc. - essentially any table other than a DSDT or SSDT. [2] • The iasl tool supports AML and TDL
  • 17. 17 ACPI Namespace • The ACPI Namespace is a large data structure that is constructed and maintained by the ACPICA Subsystem component. [1] • Constructed primarily from the AML defined within an ACPI Differentiated System Description Table (DSDT), the namespace contains a hierarchy of named ACPI objects. [1] root Namespace node node
  • 18. 18 Definition blocks, Namespace and ACPI devices Tables OSL EFI ACPI Tables RSDP XSDT FADT DSDT SSDT2SSDT1 root Namespace AML Interpreter node node bus driver device
  • 19. 19 Definition blocks, Namespace and ACPI devices [1]Load
  • 20. 20 Definition blocks, Namespace and ACPI devices [1]Load [2]
  • 21. 21 Definition blocks, Namespace and ACPI devices [1]Load [2] [3] Parse
  • 22. 22 Definition blocks, Namespace and ACPI devices [1]Load [2] [3] Parse [4] handle
  • 23. 23 Definition blocks, Namespace and ACPI devices [1]Load [2] [3] Parse PCI CPU Memory Companion Companion Companion PCI CPU Memory [4] handle
  • 24. 24 Namespace Initialization • Firmware puts definition blocks tables (DSDT and SSDT*) to memory. • Table Management component loads DSDT and SSDT. ‒ OSL helps to get RSDP for loading ACPI tables • Table Management component forwards DSDT/SSDT points to Namespace Management component. • Namespace Management component requests AML interpreter to parse tables. • Base on parsing result, Namespace Management component creates ACPI namespace.
  • 25. 25 ACPICA Table to Namespace tables 2) AcpiTbLoadNamespace namespace 2.1.1) AcpiNsParseTable 2.1.1.1) AcpiNsExecuteTable 3.1) AcpiNsInitOneObject 2.1) AcpiNsLoadTable 3) AcpiNsInitializeObjects 2.1.2) AcpiDsInitializeObjects 0) acpi_load_tables (AcpiLoadTables) Kernel drivers/acpi/bus.c events 1) AcpiEvInstallRegionHandlers dispatcher 2.1.1.1) AcpiPsExecuteTable parser 2.1.1.1.1) AcpiPsCreateScopeOp 2.1.1.1.5) AcpiPsParseAml 2.1.1.1.2) AcpiDsCreateWalkState 2.1.1.1.3) AcpiDsInitAmlWalk 2.1.1.1.4) AcpiDsScopeStackPush 2.1.1.1.6) AcpiDsDeleteWalkState 2.1.1.1.7) AcpiPsDeleteParseTree
  • 26. 26 ACPICA Evaluate method/object namespace 1) AcpiNsValidateHandle 2) AcpiNsEvaluate 2.1) AcpiNsGetNode 2.4) AcpiNsCheckReturnValue 3) AcpiNsResolveReferences 0) acpi_evaluate_object (AcpiEvaluateObject) Kernel drivers/acpi/utils.c tables 2.2.1) AcpiTbCheckDsdtHeader dispatcher 2.2) AcpiPsExecuteMethod parser 2.2.3) AcpiPsUpdateParameterList 2.2.4) AcpiPsCreateScopeOp 2.2.7) AcpiPsParseAml 2.2.8) AcpiPsDeleteParseTree 2.2.9) AcpiPsUpdateParameterList 2.2.2) AcpiDsBeginMethodExecution 2.2.5) AcpiDsCreateWalkState 2.2.6) AcpiDsInitAmlWalk executer 2.3) AcpiExResolveNodeToValue
  • 36. 36 Class diagram for ACPI Namespace
  • 37. The Fixed event and GPE handling
  • 38. 38 Event types in ACPICA • ACPI Fixed Events and General Purpose Events (GPEs) ‒ System Control Interrupts (SCIs) be generated • Event types in control method ‒ Notify events that are generated via the execution of the ASL Notify keyword in a control method. [1] ‒ Events that are caused by accesses to an address space or operation region during the execution of a control method. [1]
  • 39. 39 System Control Interrupts (SCIs) • SCI ‒ IRQ9 on x86. (otherwise checking SCI_INT in FADT) • SCI handlers ‒ AcpiEvGpeXruptHandler, AcpiEvSciXruptHandler in ACPICA ‒ acpi_global_event_handler in Linux Kernel
  • 40. 40 ACPI Events OSL root Namespace AML Interpreter node node bus driver device Hardware Event Platform Firmware ACPI Registers Hardware FADT PM1a IRQ GPE0 PM1b GPE1 Sleep Timer
  • 44. 44 ACPI Events (Fixed Event) [1]Set [2]SCI[2]SCI [3] [3]Read Clear [4] Button
  • 45. 45 ACPI Events (Fixed Event) [1]Set [2]SCI[2]SCI [3] [3]Read Clear [4] Button Input [5] input [5]Keycode
  • 48. 48 ACPI Events (GPE) [1]Set [2]SCI[2]SCI [3] [3]Read Clear [4] _Exx _Lxx _GPE [5] [6]Access Address space [6] Notify
  • 49. 49 ACPI Events (GPE) [1]Set [2]SCI[2]SCI [3] [3]Read Clear [4] _Exx _Lxx _GPE [5] [6]Access Address space [6] NotifyPCI CPU Memory PCI CPU Memory Interactive Interactive interactive
  • 50. 50 Fixed Events • Fixed Events ‒ ACPI events that have a predefined meaning in the ACPI specification. e.g. power button, timer overflows. ‒ These events are handled directly by the OS handlers. [2] ‒ ACPI register: PM1 = PM1a | PM1b ‒ PM1x_STS.8: PWRBTN_STS ‒ PM1x_STS.9: SLPBTN_STS ‒ PM1x_STS.10: RTC_STS ….
  • 51. 51 ACPICA Events (fixed) events 1) AcpiEvFixedEventDetect 1.3) AcpiEvFixedEventDispatch 2) AcpiEvGpeDetect 3) AcpiEvSciDispatch Kernel 0) acpi_ev_sci_xrupt_handler (AcpiEvSciXruptHandler) 1.1) AcpiHwRegisterRead Kernel/irq drivers/acpi 1.2) acpi_global_event_handler (AcpiGbl_GlobalEventHandler) bus.csysfs.c 1.3.1) acpi_device_fixed_event (AcpiGbl_FixedEventHandlers[Event].Handle) button.c 1.3.1.x) notify hardware
  • 52. 52 GPEs • GPEs ‒ GPEs are ACPI events that are not predefined by the ACPI specification. ‒ These events are usually handled by evaluating control methods, which are objects in the namespace and can access system hardware. ‒ ACPI registers: GPE0_BLK, GPE1_BLK ‒ Control Methods: _GPE._Lxx, _GPE._Exx ‒ X86: reference GPE0_STS register in the Intel I/O Controller Hub (ICH) datasheet. ‒ watch -n 1 cat /sys/firmware/acpi/interrupts/gpe[012] [0123456789ABCDEF]
  • 53. 53 ACPICA Events (GPE) events 1) AcpiEvFixedEventDetect 2) AcpiEvGpeDetect 2.1) AcpiEvDetectGpe 2.1.4) AcpiEvGpeDispatch 2.1.4.4.1) AcpiEvQueueNotifyRequest 3) AcpiEvSciDispatch Kernel 0) acpi_ev_sci_xrupt_handler (AcpiEvSciXruptHandler) hardware 2.1.4.4.2.2) AcpiPsExecuteMethod executer 2.1.4.4.2.3) AcpiExResolveNodeToValue Kernel/irq drivers/acpi ec.csysfs.c osl.c 2.1.1) AcpiHwRead 2.1.4.1) AcpiHwLowSetGpe 2.1.4.2) AcpiHwClearGpe 2.1.2) acpi_global_event_handler (AcpiGbl_GlobalEventHandler) 2.1.3) acpi_ec_gpe_handler (GpeHandlerInfo->Address) Kernel/workqueue queue Namespace 2.1.4.4.2.1) AcpiNsGetNode 2.1.4.4.2.4) AcpiNsCheckReturnValue 2.1.4.4.2) AcpiNsEvaluate parser 2.1.4.4) AcpiEvAsynchExecuteGpeMethod 2.1.4.3) acpi_os_execute
  • 54. 54 Example: EC and _Qxx • A general-purpose event is raised from the GPE bit tied to an embedded controller, the embedded controller driver uses another naming convention defined by ACPI for the embedded controller driver to determine which control method to queue for execution. • The name of the control method to queue is always of the form _Qxx where xx is the number of the query acknowledged by the embedded controller.
  • 55. 55 Class diagram for _Qxx event handling
  • 56. 56 Summary • The interactive between two framework: Linux Kernel and ACPICA • ACPI Namespace: An abstract layer between hardware platform and OS • ACPI event handing: To define and handle the dynamic behavior between platform and OS
  • 57. Q&A
  • 58. 58 Reference • [1] ACPI Component Architecture User Guide and Programmer Reference Revision 6.2, May 31, 2017 • [2] Advanced Configuration and Power Interface (ACPI) Specification Version 6.3, January 2019
  • 60.
  • 61. Corporate Headquarters Maxfeldstrasse 5 90409 Nuremberg Germany +49 911 740 53 0 (Worldwide) www.suse.com Join us on: www.opensuse.org 61
  • 62. Unpublished Work of SUSE. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.