blob: a1b5df85549886f429d8eed6a9504d4eb0940e5f [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.device.manager;
using zx;
/// Provides administration services for the device manager service and the device tree it controls.
@discoverable
closed protocol Administrator {
// TODO(https://fxbug.dev/42147562): Remove this API.
/// This is a temporary API until DriverManager can ensure that base drivers
/// will be shut down automatically before fshost exits. This will happen
/// once drivers-as-components is implemented.
/// In the meantime, this API should only be called by fshost, and it must
/// be called before fshost exits. This function iterates over the devices
/// and suspends any device whose driver lives in storage. This API must be
/// called by fshost before it shuts down. Otherwise the devices that live
/// in storage may page fault as it access memory that should be provided by
/// the exited fshost. This function will not return until the devices are
/// suspended. If there are no devices that live in storage, this function
/// will immediatetly return.
strict UnregisterSystemStorageForShutdown() -> (struct {
status zx.Status;
});
/// Tell DriverManager to go through the suspend process, but don't exit
/// afterwards. This is used in tests to check that suspend works correctly.
strict SuspendWithoutExit();
};