Adafruit Industries

Deep Dive w/Scott: ARMv8A MMU


Listen Later

Join Scott as he continues his quest to get TinyUSB running on the Raspberry Pi 4 and answers questions folks have. Support Adafruit, and by extension me, by purchasing hardware from https://adafruit.com
Chat with me and lot of others on the Adafruit Discord at https://adafru.it/discord.
No stream next week!
Latest code is here: https://github.com/tannewt/tinyusb/tree/rpi
0:00 Getting started
0:01:30 audio debrief from last week
0:03:28 housekeeping
0:08:00 First time watching your live stream. What are we learning today?
0:09:10 Cortex A / MMU
0:10:20 ​If you learn original python on a pc, is it then easy to go from there to circuit python?
0:11:10 qemu further progress
0:13:40 board init()
0:15:30 unaligned access
0:17:30 What model of Pi will this run on? And will it be ARM32 or 64?
0:19:10 if you run CP on metal RPI4, is there the need for 32 bits?
0:21:15 local setup on desk
0:22:30 OSH Park Pi Development v1 project to eliminate all the wires above
0:25:00 https://github.com/chickadee-tech/pi-developer
0:25:45 catch the exceptions in boot.s
0:27:40 load VBAR_EL1 with virtual vector table address
0:29:00 arm stub switches from EL3? to EL2
0:29:40 4-way split terminal tinyusb, serial, gdb
0:32:22 cortex-a.py (in gdb)
0:32:47 ARM Cortex-A Programmers Guide for ARMv8-A pdf (MMU overview)
0:34:15 TTBR0_EL0 (EL2)
0:35:10 Arm architecture reference DDIO487G_b_armv8_arm.pdf
0:35:51 ESR_EL2 register
0:38:42 cortex-a.py - decode exception code
0:40:15 Python pattern matching in python 3.10 (match switch)
0:41:45 What other information can we extract from the exception
0:42:25 FAR ( fault address register? ) / extend the decoding
0:50:45 ashw.io/blog/arm64-pgtable-tool - and youtube video
0:54:00 decoding virtual address ( from BruceS )
0:56:20 pi4 address map from bcm2711-peripherals(1).pdf
0:58:00 setup_mmu_flat_map() in mmu.c
1:00:10 Level 1 access flag fault
1:02:00 Translation fault level 1
1:03:30 access flag fault level 1
1:06:20 Long-descriptor level 1 and level 2 descriptor formats
1:10:00 github ashwio/arm64-pgtable-tool python code
1:14:10 “The Access flag” , ok, add the MM_DESCRIPTOR_ACCESS_FLAG
1:17:10 got a little further - maybe try it out on the hardware (instead of qemu)
1:22:30 decode the Data Abort further - translation fault level 1
1:27:50 we have uart output!
1:29:00 summary - flags in translation table needed to get access flag set to 1
1:39:00 dcd_init()
1:39:58 What side projects are you looking forward to diving deeper into in the coming weeks?
1:42:00 Did you ever ask adafruit to manufacture your old board?
1:44:04 UPS truck arrived - (new iPhone? ) Be right back
1:45:58 back - unboxing
1:51:45 recap - MMU / fixed table lookup / added access flag / used python to decode information about access fault / uart output
1:53:00 next steps
1:53:54 wrap up
1:55:50 - see you in two week
Visit the Adafruit shop online - http://www.adafruit.com
-----------------------------------------
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-----------------------------------------
...more
View all episodesView all episodes
Download on the App Store

Adafruit IndustriesBy Adafruit Industries

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

13 ratings


More shows like Adafruit Industries

View all
3D Printing Projects by Adafruit Industries

3D Printing Projects

11 Listeners

Raspberry Pi by Adafruit Industries

Raspberry Pi

23 Listeners

Ask an Engineer by Adafruit Industries

Ask an Engineer

2 Listeners

Collin's Lab by Adafruit Industries

Collin's Lab

3 Listeners

New Products by Adafruit Industries

New Products

3 Listeners

Show and Tell by Adafruit Industries

Show and Tell

0 Listeners

3D Hangouts by Adafruit Industries

3D Hangouts

1 Listeners

Circuit Playground by Adafruit Industries

Circuit Playground

0 Listeners