TLB hit 💥

A podcast about systems & compilers

🐦 @TLBhit

🎙 RSS

🍎 Apple podcast

Episode 1: *(char*)0 = 0!

Intro [00:00]

First Errata! [00:37]

The Program [01:15]

What about its C++y cousin? [02:10]

int main() {
  *reinterpret_cast<char*>(nullptr) = 0;
}

Why do we have both bit_cast and reinterpret_cast? [03:10]

Getting back to the program! [04:55]

Does the compiler even let you compile this program? [06:45]

What does undefined behavior mean?

Memory mapped register pattern [09:55]

Zero is usually not mapped in [10:35]

What does the assembly really look like? [11:15]

to people around volatile, but!

Traps and faults and aborts, oh my! [14:30]

Even more bespoke circumstances! [16:45]

Back to userspace virtual memory [17:45]

Lots of memory access instructions! [18:25]

Virtual vs physical addresses as cache keys [19:45]

Zoom back out to the big picture [22:50]

How many entries? [25:50]

Page Table Walkers As Little Accelerators [27:00]

Once physical translation is resolved [27:45]

What about on TLB miss? [28:25]

Code and data [29:30]

IOMMUs: virtualized memory for devices [32:25]

Back to initial example [33:00]

So what is a segmentation fault? [33:45]

Running in debuggers [36:38]

JS engines / WebAssembly [37:35]

Rough "Numbers to Know" [42:30]

Until Next Time [45:00]

Things we didn't get to!

Chisel](https://github.com/riscv-boom/riscv-boom/blob/1cb1596224c5681b839b8b115c1fbf6d802cc512/src/main/scala/lsu/tlb.scala) and a page table walker!