SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSESUSE Labs Taipei
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VRISC-V International
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototypingYan Vugenfirer
 
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
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu WorksZhen Wei
 
Ipmi spec ch1~6_simon_20110422
Ipmi spec ch1~6_simon_20110422Ipmi spec ch1~6_simon_20110422
Ipmi spec ch1~6_simon_20110422davidsmc
 
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 Linaro
 
HKG18-402 - Build secure key management services in OP-TEE
HKG18-402 - Build secure key management services in OP-TEEHKG18-402 - Build secure key management services in OP-TEE
HKG18-402 - Build secure key management services in OP-TEELinaro
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLinaro
 
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 ACPIAnne Nicolas
 

Was ist angesagt? (20)

Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSE
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
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
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
 
Ipmi spec ch1~6_simon_20110422
Ipmi spec ch1~6_simon_20110422Ipmi spec ch1~6_simon_20110422
Ipmi spec ch1~6_simon_20110422
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64 BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
BUD17-209: Reliability, Availability, and Serviceability (RAS) on ARM64
 
HKG18-402 - Build secure key management services in OP-TEE
HKG18-402 - Build secure key management services in OP-TEEHKG18-402 - Build secure key management services in OP-TEE
HKG18-402 - Build secure key management services in OP-TEE
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
PCI Drivers
PCI DriversPCI Drivers
PCI Drivers
 
Status update-qemu-pcie
Status update-qemu-pcieStatus update-qemu-pcie
Status update-qemu-pcie
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 
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
 

Ă„hnlich wie Profiling the ACPICA Namespace and Event Handling

Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelKernel 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 ACIJoel 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 & kubernetesTed 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 BlocksChen-Yu Tsai
 
MattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxMattsonTutorialSC14.pptx
MattsonTutorialSC14.pptxgopikahari7
 
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 UpdateAdaCore
 
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 DirectivesJeff Larkin
 
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-KernelsJiannan Ouyang, PhD
 
Honorable Squires
Honorable SquiresHonorable Squires
Honorable SquiresESUG
 
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 Clusterbyonggon 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 10mark-smith
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya 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, BerlinNat Morris
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.pptKundanSingh887495
 
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 FlexStackIQ
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 

Ă„hnlich wie Profiling the ACPICA Namespace and Event Handling (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
 

Mehr von SUSE Labs Taipei

Locked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelLocked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelSUSE 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 itSUSE Labs Taipei
 
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel ModuleSUSE 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 openSUSESUSE 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 ServiceSUSE Labs Taipei
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Looking into trusted and encrypted keys
Looking into trusted and encrypted keysLooking into trusted and encrypted keys
Looking into trusted and encrypted keysSUSE Labs Taipei
 
Use bonding driver with ethernet
Use bonding driver with ethernetUse bonding driver with ethernet
Use bonding driver with ethernetSUSE 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 programSUSE Labs Taipei
 
Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driverSUSE Labs Taipei
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918SUSE 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
 

Mehr von 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
 
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel Module
 
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
 
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
 

KĂĽrzlich hochgeladen

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

KĂĽrzlich hochgeladen (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Profiling the ACPICA Namespace and Event Handling

  • 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.