SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
AARCH64 VMSA Under Linux Kernel
Haifeng Li

September 26, 2013
Outline

1

Physical Memory

2

Virtual Memory Usage in Linux

3

MMU Behavior
Translation Walk
Memory Attributes

4

Summary

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

2 / 20
Two points for Physical Memory

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

3 / 20
Physical Memory Length&Offset
Three ways to define them in Linux
CONFIG CMDLINE
atags by uBoot
Device tree
1
2
3
4
5
6
7
8
9
10
11

¤

a r c h / arm64 / b o o t / d t s / f o u n d a t i o n −v8 . d t s
...
#a d d r e s s −c e l l s = <2>;
#s i z e −c e l l s = <2>;
...
memory@80000000 {
d e v i c e t y p e = ”memory” ;
r e g = <0x00000000 0 x80000000 0 0 x80000000 >,
<0x00000008 0 x80000000 0 0 x80000000 >;
};
...

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

4 / 20
Outline

1

Physical Memory

2

Virtual Memory Usage in Linux

3

MMU Behavior
Translation Walk
Memory Attributes

4

Summary

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

5 / 20
Virtual Address Layout in Linux

0xFFFF 8000 0000 0000 − 0xFFFF FFBB FFFE FFFF vmalloc area [∼240GB]
0xFFFF FFBF FBC 0 0000 − 0xFFFF FFBF FBDF FFFF UART [2MB]
0xFFFF FFBF FBE 0 0000 − 0xFFFF FFBF FBE 0 FFFF PCI I/O [64KB]
0xFFFF FFBF FC 00 0000 − 0xFFFF FFBF FFFF FFFF Modules [64MB]

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

6 / 20
Outline

1

Physical Memory

2

Virtual Memory Usage in Linux

3

MMU Behavior
Translation Walk
Memory Attributes

4

Summary

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

7 / 20
Classic Translation Walk

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

8 / 20
ARMV8 page size & Linux Support
ARMV8 supports 4KB, 16KB, 64KB Page size.

Table: Selection Page Size between 4KB & 64KB

4KB
64KB

Software Conf.
Default

TCR EL1.TG1=0b10 & TCR EL1.TG0=0b00

CONFIG ARM64 64K PAGES

TCR EL1.TG1=0b11 & TCR EL1.TG0=0b01

AARCH64 VMSA Under Linux Kernel

*Hardware Conf.

Marvell

September 26, 2013

9 / 20
Address Translation (1)

1

AArch64 Linux allows 39-bit (512GB) virtual addresses for
both user and kernel translation.1

2

Which TTBR is used depends only on the VA[63] bit
presented for translation.2

1
2

Documentation/arm64/memory.txt
D5-1711,DDI0487A.a-2

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

10 / 20
Address Translation (2)

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

11 / 20
Two Descriptors Type
Table Descriptor
BlockPage Descriptor
Block Desc.: First or second Level descriptor,which bit[1] is 0,
gives the base address of a block of memory.

4KB
64KB

Block Size
1GB & 2MB
512MB

Page Desc.: Third descriptor, gives the base address of a
block of memory.

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

12 / 20
Table Attributes
Bits[63:59] of descriptor define the attributes for next-level
translation table access.
NSTable[63] Ignored from Non-secure state
APTable[62:61]
APTable[62:61] Effect
00
No effect on permissions in subsequent levels of lookup.
01
Access at EL0 is not permitted.
10
Write access is permitted at any EL.
11
Write access is not permitted at any EL. Read access at EL0 is not neither.
UXNTable[60] Excution Never from EL0
PXNTable[59] Excution Never from EL1
Cache Policies of page table memory is defined by TCR EL1.
¤
1
2
3
4
5
6
7

#i f n d e f
/∗ PTWs
#d e f i n e
#e l s e
/∗ PTWs
#d e f i n e
#e n d i f

CONFIG SMP
c a c h e a b l e , i n n e r / o u t e r WBWA n o t s h a r e a b l e ∗/
TCR FLAGS
TCR IRGN WBWA | TCR ORGN WBWA
c a c h e a b l e , i n n e r / o u t e r WBWA s h a r e a b l e ∗/
TCR FLAGS
TCR IRGN WBWA | TCR ORGN WBWA | TCR SHARED

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

13 / 20
BlockPage Attributes(1)

