You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 03_exception_restore_sanity.rs
    path of file: ./repos/rust-raspberrypi-OS-tutorials/14_virtual_mem_part2_mmio_remap/kernel/tests
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: MIT OR Apache-2.0
//
// Copyright (c) 2022-2023 Andre Richter <andre.o.richter@gmail.com>

//! A simple sanity test to see if exception restore code works.

#![feature(format_args_nl)]
#![no_main]
#![no_std]

/// Console tests should time out on the I/O harness in case of panic.
mod panic_wait_forever;

use core::arch::asm;
use libkernel::{bsp, cpu, exception, info, memo
    
unsafe fn kernel_init() -> ! {
    exception::handling_init();

    // This line will be printed as the test header.
    println!("Testing exception restore");

    let phys_kernel_tables_base_addr = match memory::mmu::kernel_map_binary() {
        Err(string) => {
            info!("Error mapping kernel binary: {}", string);
            cpu::qemu_exit_failure()
        }
        Ok(addr) => addr,
    };

    if let Err(e) = memory::mmu::enable_mmu_and_caching(phys_kernel_tables_base_addr) {
        info!("Enabling MMU failed: {}", e);
        cpu::qemu_exit_failure()
    }

    memory::mmu::post_enable_init();
    bsp::driver::qemu_bring_up_console();

    info!("Making a dummy system call");

    // Calling this inside a function indirectly tests if the link register is restored properly.
    nested_system_call();

    info!("Back from system call!");

    // The QEMU process running this test will be closed by the I/O test harness.
    cpu::wait_forever();
}