Skip to content

Commit

Permalink
chore: Rename HermitCore{,-rs} to Hermit in code
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Sep 21, 2023
1 parent 9afcfb5 commit 8368c6c
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/arch/aarch64/kernel/systemtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn init() {

let boot_time =
OffsetDateTime::from_unix_timestamp(rtc_read(RTC_DR) as i64).unwrap();
info!("HermitCore-rs booted on {boot_time}");
info!("Hermit booted on {boot_time}");

let micros = u64::try_from(boot_time.unix_timestamp_nanos() / 1000).unwrap();
BOOT_TIME.set(micros).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/kernel/acpi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ pub fn poweroff() -> Result<Infallible, ()> {
pub fn init() {
// Detect the RSDP and get a pointer to either the XSDT (64-bit) or RSDT (32-bit), whichever is available.
// Both are called RSDT in the following.
let rsdp = detect_acpi().expect("HermitCore requires an ACPI-compliant system");
let rsdp = detect_acpi().expect("Hermit requires an ACPI-compliant system");
let rsdt_physical_address = if rsdp.revision >= 2 {
PhysAddr(rsdp.xsdt_physical_address)
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/kernel/apic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ fn calibrate_timer() {
// The APIC Timer is used to provide a one-shot interrupt for the tickless timer
// implemented through processor::get_timer_ticks.
// Therefore determine a counter value for 1 microsecond, which is the resolution
// used throughout all of HermitCore. Wait 30ms for accuracy.
// used throughout all of Hermit. Wait 30ms for accuracy.
let microseconds = 30_000;

// Be sure that all interrupts for calibration accuracy and initialize the counter are disabled.
Expand Down
4 changes: 2 additions & 2 deletions src/arch/x86_64/kernel/boot.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; This is the entry point for the application processors.
; It is loaded at 0x8000 by HermitCore and filled with parameters.
; It is loaded at 0x8000 by Hermit and filled with parameters.
; It does the switch from Real Mode -> Protected Mode -> Long Mode,
; sets up CR3 for this CPU, and then calls into _start.
;
; In contrast to this self-contained entry point, _start is linked
; to the rest of HermitCore and thus has access to all exported symbols
; to the rest of Hermit and thus has access to all exported symbols
; (like the actual Rust entry point).


Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/kernel/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl ConfigRegionAccess for PciConfigRegion {
pub(crate) fn init() {
debug!("Scanning PCI Busses 0 to {}", PCI_MAX_BUS_NUMBER - 1);

// HermitCore only uses PCI for network devices.
// Hermit only uses PCI for network devices.
// Therefore, multifunction devices as well as additional bridges are not scanned.
// We also limit scanning to the first 32 buses.
let pci_config = PciConfigRegion::new();
Expand Down
6 changes: 3 additions & 3 deletions src/arch/x86_64/kernel/systemtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,21 +180,21 @@ pub fn init() {
let boot_time = match boot_info().platform_info {
PlatformInfo::Multiboot { .. } => {
// Get the current time in microseconds since the epoch (1970-01-01) from the x86 RTC.
// Subtract the timer ticks to get the actual time when HermitCore-rs was booted.
// Subtract the timer ticks to get the actual time when Hermit was booted.
let current_time = without_interrupts(|| Rtc::new().get_microseconds_since_epoch());
let boot_time = current_time - processor::get_timer_ticks();
OffsetDateTime::from_unix_timestamp_nanos(boot_time as i128 * 1000).unwrap()
}
PlatformInfo::LinuxBootParams { .. } => {
// Get the current time in microseconds since the epoch (1970-01-01) from the x86 RTC.
// Subtract the timer ticks to get the actual time when HermitCore-rs was booted.
// Subtract the timer ticks to get the actual time when Hermit was booted.
let current_time = without_interrupts(|| Rtc::new().get_microseconds_since_epoch());
let boot_time = current_time - processor::get_timer_ticks();
OffsetDateTime::from_unix_timestamp_nanos(boot_time as i128 * 1000).unwrap()
}
PlatformInfo::Uhyve { boot_time, .. } => boot_time,
};
info!("HermitCore-rs booted on {boot_time}");
info!("Hermit booted on {boot_time}");

let micros = u64::try_from(boot_time.unix_timestamp_nanos() / 1000).unwrap();
BOOT_TIME.set(micros).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::arch;
pub struct Console(());

/// A collection of methods that are required to format
/// a message to HermitCore's console.
/// a message to Hermit's console.
impl fmt::Write for Console {
/// Print a string of characters.
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Cli {
args: Vec<String>,
}

/// Whether HermitCore is running under the "uhyve" hypervisor.
/// Whether Hermit is running under the "uhyve" hypervisor.
pub fn is_uhyve() -> bool {
matches!(boot_info().platform_info, PlatformInfo::Uhyve { .. })
}
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! First version is derived and adapted for HermitCore from
//! First version is derived and adapted for Hermit from
//! Philipp Oppermann's excellent series of blog posts (<http://blog.phil-opp.com/>)
//! and Eric Kidd's toy OS (<https://github.com/emk/toyos-rs>).
Expand Down Expand Up @@ -258,9 +258,9 @@ extern "C" fn initd(_arg: usize) {
init_rtl8139_netif(processor::get_frequency() as u32);
}

info!("HermitCore is running on common system!");
info!("Hermit is running on common system!");
} else {
info!("HermitCore is running on uhyve!");
info!("Hermit is running on uhyve!");
}

// Initialize Drivers
Expand Down Expand Up @@ -299,7 +299,7 @@ fn synch_all_cores() {
}
}

/// Entry Point of HermitCore for the Boot Processor
/// Entry Point of Hermit for the Boot Processor
#[cfg(target_os = "none")]
fn boot_processor_main() -> ! {
// Initialize the kernel and hardware.
Expand All @@ -308,7 +308,7 @@ fn boot_processor_main() -> ! {
logging::init();
}

info!("Welcome to HermitCore-rs {}", env!("CARGO_PKG_VERSION"));
info!("Welcome to Hermit {}", env!("CARGO_PKG_VERSION"));
info!("Kernel starts at {:p}", env::get_base_address());

extern "C" {
Expand Down Expand Up @@ -349,7 +349,7 @@ fn boot_processor_main() -> ! {
PerCoreScheduler::run();
}

/// Entry Point of HermitCore for an Application Processor
/// Entry Point of Hermit for an Application Processor
#[cfg(all(target_os = "none", feature = "smp"))]
fn application_processor_main() -> ! {
arch::application_processor_init();
Expand Down
2 changes: 1 addition & 1 deletion src/mm/allocator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Implementation of the HermitCore Allocator for dynamically allocating heap memory
//! Implementation of the Hermit Allocator for dynamically allocating heap memory
//! in the kernel.
use core::alloc::{GlobalAlloc, Layout};
Expand Down
4 changes: 2 additions & 2 deletions src/mm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub(crate) fn init() {

#[cfg(feature = "newlib")]
{
info!("An application with a C-based runtime is running on top of HermitCore!");
info!("An application with a C-based runtime is running on top of Hermit!");
let kernel_heap_size = 10 * LargePageSize::SIZE as usize;

unsafe {
Expand All @@ -133,7 +133,7 @@ pub(crate) fn init() {

#[cfg(not(feature = "newlib"))]
{
info!("A pure Rust application is running on top of HermitCore!");
info!("A pure Rust application is running on top of Hermit!");

// At first, we map only a small part into the heap.
// Afterwards, we already use the heap and map the rest into
Expand Down
2 changes: 1 addition & 1 deletion src/syscalls/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern "C" fn __sys_clock_getres(clock_id: u64, res: *mut timespec) -> i32 {

match clock_id {
CLOCK_REALTIME | CLOCK_PROCESS_CPUTIME_ID | CLOCK_THREAD_CPUTIME_ID | CLOCK_MONOTONIC => {
// All clocks in HermitCore have 1 microsecond resolution.
// All clocks in Hermit have 1 microsecond resolution.
microseconds_to_timespec(1, result);
0
}
Expand Down

0 comments on commit 8368c6c

Please sign in to comment.