UXN,bit[52] Determines whether execution at EL0 of
instructions fetched from the region is permtted.
PXN,bit[51] Determines whether execution at EL1 of
instructions fetched from the region is permtted.
Contiguous, bit[50] A hint bit indicating the translation table
entry is one of a contiguous set of entries. That is, TLB can
cache a single entry to cover the contiguous translation table
entries.
Page Size
4KB
64KB

AARCH64 VMSA Under Linux Kernel

3rd Index Bit Range
0bxxxxx0000
0bxxxxxxxx00000

Marvell

September 26, 2013

14 / 20
BlockPage Attributes(2)

nG,bit[11] Determines whether the TLB entry applies to all
ASID values, or only to the current ASID value.nG=0,means
the region is available for all processes.

AF,bit[10] Access flags. 0 indicates a page or block of
memory is accessed for the first time, never hold in TLB, and
an Access flag fault is generated. Linux’s swap usage.

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

15 / 20
BlockPage Attributes(3)

SH,bits[9:8] Shareability field.
SH[1:0]
00
01
10
11

Normal Memory
Non-shareable
Unpredictable
Outer Shareable
Inner Shareable

AP[2:1],bits[7:6]
AP[2:1]
00
01
10
11

Access from EL1
Read/write
Read/write
Read-only
Read-only

Access from EL0
None
Read/write
None
Read-only

NS,bit[5] Non-secure bit. For memory access from Non-secure
state, this bit is ignored.
AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

16 / 20
BlockPage Attributes(4)
AttrIndx[2:0],bits[4:2] Memory Attributes index field, for the MAIR EL1.

Bits of MAIR EL1 encoded as follows.

Encoding
00RW,RW! =00
0100
01RW,RW! =00
10RW
11RW

Meaning
Write-through transient
Non-Cacheable
Write-back transient
Write-through non-transient
Write-back non-transient

Attr<n>[3:0] Meaning
0000
nGnRnE
0100
nGnRE
1000
nGRE
1100
GRE
Linux Support: 0000,0100,1100

R:Read allocate policy – 0(No)1(Yes)
W:Write allocate policy – 0(No)1(Yes)
Transient hint:an access is unlikely to be repeated in future.
Linux Support:0100,1111
AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

17 / 20
Device Memory Attribute
Gathering
Multiple memory accesses of the same type, read or write, to
the same memory location to be merged into a single
transaction.
Multiple memory accesses of the same type, read or write, to
different memory locations to be merged into a single memory
transaction on an interconnect.
Reordering
The order of transactions is out of program order.
Early Write Acknowledgement
It is a hint to the platform memory system. Assigning the No Early
Write Acknowledgement attribute to a Device memory location
recommends that only the endpoint of the write access returns a
write acknowledgement of the access, and that no earlier point in
the memory system returns a write acknowledge.
AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

18 / 20
Outline

1

Physical Memory

2

Virtual Memory Usage in Linux

3

MMU Behavior
Translation Walk
Memory Attributes

4

Summary

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

19 / 20
Summary
Big changes for VMSA in AARCH64 Linux:
Virtual address & Physical address extend 48bit.
The pagetable is splited into user and kernel.
Page size supported 4KB & 64KB
Introduce new concept for Device Memory.

AARCH64 VMSA Under Linux Kernel

Marvell

September 26, 2013

20 / 20

Más contenido relacionado

La actualidad más candente

Universal Flash Storage
Universal Flash StorageUniversal Flash Storage
Universal Flash StorageBhaumik Bhatt
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux KernelKernel TLV
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization WSO2
 
The Tofu Interconnect D for the Post K Supercomputer
The Tofu Interconnect D for the Post K SupercomputerThe Tofu Interconnect D for the Post K Supercomputer
The Tofu Interconnect D for the Post K Supercomputerinside-BigData.com
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinityTakuya ASADA
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Ceph Community
 
Linux SD/MMC Driver Stack
Linux SD/MMC Driver Stack Linux SD/MMC Driver Stack
Linux SD/MMC Driver Stack Champ Yen
 
Linux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureLinux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureRyo Jin
 
Understanding nas (network attached storage)
Understanding nas (network attached storage)Understanding nas (network attached storage)
Understanding nas (network attached storage)sagaroceanic11
 
