blob: f637a4019643800d02593af3a1ae6a4c90bf26e3 [file] [log] [blame]
Andrew Walbrandd74b902022-04-14 16:12:50 +00001// Copyright 2022, The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Basic functionality for bare-metal binaries to run in a VM under crosvm.
16
17#![no_std]
Andrew Walbranc06e7342023-07-05 14:00:51 +000018#![deny(unsafe_op_in_unsafe_fn)]
19#![deny(clippy::undocumented_unsafe_blocks)]
Andrew Walbrandd74b902022-04-14 16:12:50 +000020
Alice Wangf47b2342023-06-02 11:51:57 +000021extern crate alloc;
22
Alice Wang81399f52023-05-26 14:23:43 +000023pub mod arch;
Pierre-Clément Tosi6a42fdc2022-12-08 13:51:05 +000024mod bionic;
Andrew Walbrandd74b902022-04-14 16:12:50 +000025pub mod console;
Andrew Walbranb996b4a2022-04-22 15:15:41 +000026mod entry;
Alice Wanga9fe1fb2023-07-04 09:10:35 +000027pub mod exceptions;
Alice Wanga3971062023-06-13 11:48:53 +000028pub mod fdt;
Pierre-Clément Tosic332fae2023-06-22 11:37:12 +000029pub mod heap;
Pierre-Clément Tosi3e3d7332023-06-22 10:44:29 +000030mod hvc;
Pierre-Clément Tosi9a658f72022-10-10 15:18:54 +010031pub mod layout;
32mod linker;
David Brazdil8b557772022-07-05 12:22:20 +010033pub mod logger;
Alice Wang4dd20932023-05-26 13:47:16 +000034pub mod memory;
Andrew Walbrandd74b902022-04-14 16:12:50 +000035pub mod power;
Pierre-Clément Tosi3e3d7332023-06-22 10:44:29 +000036pub mod rand;
Andrew Walbrandd74b902022-04-14 16:12:50 +000037pub mod uart;
Alice Wangeacb7382023-06-05 12:53:54 +000038pub mod util;
Alice Wangeade1672023-06-08 14:56:20 +000039pub mod virtio;
Andrew Walbrandd74b902022-04-14 16:12:50 +000040
41use core::panic::PanicInfo;
42use power::reboot;
43
44#[panic_handler]
45fn panic(info: &PanicInfo) -> ! {
46 eprintln!("{}", info);
47 reboot()
48}