In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Cafe OS"

From WiiUBrew
Jump to navigation Jump to search
(→‎Kernel: Explain the role of the kernel better)
(→‎Virtual Memory Map: The 0x0C000000 block appears to be a new, SMP-ized Processor Interface for the Espresso)
Line 85: Line 85:
 
*0xf6000000 - 0xf6800000 '''Unknown'''
 
*0xf6000000 - 0xf6800000 '''Unknown'''
 
*0xf8000000 - 0xfb000000 '''Read-only shared data (system fonts mostly)'''
 
*0xf8000000 - 0xfb000000 '''Read-only shared data (system fonts mostly)'''
*0xfc000000 - 0xfc0c0000 '''{{hw|Espresso IRQ Controller}}'''
+
*0xfc000000 - 0xfc0c0000 '''{{hw|Processor Interface}}'''
 
*0xfc200000 - 0xfc280000 '''GX2 TCL registers'''
 
*0xfc200000 - 0xfc280000 '''GX2 TCL registers'''
 
*0xfc280000 - 0xfc2a0000 '''DSP registers'''
 
*0xfc280000 - 0xfc2a0000 '''DSP registers'''

Revision as of 03:03, 17 August 2015

Cafe OS is the operating system running on the PowerPC in Wii U mode. It consists of the Cafe OS kernel, the executable loader, and system libraries. Unlike on the Wii, where games ran with full hardware access, Wii U applications run under the supervision of the kernel, isolating them from each other. All applications are modified ELFs, as are the libraries themselves, and applications dynamically link with them to gain access to OS services. Cafe OS also contains a few system processes, like the home menu and error handler.

Architecture

Kernel

The kernel runs in supervisor mode on the PowerPC, and performs the basic tasks of a microkernel. It is responsible for process isolation, memory management, and interrupt dispatching, as well as communication with IOSU. Cafe OS applications run as user mode processes, with separate address spaces and W^X memory protection. The kernel provides basic syscalls for running processes.

Loader

The loader is responsible for loading RPL formatted libraries and executables into memory. It is a standard ELF executable named loader.elf. It includes a statically linked copy of zlib, probably for decompressing sections of RPL files.

Libraries

Cafe OS applications dynamically link with system libraries to get access to OS services. These OS services include memory management, graphics, audio, and controller input. All libraries are RPL files, a modification of the standard ELF format with compressed sections and more Windows-like dynamic linking. The main system libraries are listed below, with some having their own pages of documentation:

Virtual Memory Map

  • 0x01000000 - 0x01?????? Loader and system libraries
  • 0x10000000 - 0x10?????? User-mode OS globals
  • 0xe0000000 - 0xe4000000 Some sort of hardware communication area
  • 0xf4000000 - 0xf6000000 MEM1
  • 0xf6000000 - 0xf6800000 Unknown
  • 0xf8000000 - 0xfb000000 Read-only shared data (system fonts mostly)
  • 0xfc000000 - 0xfc0c0000 Processor Interface
  • 0xfc200000 - 0xfc280000 GX2 TCL registers
  • 0xfc280000 - 0xfc2a0000 DSP registers
  • 0xfc2a0000 - 0xfc2c0000 GX2 FIFO space? (Radeon PKT3 sent here)
  • 0xfc320000 - 0xfd000000 Espresso OTP (and other stuff?)
  • 0xfd000000 - 0xfd?????? Latte registers
  • 0xfd040250 - 0xfd046c00 I2C registers
  • 0xfd046e00 - 0xfd060520 AI registers?
  • 0xff200000 - 0xff280000 Kernel heap
  • 0xffe00000 - 0xfff20000 Kernel ancast image
  • 0xffffffe0(?) - 0xfffffffc(?) Per-thread data (e.g. pointer to thread descriptor and thread queue)