~/talk

Can you write an OS Kernel in Go?

Talkat Golang UK 2017 · 2017-08-16..08-18· [go]
links:none on file
slides:none on file

Argues that Go can run at ring‑0 and demonstrates a working 32-bit x86 ring‑0 HelloWorld and running demos inside QEMU/VirtualBox. Uses cross‑compilation, GRUB bootloader, GNU ld linker script and NASM assembly to set stack, GS TLS and enable SSE, then runs Go code that writes directly to the 80×25 text framebuffer. Uses objcopy to globalize symbols, preserves go build artifacts with -x and -work, and shows a ray‑marcher (93 LOC) that runs without triggering the Go allocator; maps/interfaces/goroutines stay unavailable until the allocator is bootstrapped.

AI-written summary · about

  1. 0:00Intro
  2. 0:38A little bit of theory ring-based security
  3. 1:40Running Go applications at Ring-o
  4. 6:36Let's build something simple
  5. 8:09How do we load our kernel to memory?
  6. 9:57How does a linker script look like?
  7. 11:05The kernel is loaded to memory, what's next?
  8. 13:00Accessing memory
  9. 14:01What happens when a Go function runs?
  10. 16:00Slack growth check: behind the scenes
  11. 18:51Bootstrap code: allocate stack and initializeg
  12. 19:59Overriding the Go build process
  13. 20:59Let's automate the work!
  14. 23:37Linking the final kernel image
  15. 24:49Screen output without an OS
  16. 26:22Before we begin coding: limitations
  17. 33:15How to overcome these limitations
  18. 37:00Final remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.