blob: 20619ce4f51bc1ef86c2964a364b1a998fbf5947 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#ifndef ZIRCON_KERNEL_INCLUDE_DEV_INIT_H_
#define ZIRCON_KERNEL_INCLUDE_DEV_INIT_H_
#include <lib/uart/all.h>
// Forward-declared; fully declared in <phys/handoff.h>
struct PhysHandoff;
// Forward-declared; fully declared in <phys/arch/arch-handoff.h>.
struct ArchPhysHandoff;
// These routines initialize the kernel's drivers, as a function of the
// configurations described in the physboot hand-off, at two stages:
// * "early" refers to immediately after early platform initialization, before
// the VM and heap are set up;
// * "late" refers to immediately after the main platform initialization, once
// the VM, the heap, threading, and general kernel facilities are available.
//
// Defined in //zircon/kernel/dev/init.cc.
void DriverHandoffEarly(const PhysHandoff& handoff);
void DriverHandoffLate(const PhysHandoff& handoff);
// Uart initialization routines.
void UartDriverHandoffEarly(const uart::all::Driver& serial);
void UartDriverHandoffLate(const uart::all::Driver& serial);
// Platform-specific subroutines of the above functions, respectively.
//
// Defined in //zircon/kernel/platform/*/dev-init.cc.
void PlatformDriverHandoffEarly(const ArchPhysHandoff& arch_handoff);
void PlatformDriverHandoffLate(const ArchPhysHandoff& arch_handoff);
#endif // ZIRCON_KERNEL_INCLUDE_DEV_INIT_H_