lib.rs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #![no_std]
  2. #![feature(allocator_api)]
  3. #![feature(doc_notable_trait)]
  4. #![feature(impl_trait_in_assoc_type)]
  5. pub(crate) mod arch;
  6. pub mod bootstrap;
  7. pub mod context;
  8. pub mod mm;
  9. pub mod trap;
  10. pub mod fence {
  11. pub use crate::arch::fence::{memory_barrier, read_memory_barrier, write_memory_barrier};
  12. }
  13. pub mod fpu {
  14. pub use crate::arch::fpu::FpuState;
  15. }
  16. pub mod processor {
  17. pub use crate::arch::cpu::{halt, UserTLS, CPU, CPU_COUNT};
  18. }
  19. /// Re-export the arch module for use in other crates
  20. ///
  21. /// Use this to access architecture-specific functionality in cfg wrapped blocks.
  22. ///
  23. /// # Example
  24. /// ``` no_run
  25. /// #[cfg(target_arch = "x86_64")]
  26. /// {
  27. /// use eonix_hal::arch_exported::io::Port8;
  28. ///
  29. /// // We know that there will be a `Port8` type available for x86_64.
  30. /// let port = Port8::new(0x3f8);
  31. /// port.write(0x01);
  32. /// }
  33. /// ```
  34. pub mod arch_exported {
  35. pub use crate::arch::*;
  36. }
  37. pub use eonix_hal_macros::{ap_main, default_trap_handler, main};
  38. pub use eonix_hal_traits as traits;