py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
Capability is #if'd off by default. Thanks to Dave Hylands for the patch.