| // Copyright 2024 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.boot; |
| |
| using zx; |
| |
| /// Refers to a VMO that has been created from the big bootfs VMO. |
| type BootfsFileVmo = resource struct { |
| /// Offset of the VMO in the bootfs VMO. |
| offset uint32; |
| /// VMO with the contents from the decoded file. |
| contents zx.Handle:<VMO>; |
| }; |
| |
| /// Protocol for communication between `userboot` and the process booted by userboot. |
| /// |
| /// The userboot process will act as a client, pipelining requests containing information and/or handles that might |
| /// be useful for the booted process. The booted process, or whoever processes the server endpoint of this protocol, |
| /// will then process the pipelined requests from userboot. |
| /// |
| /// TODO(https://fxbug.dev/354275371): Move handles not participating in the bootstrap process to this protocol. |
| closed protocol Userboot { |
| |
| /// Posts a set of `BootfsFileVmo` that were used for launching the `userboot.next=` program and are no longer |
| /// available in the big BootfsVmo. |
| /// |
| /// Messages will only become available after the `Userboot` protocol client end (userboot's handle) |
| /// has been closed. |
| strict PostBootfsFiles(resource struct { |
| files vector<BootfsFileVmo>:zx.CHANNEL_MAX_MSG_HANDLES; |
| }); |
| |
| /// Posts `svc_stash` server endpoint. For more information refer to `fuchsia.boot.SvcStash`. |
| strict PostStashSvc(resource struct { |
| stash_svc_endpoint server_end:SvcStash; |
| }); |
| }; |