Moving to PCI Express based SSD with NVM Express
Moving to PCI Express based SSD with NVM ExpressMoving to PCI Express based SSD with NVM Express
Moving to PCI Express based SSD with NVM ExpressOdinot Stanislas
 
CDW: SAN vs. NAS
CDW: SAN vs. NASCDW: SAN vs. NAS
CDW: SAN vs. NASSpiceworks
 
7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance 7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance AMD
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver艾鍗科技
 
Universal flash storage
Universal flash storageUniversal flash storage
Universal flash storageDooyong Lee
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Odinot Stanislas
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBshimosawa
 
Zfs Nuts And Bolts
Zfs Nuts And BoltsZfs Nuts And Bolts
Zfs Nuts And BoltsEric Sproul
 

La actualidad más candente (20)

Universal Flash Storage
Universal Flash StorageUniversal Flash Storage
Universal Flash Storage
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization
 
NVMe overview
NVMe overviewNVMe overview
NVMe overview
 
The Tofu Interconnect D for the Post K Supercomputer
The Tofu Interconnect D for the Post K SupercomputerThe Tofu Interconnect D for the Post K Supercomputer
The Tofu Interconnect D for the Post K Supercomputer
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
 
Linux SD/MMC Driver Stack
Linux SD/MMC Driver Stack Linux SD/MMC Driver Stack
Linux SD/MMC Driver Stack
 
Linux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureLinux on ARM 64-bit Architecture
Linux on ARM 64-bit Architecture
 
Understanding nas (network attached storage)
Understanding nas (network attached storage)Understanding nas (network attached storage)
Understanding nas (network attached storage)
 
Moving to PCI Express based SSD with NVM Express
Moving to PCI Express based SSD with NVM ExpressMoving to PCI Express based SSD with NVM Express
Moving to PCI Express based SSD with NVM Express
 
CDW: SAN vs. NAS
CDW: SAN vs. NASCDW: SAN vs. NAS
CDW: SAN vs. NAS
 
7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance 7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver
 
Xen Memory Management
Xen Memory ManagementXen Memory Management
Xen Memory Management
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Universal flash storage
Universal flash storageUniversal flash storage
Universal flash storage
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
 
Zfs Nuts And Bolts
Zfs Nuts And BoltsZfs Nuts And Bolts
Zfs Nuts And Bolts
 

Similar a AARCH64 VMSA Under Linux Kernel

ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreGlobalLogic Ukraine
 
User guide wishbone serializer
User guide wishbone serializerUser guide wishbone serializer
User guide wishbone serializerdragonvnu
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on LabMichelle Holley
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareDaniel Blezek
 
Advanced Root Cause Analysis
Advanced Root Cause AnalysisAdvanced Root Cause Analysis
Advanced Root Cause AnalysisEric Sloof
 
Exploiting arm linux
Exploiting arm linuxExploiting arm linux
Exploiting arm linuxDan H
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture Abdullaziz Tagawy
 
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsAn Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsPremier Farnell
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performanceRicky Zhu
 
Snapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSnapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSantosh Verma
 
LCU14 209- LLVM Linux
LCU14 209- LLVM LinuxLCU14 209- LLVM Linux
LCU14 209- LLVM LinuxLinaro
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM ArchitectureLinaro
 
Beneath the Linux Interrupt handling
Beneath the Linux Interrupt handlingBeneath the Linux Interrupt handling
Beneath the Linux Interrupt handlingBhoomil Chavda
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armPrashant Ahire
 

Similar a AARCH64 VMSA Under Linux Kernel (20)

ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/Spectre
 
User guide wishbone serializer
User guide wishbone serializerUser guide wishbone serializer
User guide wishbone serializer
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
Vlans_routing
Vlans_routingVlans_routing
Vlans_routing
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics Hardware
 
Oracle acfs in oracle 11
Oracle acfs in oracle 11Oracle acfs in oracle 11
Oracle acfs in oracle 11
 
Advanced Root Cause Analysis
Advanced Root Cause AnalysisAdvanced Root Cause Analysis
Advanced Root Cause Analysis
 
Analisis_avanzado_vmware
Analisis_avanzado_vmwareAnalisis_avanzado_vmware
Analisis_avanzado_vmware
 
Exploiting arm linux
Exploiting arm linuxExploiting arm linux
Exploiting arm linux
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture
 
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its PeripheralsAn Overview Study on 32-bit MCU MB91460 Series and its Peripherals
An Overview Study on 32-bit MCU MB91460 Series and its Peripherals
 
Tips of Malloc & Free
Tips of Malloc & FreeTips of Malloc & Free
Tips of Malloc & Free
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
 
Snapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSnapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 Architecture
 
LCU14 209- LLVM Linux
LCU14 209- LLVM LinuxLCU14 209- LLVM Linux
LCU14 209- LLVM Linux
 
Lecture9
Lecture9Lecture9
Lecture9
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM Architecture
 
Beneath the Linux Interrupt handling
Beneath the Linux Interrupt handlingBeneath the Linux Interrupt handling
Beneath the Linux Interrupt handling
 
Arm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_armArm cortex-m3 by-joe_bungo_arm
Arm cortex-m3 by-joe_bungo_arm
 
Ceph on arm64 upload
Ceph on arm64   uploadCeph on arm64   upload
Ceph on arm64 upload
 

Último

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Último (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

AARCH64 VMSA Under Linux Kernel

  • 1. AARCH64 VMSA Under Linux Kernel Haifeng Li September 26, 2013
  • 2. Outline 1 Physical Memory 2 Virtual Memory Usage in Linux 3 MMU Behavior Translation Walk Memory Attributes 4 Summary AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 2 / 20
  • 3. Two points for Physical Memory AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 3 / 20
  • 4. Physical Memory Length&Offset Three ways to define them in Linux CONFIG CMDLINE atags by uBoot Device tree 1 2 3 4 5 6 7 8 9 10 11 ¤ a r c h / arm64 / b o o t / d t s / f o u n d a t i o n −v8 . d t s ... #a d d r e s s −c e l l s = <2>; #s i z e −c e l l s = <2>; ... memory@80000000 { d e v i c e t y p e = ”memory” ; r e g = <0x00000000 0 x80000000 0 0 x80000000 >, <0x00000008 0 x80000000 0 0 x80000000 >; }; ... AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 4 / 20
  • 5. Outline 1 Physical Memory 2 Virtual Memory Usage in Linux 3 MMU Behavior Translation Walk Memory Attributes 4 Summary AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 5 / 20
  • 6. Virtual Address Layout in Linux 0xFFFF 8000 0000 0000 − 0xFFFF FFBB FFFE FFFF vmalloc area [∼240GB] 0xFFFF FFBF FBC 0 0000 − 0xFFFF FFBF FBDF FFFF UART [2MB] 0xFFFF FFBF FBE 0 0000 − 0xFFFF FFBF FBE 0 FFFF PCI I/O [64KB] 0xFFFF FFBF FC 00 0000 − 0xFFFF FFBF FFFF FFFF Modules [64MB] AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 6 / 20
  • 7. Outline 1 Physical Memory 2 Virtual Memory Usage in Linux 3 MMU Behavior Translation Walk Memory Attributes 4 Summary AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 7 / 20
  • 8. Classic Translation Walk AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 8 / 20
  • 9. ARMV8 page size & Linux Support ARMV8 supports 4KB, 16KB, 64KB Page size. Table: Selection Page Size between 4KB & 64KB 4KB 64KB Software Conf. Default TCR EL1.TG1=0b10 & TCR EL1.TG0=0b00 CONFIG ARM64 64K PAGES TCR EL1.TG1=0b11 & TCR EL1.TG0=0b01 AARCH64 VMSA Under Linux Kernel *Hardware Conf. Marvell September 26, 2013 9 / 20
  • 10. Address Translation (1) 1 AArch64 Linux allows 39-bit (512GB) virtual addresses for both user and kernel translation.1 2 Which TTBR is used depends only on the VA[63] bit presented for translation.2 1 2 Documentation/arm64/memory.txt D5-1711,DDI0487A.a-2 AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 10 / 20
  • 11. Address Translation (2) AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 11 / 20
  • 12. Two Descriptors Type Table Descriptor BlockPage Descriptor Block Desc.: First or second Level descriptor,which bit[1] is 0, gives the base address of a block of memory. 4KB 64KB Block Size 1GB & 2MB 512MB Page Desc.: Third descriptor, gives the base address of a block of memory. AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 12 / 20
  • 13. Table Attributes Bits[63:59] of descriptor define the attributes for next-level translation table access. NSTable[63] Ignored from Non-secure state APTable[62:61] APTable[62:61] Effect 00 No effect on permissions in subsequent levels of lookup. 01 Access at EL0 is not permitted. 10 Write access is permitted at any EL. 11 Write access is not permitted at any EL. Read access at EL0 is not neither. UXNTable[60] Excution Never from EL0 PXNTable[59] Excution Never from EL1 Cache Policies of page table memory is defined by TCR EL1. ¤ 1 2 3 4 5 6 7 #i f n d e f /∗ PTWs #d e f i n e #e l s e /∗ PTWs #d e f i n e #e n d i f CONFIG SMP c a c h e a b l e , i n n e r / o u t e r WBWA n o t s h a r e a b l e ∗/ TCR FLAGS TCR IRGN WBWA | TCR ORGN WBWA c a c h e a b l e , i n n e r / o u t e r WBWA s h a r e a b l e ∗/ TCR FLAGS TCR IRGN WBWA | TCR ORGN WBWA | TCR SHARED AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 13 / 20
  • 14. BlockPage Attributes(1) UXN,bit[52] Determines whether execution at EL0 of instructions fetched from the region is permtted. PXN,bit[51] Determines whether execution at EL1 of instructions fetched from the region is permtted. Contiguous, bit[50] A hint bit indicating the translation table entry is one of a contiguous set of entries. That is, TLB can cache a single entry to cover the contiguous translation table entries. Page Size 4KB 64KB AARCH64 VMSA Under Linux Kernel 3rd Index Bit Range 0bxxxxx0000 0bxxxxxxxx00000 Marvell September 26, 2013 14 / 20
  • 15. BlockPage Attributes(2) nG,bit[11] Determines whether the TLB entry applies to all ASID values, or only to the current ASID value.nG=0,means the region is available for all processes. AF,bit[10] Access flags. 0 indicates a page or block of memory is accessed for the first time, never hold in TLB, and an Access flag fault is generated. Linux’s swap usage. AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 15 / 20
  • 16. BlockPage Attributes(3) SH,bits[9:8] Shareability field. SH[1:0] 00 01 10 11 Normal Memory Non-shareable Unpredictable Outer Shareable Inner Shareable AP[2:1],bits[7:6] AP[2:1] 00 01 10 11 Access from EL1 Read/write Read/write Read-only Read-only Access from EL0 None Read/write None Read-only NS,bit[5] Non-secure bit. For memory access from Non-secure state, this bit is ignored. AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 16 / 20
  • 17. BlockPage Attributes(4) AttrIndx[2:0],bits[4:2] Memory Attributes index field, for the MAIR EL1. Bits of MAIR EL1 encoded as follows. Encoding 00RW,RW! =00 0100 01RW,RW! =00 10RW 11RW Meaning Write-through transient Non-Cacheable Write-back transient Write-through non-transient Write-back non-transient Attr<n>[3:0] Meaning 0000 nGnRnE 0100 nGnRE 1000 nGRE 1100 GRE Linux Support: 0000,0100,1100 R:Read allocate policy – 0(No)1(Yes) W:Write allocate policy – 0(No)1(Yes) Transient hint:an access is unlikely to be repeated in future. Linux Support:0100,1111 AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 17 / 20
  • 18. Device Memory Attribute Gathering Multiple memory accesses of the same type, read or write, to the same memory location to be merged into a single transaction. Multiple memory accesses of the same type, read or write, to different memory locations to be merged into a single memory transaction on an interconnect. Reordering The order of transactions is out of program order. Early Write Acknowledgement It is a hint to the platform memory system. Assigning the No Early Write Acknowledgement attribute to a Device memory location recommends that only the endpoint of the write access returns a write acknowledgement of the access, and that no earlier point in the memory system returns a write acknowledge. AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 18 / 20
  • 19. Outline 1 Physical Memory 2 Virtual Memory Usage in Linux 3 MMU Behavior Translation Walk Memory Attributes 4 Summary AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 19 / 20
  • 20. Summary Big changes for VMSA in AARCH64 Linux: Virtual address & Physical address extend 48bit. The pagetable is splited into user and kernel. Page size supported 4KB & 64KB Introduce new concept for Device Memory. AARCH64 VMSA Under Linux Kernel Marvell September 26, 2013 20 / 20