Iros
 
Loading...
Searching...
No Matches
iris Namespace Reference

Namespaces

namespace  acpi
 
namespace  arch
 
namespace  cpuid
 See this link for a list of CPU id queries and bits.
 
namespace  detail
 
namespace  initrd
 
namespace  mm
 
namespace  test
 
namespace  x86
 

Classes

struct  DebugFile
 
struct  DirectoryRecord
 
class  DirentIterator
 
class  DisableDestruction
 
struct  FileHACKRawDataFunction
 
struct  FileMetadataFunction
 
class  FileTable
 
struct  FileTruncateFunction
 
struct  GlobalIrqNumberTag
 
struct  GlobalState
 
struct  InitrdInodeImpl
 
class  Inode
 
struct  InodeCreateNodeFunction
 
class  InodeFile
 
struct  InodeHACKRawDataFunction
 
struct  InodeLookupFunction
 
struct  InodeMetadataFunction
 
struct  InodeReadDirectoryFunction
 
struct  InodeReadFunction
 
struct  InodeTruncateFunction
 
class  InterruptDisabler
 
class  InterruptibleSpinlock
 
struct  IpiMessage
 
struct  IrqContext
 
struct  IrqLineRange
 
struct  IrqLineTag
 
class  LockedTaskNamespace
 
struct  Metadata
 
class  Mount
 
class  ObjectPool
 A fixed-capacity object pool. More...
 
class  PreemptionDisabler
 
class  Processor
 
struct  ProcessorInfo
 
struct  ReadDirectoryFunction
 
struct  ReadFileFunction
 
class  Scheduler
 
struct  SeekFileFunction
 
class  Spinlock
 
class  SuperBlock
 
class  Task
 
class  TaskArguments
 
struct  TaskFinalizationRequest
 
struct  TaskIdTag
 
class  TaskNamespace
 
class  TaskStatus
 
struct  TimerCalibrateFunction
 
struct  TimerCapabilitiesFunction
 
struct  TimerName
 
struct  TimerResolutionFunction
 
struct  TimerSetIntervalFunction
 
struct  TimerSetSingleShotFunction
 
struct  TmpfsInodeImpl
 
class  TNode
 
class  UserspaceAccessEnabler
 
class  UserspaceBuffer
 
class  UserspacePtr
 
class  WaitQueue
 
struct  WriteFileFunction
 

Typedefs

template<typename T>
using Expected = di::vocab::Expected<T, di::platform::GenericCode>
 
using Encoding = di::container::string::Utf8Encoding
 
using TaskId = di::StrongInt<TaskIdTag>
 
using FileInterface
 
using File = di::AnyShared<FileInterface>
 
using InodeInterface
 
using InodeImpl = di::Any<InodeInterface>
 
using IrqHandler = di::Function<IrqStatus(IrqContext&)>
 
using GlobalIrqNumber = di::StrongInt<GlobalIrqNumberTag>
 
using IrqLine = di::StrongInt<IrqLineTag>
 
using IrqControllerInterface
 
using IrqController = di::AnyInline<IrqControllerInterface>
 
using TimerResolution = di::Picoseconds
 
using TimerInterface
 
using Timer = di::Any<TimerInterface>
 

Enumerations

enum class  ProcessorFeatures {
  None = 0 , Smep = (1 << 0) , Smap = (1 << 1) , Sse = (1 << 2) ,
  Sse2 = (1 << 3) , Fxsr = (1 << 4) , Mmx = (1 << 5) , Sse3 = (1 << 6) ,
  Ssse3 = (1 << 7) , Sse4_1 = (1 << 8) , Sse4_2 = (1 << 9) , Xsave = (1 << 10) ,
  Avx = (1 << 11) , Avx2 = (1 << 12) , Avx512 = (1 << 13) , FsGsBase = (1 << 14) ,
  Apic = (1 << 15) , X2Apic = (1 << 16) , GibPages = (1 << 17)
}
 
enum class  PathLookupFlags { None = 0 , Create = (1 << 0) }
 
enum class  IrqStatus { Handled , Unknown }
 
enum class  ShutdownStatus { Error , Intended , DoubleFault }
 
enum class  TimerCapabilities { SingleShot = 1 << 0 , Periodic = 1 << 1 , PerCpu = 1 << 2 , NeedsCalibration = 1 << 3 }
 
enum class  Error : unsigned long {
  Success = 0 , AddressFamilyNotSupported = 1 , AddressInUse = 2 , AddressNotAvailable = 3 ,
  AlreadyConnected = 4 , ArgumentListTooLong = 5 , ArgumentOutOfDomain = 6 , BadAddress = 7 ,
  BadFileDescriptor = 8 , BadMessage = 9 , BrokenPipe = 10 , ConnectionAborted = 11 ,
  ConnectionAlreadyInProgress = 12 , ConnectionRefused = 13 , ConnectionReset = 14 , CrossDeviceLink = 15 ,
  DestinationAddressRequired = 16 , DeviceOrResourceBusy = 17 , DirectoryNotEmpty = 18 , ExecutableFormatError = 19 ,
  FileExists = 20 , FileTooLarge = 21 , FilenameTooLong = 22 , FunctionNotSupported = 23 ,
  HostUnreachable = 24 , IdentifierRemoved = 25 , IllegalByteSequence = 26 , InappropriateIoControlOperation = 27 ,
  Interrupted = 28 , InvalidArgument = 29 , InvalidSeek = 30 , IoError = 31 ,
  IsADirectory = 32 , MessageSize = 33 , NetworkDown = 34 , NetworkReset = 35 ,
  NetworkUnreachable = 36 , NoBufferSpace = 37 , NoChildProcess = 38 , NoLink = 39 ,
  NoLockAvailable = 40 , NoMessageAvailable = 41 , NoMessage = 42 , NoProtocolOption = 43 ,
  NoSpaceOnDevice = 44 , NoStreamResources = 45 , NoSuchDeviceOrAddress = 46 , NoSuchDevice = 47 ,
  NoSuchFileOrDirectory = 48 , NoSuchProcess = 49 , NotADirectory = 50 , NotASocket = 51 ,
  NotAStream = 52 , NotConnected = 53 , NotEnoughMemory = 54 , NotSupported = 55 ,
  OperationCanceled = 56 , OperationInProgress = 57 , OperationNotPermitted = 58 , OperationNotSupported = NotSupported ,
  OperationWouldBlock = 59 , OwnerDead = 60 , PermissionDenied = 61 , ProtocolError = 62 ,
  ProtocolNotSupported = 63 , ReadOnlyFileSystem = 64 , ResourceDeadlockWouldOccur = 65 , ResourceUnavailableTryAgain = OperationWouldBlock ,
  ResultOutOfRange = 66 , StateNotRecoverable = 67 , StreamTimeout = 68 , TextFileBusy = 69 ,
  TimedOut = 70 , TooManyFilesOpenInSystem = 71 , TooManyFilesOpen = 72 , TooManyLinks = 73 ,
  TooManySymbolicLinkLevels = 74 , ValueTooLarge = 75 , WrongProtocolType = 76
}
 
enum class  MetadataType : u8 { Unknown = 0 , Regular = 1 , Directory = 2 }
 
enum class  OpenMode : u32 { None = 0 , Create = (1 << 0) , Mask = Create }
 
enum class  SystemCall {
  debug_print = 0 , shutdown = 1 , exit_task = 2 , create_task = 3 ,
  load_executable = 4 , start_task = 5 , allocate_memory = 6 , open = 7 ,
  read = 8 , write = 9 , close = 10 , start_task_and_block = 11 ,
  set_userspace_thread_pointer = 12 , set_userspace_stack_pointer = 13 , set_userspace_instruction_pointer = 14 , set_userspace_argument1 = 15 ,
  lseek = 16 , set_task_arguments = 17 , path_metadata = 18 , read_directory = 19 ,
  truncate = 20 , create_node = 21 , write_audio = 22
}
 

Functions

void log_output_character (c32 value)
 
auto copy_to_user (di::Span< byte const > kernel_data, byte *userspace_ptr) -> Expected< void >
 
auto copy_from_user (di::Span< byte const > userspace_data, byte *kernel_ptr) -> Expected< void >
 
auto validate_user_region (mm::VirtualAddress userspace_address, usize count, usize size) -> Expected< void >
 
void setup_current_processor_access ()
 Setups access to the current processor.
 
void set_current_processor (Processor &processor)
 Sets the current processor address.
 
auto irq_number_for_legacy_isa_interrupt_number (IrqLine irq_line) -> Expected< GlobalIrqNumber >
 
auto irq_controller_for_interrupt_number (GlobalIrqNumber irq_number) -> Expected< di::Synchronized< IrqController > & >
 
void hard_shutdown (ShutdownStatus status)
 
auto detect_processor_info () -> ProcessorInfo
 
void log_output_byte (di::Byte byte)
 
void iris_main ()
 
auto global_state_in_boot () -> GlobalState &
 
void log_prologue (detail::DebugFormatContext &context, di::SourceLocation location)
 
void schedule_task (Task &)
 Schedule a task on any scheduler.
 
auto create_kernel_task (TaskNamespace &task_namespace, void(*entry)()) -> Expected< di::Arc< Task > >
 
auto create_user_task (TaskNamespace &task_namespace, di::Arc< TNode > root_tnode, di::Arc< TNode > cwd_tnode, FileTable file_table, di::Arc< mm::AddressSpace > address_space) -> Expected< di::Arc< Task > >
 
auto load_executable (Task &task, di::PathView path) -> Expected< void >
 
auto tag_invoke (di::Tag< read_file >, DebugFile &, UserspaceBuffer< byte > buffer) -> di::AnySenderOf< usize >
 
auto tag_invoke (di::Tag< write_file >, DebugFile &self, UserspaceBuffer< byte const > data) -> di::AnySenderOf< usize >
 
auto init_initrd () -> Expected< void >
 
auto tag_invoke (di::Tag< inode_read >, Inode &self, mm::BackingObject &backing_object, u64 page_number) -> di::AnySenderOf< mm::PhysicalAddress >
 
auto tag_invoke (di::Tag< inode_read_directory >, Inode &self, mm::BackingObject &backing_object, u64 &offset, UserspaceBuffer< byte > buffer) -> di::AnySenderOf< usize >
 
auto tag_invoke (di::Tag< inode_lookup >, Inode &self, di::Arc< TNode > parent, di::TransparentStringView name) -> di::AnySenderOf< di::Arc< TNode > >
 
auto tag_invoke (di::Tag< inode_metadata >, Inode &self) -> di::AnySenderOf< Metadata >
 
auto tag_invoke (di::Tag< inode_create_node >, Inode &self, di::Arc< TNode > parent, di::TransparentStringView name, MetadataType type) -> di::AnySenderOf< di::Arc< TNode > >
 
auto tag_invoke (di::Tag< inode_truncate >, Inode &self, u64 size) -> di::AnySenderOf<>
 
auto tag_invoke (di::Tag< inode_hack_raw_data >, Inode &self) -> di::AnySenderOf< di::Span< byte const > >
 
auto tag_invoke (di::Tag< read_file >, InodeFile &self, UserspaceBuffer< byte > buffer) -> di::AnySenderOf< usize >
 
auto tag_invoke (di::Tag< read_directory >, InodeFile &self, UserspaceBuffer< byte > buffer) -> di::AnySenderOf< usize >
 
auto tag_invoke (di::Tag< write_file >, InodeFile &self, UserspaceBuffer< byte const > buffer) -> di::AnySenderOf< usize >
 
auto tag_invoke (di::Tag< file_metadata >, InodeFile &self) -> di::AnySenderOf< Metadata >
 
auto tag_invoke (di::Tag< seek_file >, InodeFile &self, i64 offset, int whence) -> di::AnySenderOf< u64 >
 
auto tag_invoke (di::Tag< file_truncate >, InodeFile &self, u64 size) -> di::AnySenderOf< void >
 
auto tag_invoke (di::Tag< file_hack_raw_data >, InodeFile &self) -> di::AnySenderOf< di::Span< byte const > >
 
auto lookup_path (di::Arc< TNode > root, di::Arc< TNode > relative_to, di::PathView path, PathLookupFlags flags) -> di::AnySenderOf< di::Arc< TNode > >
 
auto create_node (di::Arc< TNode > root, di::Arc< TNode > relative_to, di::PathView path, MetadataType type) -> di::AnySenderOf< void >
 
auto open_path (di::Arc< TNode > root, di::Arc< TNode > relative_to, di::PathView path, OpenMode mode) -> di::AnySenderOf< File >
 
auto init_tmpfs () -> Expected< void >
 
auto register_external_irq_handler (IrqLine line, IrqHandler handler) -> Expected< usize >
 
auto register_exception_handler (GlobalIrqNumber irq, IrqHandler handler) -> Expected< void >
 
void unregister_external_irq_handler (IrqLine line, usize handler_id)
 
void generic_irq_handler (GlobalIrqNumber irq, iris::arch::TaskState &task_state, int error_code)
 Generic entry point called by assembly when an interrupt occurs.
 
void init_timer_assignments ()
 
auto scheduler_timer () -> di::Synchronized< Timer > &
 
auto calibration_timer () -> di::Synchronized< Timer > &
 
auto current_processor_unsafe () -> Processor &
 Get the current processor.
 
auto global_state () -> GlobalState const &
 
template<di::concepts::Invocable F>
auto with_interrupts_disabled (F &&function) -> decltype(auto)
 
template<di::concepts::Invocable F>
auto with_preemption_disabled (F &&function) -> decltype(auto)
 
template<typename... Args>
void print (di::format::FormatStringWithLocationImpl< Encoding, Args... > format, Args &&... args)
 
template<typename... Args>
void println (di::format::FormatStringWithLocationImpl< Encoding, Args... > format, Args &&... args)
 
auto current_processor ()
 
auto current_scheduler ()
 
auto do_syscall (Task &current_task, arch::TaskState &task_state) -> Expected< u64 >
 
template<di::concepts::Invocable F>
auto with_userspace_access (F &&function) -> decltype(auto)
 
template<typename T>
auto tag_invoke (di::Tag< di::util::deduce_create >, di::InPlaceTemplate< UserspaceBuffer >, T *, usize) -> UserspaceBuffer< T >
 
template<typename T>
auto tag_invoke (di::Tag< di::util::deduce_create >, di::InPlaceTemplate< UserspacePtr >, T *) -> UserspacePtr< T >
 

Variables

constexpr auto write_file = WriteFileFunction {}
 
constexpr auto read_file = ReadFileFunction {}
 
constexpr auto read_directory = ReadDirectoryFunction {}
 
constexpr auto file_metadata = FileMetadataFunction {}
 
constexpr auto seek_file = SeekFileFunction {}
 
constexpr auto file_truncate = FileTruncateFunction {}
 
constexpr auto file_hack_raw_data = FileHACKRawDataFunction {}
 
constexpr auto inode_read = InodeReadFunction {}
 
constexpr auto inode_read_directory = InodeReadDirectoryFunction {}
 
constexpr auto inode_lookup = InodeLookupFunction {}
 
constexpr auto inode_metadata = InodeMetadataFunction {}
 
constexpr auto inode_create_node = InodeCreateNodeFunction {}
 
constexpr auto inode_truncate = InodeTruncateFunction {}
 
constexpr auto inode_hack_raw_data = InodeHACKRawDataFunction {}
 
constexpr auto send_eoi = detail::SendEoiFunction {}
 
constexpr auto enable_irq_line = detail::EnableIrqLine {}
 
constexpr auto disable_irq_line = detail::DisableIrqLine {}
 
constexpr auto responsible_irq_line_range = detail::ResponsibleIrqLineRange {}
 
constexpr auto timer_name = TimerName {}
 
constexpr auto timer_capabilities = TimerCapabilitiesFunction {}
 
constexpr auto timer_resolution = TimerResolutionFunction {}
 
constexpr auto timer_calibrate = TimerCalibrateFunction {}
 
constexpr auto timer_set_single_shot = TimerSetSingleShotFunction {}
 
constexpr auto timer_set_interval = TimerSetIntervalFunction {}
 

Typedef Documentation

◆ Encoding

◆ Expected

◆ File

◆ FileInterface

◆ GlobalIrqNumber

◆ InodeImpl

◆ InodeInterface

◆ IrqController

◆ IrqControllerInterface

◆ IrqHandler

◆ IrqLine

◆ TaskId

◆ Timer

◆ TimerInterface

◆ TimerResolution

Enumeration Type Documentation

◆ Error

enum class iris::Error : unsigned long
strong
Enumerator
Success 
AddressFamilyNotSupported 
AddressInUse 
AddressNotAvailable 
AlreadyConnected 
ArgumentListTooLong 
ArgumentOutOfDomain 
BadAddress 
BadFileDescriptor 
BadMessage 
BrokenPipe 
ConnectionAborted 
ConnectionAlreadyInProgress 
ConnectionRefused 
ConnectionReset 
CrossDeviceLink 
DestinationAddressRequired 
DeviceOrResourceBusy 
DirectoryNotEmpty 
ExecutableFormatError 
FileExists 
FileTooLarge 
FilenameTooLong 
FunctionNotSupported 
HostUnreachable 
IdentifierRemoved 
IllegalByteSequence 
InappropriateIoControlOperation 
Interrupted 
InvalidArgument 
InvalidSeek 
IoError 
IsADirectory 
MessageSize 
NetworkDown 
NetworkReset 
NetworkUnreachable 
NoBufferSpace 
NoChildProcess 
NoLink 
NoLockAvailable 
NoMessageAvailable 
NoMessage 
NoProtocolOption 
NoSpaceOnDevice 
NoStreamResources 
NoSuchDeviceOrAddress 
NoSuchDevice 
NoSuchFileOrDirectory 
NoSuchProcess 
NotADirectory 
NotASocket 
NotAStream 
NotConnected 
NotEnoughMemory 
NotSupported 
OperationCanceled 
OperationInProgress 
OperationNotPermitted 
OperationNotSupported 
OperationWouldBlock 
OwnerDead 
PermissionDenied 
ProtocolError 
ProtocolNotSupported 
ReadOnlyFileSystem 
ResourceDeadlockWouldOccur 
ResourceUnavailableTryAgain 
ResultOutOfRange 
StateNotRecoverable 
StreamTimeout 
TextFileBusy 
TimedOut 
TooManyFilesOpenInSystem 
TooManyFilesOpen 
TooManyLinks 
TooManySymbolicLinkLevels 
ValueTooLarge 
WrongProtocolType 

◆ IrqStatus

enum class iris::IrqStatus
strong
Enumerator
Handled 
Unknown 

◆ MetadataType

enum class iris::MetadataType : u8
strong
Enumerator
Unknown 
Regular 
Directory 

◆ OpenMode

enum class iris::OpenMode : u32
strong
Enumerator
None 
Create 
Mask 

◆ PathLookupFlags

enum class iris::PathLookupFlags
strong
Enumerator
None 
Create 

◆ ProcessorFeatures

enum class iris::ProcessorFeatures
strong
Enumerator
None 
Smep 
Smap 
Sse 
Sse2 
Fxsr 
Mmx 
Sse3 
Ssse3 
Sse4_1 
Sse4_2 
Xsave 
Avx 
Avx2 
Avx512 
FsGsBase 
Apic 
X2Apic 
GibPages 

◆ ShutdownStatus

enum class iris::ShutdownStatus
strong
Enumerator
Error 
Intended 
DoubleFault 

◆ SystemCall

enum class iris::SystemCall
strong
Enumerator
debug_print 
shutdown 
exit_task 
create_task 
load_executable 
start_task 
allocate_memory 
open 
read 
write 
close 
start_task_and_block 
set_userspace_thread_pointer 
set_userspace_stack_pointer 
set_userspace_instruction_pointer 
set_userspace_argument1 
lseek 
set_task_arguments 
path_metadata 
read_directory 
truncate 
create_node 
write_audio 

◆ TimerCapabilities

enum class iris::TimerCapabilities
strong
Enumerator
SingleShot 
Periodic 
PerCpu 
NeedsCalibration 

Function Documentation

◆ calibration_timer()

auto iris::calibration_timer ( ) -> di::Synchronized< Timer > &

◆ copy_from_user()

auto iris::copy_from_user ( di::Span< byte const > userspace_data,
byte * kernel_ptr ) -> Expected< void >

◆ copy_to_user()

auto iris::copy_to_user ( di::Span< byte const > kernel_data,
byte * userspace_ptr ) -> Expected< void >

◆ create_kernel_task()

auto iris::create_kernel_task ( TaskNamespace & task_namespace,
void(* entry )() ) -> Expected< di::Arc< Task > >

◆ create_node()

auto iris::create_node ( di::Arc< TNode > root,
di::Arc< TNode > relative_to,
di::PathView path,
MetadataType type ) -> di::AnySenderOf< void >

◆ create_user_task()

auto iris::create_user_task ( TaskNamespace & task_namespace,
di::Arc< TNode > root_tnode,
di::Arc< TNode > cwd_tnode,
FileTable file_table,
di::Arc< mm::AddressSpace > address_space ) -> Expected< di::Arc< Task > >

◆ current_processor()

auto iris::current_processor ( )
inline

◆ current_processor_unsafe()

auto iris::current_processor_unsafe ( ) -> Processor&
inline

Get the current processor.

Warning
This function is unsafe because it care is not taken, the current processor may change while the returned reference is being used. Instead, use current_processor() unless you know preemption or interrupts are disabled.

◆ current_scheduler()

auto iris::current_scheduler ( )
inline

◆ detect_processor_info()

auto iris::detect_processor_info ( ) -> ProcessorInfo

◆ do_syscall()

auto iris::do_syscall ( Task & current_task,
arch::TaskState & task_state ) -> Expected<u64>

◆ generic_irq_handler()

void iris::generic_irq_handler ( GlobalIrqNumber irq,
iris::arch::TaskState & task_state,
int error_code )

Generic entry point called by assembly when an interrupt occurs.

Parameters
irqThe global irq number that was triggered
task_stateThe saved task state from the process which was interrupted
error_codeThe CPU error code, 0 if not present

◆ global_state()

auto iris::global_state ( ) -> GlobalState const&
inline

This function returns a shared reference to the global state. This only provides readonly access, and mutable fields must be protected using di::Synchronized.

◆ global_state_in_boot()

auto iris::global_state_in_boot ( ) -> GlobalState &

This function returns a mutable reference to the global state. This is only valid during kernel boot, when no other tasks can execute.

◆ hard_shutdown()

void iris::hard_shutdown ( ShutdownStatus status)

◆ init_initrd()

auto iris::init_initrd ( ) -> Expected< void >

◆ init_timer_assignments()

void iris::init_timer_assignments ( )

◆ init_tmpfs()

auto iris::init_tmpfs ( ) -> Expected< void >

◆ iris_main()

void iris::iris_main ( )

◆ irq_controller_for_interrupt_number()

auto iris::irq_controller_for_interrupt_number ( GlobalIrqNumber irq_number) -> Expected< di::Synchronized< IrqController > & >

◆ irq_number_for_legacy_isa_interrupt_number()

auto iris::irq_number_for_legacy_isa_interrupt_number ( IrqLine irq_line) -> Expected< GlobalIrqNumber >

◆ load_executable()

auto iris::load_executable ( Task & task,
di::PathView path ) -> Expected< void >

◆ log_output_byte()

void iris::log_output_byte ( di::Byte byte)

◆ log_output_character()

void iris::log_output_character ( c32 value)

◆ log_prologue()

void iris::log_prologue ( detail::DebugFormatContext & context,
di::SourceLocation location )

◆ lookup_path()

auto iris::lookup_path ( di::Arc< TNode > root,
di::Arc< TNode > relative_to,
di::PathView path,
PathLookupFlags flags ) -> di::AnySenderOf< di::Arc< TNode > >

◆ open_path()

auto iris::open_path ( di::Arc< TNode > root,
di::Arc< TNode > relative_to,
di::PathView path,
OpenMode mode ) -> di::AnySenderOf< File >

◆ print()

template<typename... Args>
void iris::print ( di::format::FormatStringWithLocationImpl< Encoding, Args... > format,
Args &&... args )

◆ println()

template<typename... Args>
void iris::println ( di::format::FormatStringWithLocationImpl< Encoding, Args... > format,
Args &&... args )

◆ register_exception_handler()

auto iris::register_exception_handler ( GlobalIrqNumber irq,
IrqHandler handler ) -> Expected< void >

◆ register_external_irq_handler()

auto iris::register_external_irq_handler ( IrqLine line,
IrqHandler handler ) -> Expected< usize >

◆ schedule_task()

void iris::schedule_task ( Task & )

Schedule a task on any scheduler.

Parameters
taskThe task to schedule.
Note
This function internally decides which processor the task should run on.

◆ scheduler_timer()

auto iris::scheduler_timer ( ) -> di::Synchronized< Timer > &

◆ set_current_processor()

void iris::set_current_processor ( Processor & processor)

Sets the current processor address.

Warning
This function can only be called once, during each processor's initialization.

◆ setup_current_processor_access()

void iris::setup_current_processor_access ( )

Setups access to the current processor.

This function is called whenever a context switch from lower privilege levels to higher privilege levels is performed. On x86_64, this loads the GS segment register with the address of the current processor using swapgs.

◆ tag_invoke() [1/18]

template<typename T>
auto iris::tag_invoke ( di::Tag< di::util::deduce_create > ,
di::InPlaceTemplate< UserspaceBuffer > ,
T * ,
usize  ) -> UserspaceBuffer< T >

◆ tag_invoke() [2/18]

template<typename T>
auto iris::tag_invoke ( di::Tag< di::util::deduce_create > ,
di::InPlaceTemplate< UserspacePtr > ,
T *  ) -> UserspacePtr< T >

◆ tag_invoke() [3/18]

auto iris::tag_invoke ( di::Tag< file_hack_raw_data > ,
InodeFile & self ) -> di::AnySenderOf<di::Span<byte const>>

◆ tag_invoke() [4/18]

auto iris::tag_invoke ( di::Tag< file_metadata > ,
InodeFile & self ) -> di::AnySenderOf<Metadata>

◆ tag_invoke() [5/18]

auto iris::tag_invoke ( di::Tag< file_truncate > ,
InodeFile & self,
u64 size ) -> di::AnySenderOf<void>

◆ tag_invoke() [6/18]

auto iris::tag_invoke ( di::Tag< inode_create_node > ,
Inode & self,
di::Arc< TNode > parent,
di::TransparentStringView name,
MetadataType type ) -> di::AnySenderOf<di::Arc<TNode>>

◆ tag_invoke() [7/18]

auto iris::tag_invoke ( di::Tag< inode_hack_raw_data > ,
Inode & self ) -> di::AnySenderOf<di::Span<byte const>>

◆ tag_invoke() [8/18]

auto iris::tag_invoke ( di::Tag< inode_lookup > ,
Inode & self,
di::Arc< TNode > parent,
di::TransparentStringView name ) -> di::AnySenderOf<di::Arc<TNode>>

◆ tag_invoke() [9/18]

auto iris::tag_invoke ( di::Tag< inode_metadata > ,
Inode & self ) -> di::AnySenderOf<Metadata>

◆ tag_invoke() [10/18]

auto iris::tag_invoke ( di::Tag< inode_read > ,
Inode & self,
mm::BackingObject & backing_object,
u64 page_number ) -> di::AnySenderOf<mm::PhysicalAddress>

◆ tag_invoke() [11/18]

auto iris::tag_invoke ( di::Tag< inode_read_directory > ,
Inode & self,
mm::BackingObject & backing_object,
u64 & offset,
UserspaceBuffer< byte > buffer ) -> di::AnySenderOf<usize>

◆ tag_invoke() [12/18]

auto iris::tag_invoke ( di::Tag< inode_truncate > ,
Inode & self,
u64 size ) -> di::AnySenderOf<>

◆ tag_invoke() [13/18]

auto iris::tag_invoke ( di::Tag< read_directory > ,
InodeFile & self,
UserspaceBuffer< byte > buffer ) -> di::AnySenderOf<usize>

◆ tag_invoke() [14/18]

auto iris::tag_invoke ( di::Tag< read_file > ,
DebugFile & ,
UserspaceBuffer< byte > buffer ) -> di::AnySenderOf<usize>

◆ tag_invoke() [15/18]

auto iris::tag_invoke ( di::Tag< read_file > ,
InodeFile & self,
UserspaceBuffer< byte > buffer ) -> di::AnySenderOf<usize>

◆ tag_invoke() [16/18]

auto iris::tag_invoke ( di::Tag< seek_file > ,
InodeFile & self,
i64 offset,
int whence ) -> di::AnySenderOf<u64>

◆ tag_invoke() [17/18]

auto iris::tag_invoke ( di::Tag< write_file > ,
DebugFile & self,
UserspaceBuffer< byte const > data ) -> di::AnySenderOf<usize>

◆ tag_invoke() [18/18]

auto iris::tag_invoke ( di::Tag< write_file > ,
InodeFile & self,
UserspaceBuffer< byte const > buffer ) -> di::AnySenderOf<usize>

◆ unregister_external_irq_handler()

void iris::unregister_external_irq_handler ( IrqLine line,
usize handler_id )

◆ validate_user_region()

auto iris::validate_user_region ( mm::VirtualAddress userspace_address,
usize count,
usize size ) -> Expected< void >

◆ with_interrupts_disabled()

auto iris::with_interrupts_disabled ( F && function) -> decltype(auto)

◆ with_preemption_disabled()

auto iris::with_preemption_disabled ( F && function) -> decltype(auto)

◆ with_userspace_access()

auto iris::with_userspace_access ( F && function) -> decltype(auto)

Variable Documentation

◆ disable_irq_line

auto iris::disable_irq_line = detail::DisableIrqLine {}
inlineconstexpr

◆ enable_irq_line

auto iris::enable_irq_line = detail::EnableIrqLine {}
inlineconstexpr

◆ file_hack_raw_data

auto iris::file_hack_raw_data = FileHACKRawDataFunction {}
inlineconstexpr

◆ file_metadata

auto iris::file_metadata = FileMetadataFunction {}
inlineconstexpr

◆ file_truncate

auto iris::file_truncate = FileTruncateFunction {}
inlineconstexpr

◆ inode_create_node

auto iris::inode_create_node = InodeCreateNodeFunction {}
inlineconstexpr

◆ inode_hack_raw_data

auto iris::inode_hack_raw_data = InodeHACKRawDataFunction {}
inlineconstexpr

◆ inode_lookup

auto iris::inode_lookup = InodeLookupFunction {}
inlineconstexpr

◆ inode_metadata

auto iris::inode_metadata = InodeMetadataFunction {}
inlineconstexpr

◆ inode_read

auto iris::inode_read = InodeReadFunction {}
inlineconstexpr

◆ inode_read_directory

auto iris::inode_read_directory = InodeReadDirectoryFunction {}
inlineconstexpr

◆ inode_truncate

auto iris::inode_truncate = InodeTruncateFunction {}
inlineconstexpr

◆ read_directory

auto iris::read_directory = ReadDirectoryFunction {}
inlineconstexpr

◆ read_file

auto iris::read_file = ReadFileFunction {}
inlineconstexpr

◆ responsible_irq_line_range

auto iris::responsible_irq_line_range = detail::ResponsibleIrqLineRange {}
inlineconstexpr

◆ seek_file

auto iris::seek_file = SeekFileFunction {}
inlineconstexpr

◆ send_eoi

auto iris::send_eoi = detail::SendEoiFunction {}
inlineconstexpr

◆ timer_calibrate

auto iris::timer_calibrate = TimerCalibrateFunction {}
inlineconstexpr

◆ timer_capabilities

auto iris::timer_capabilities = TimerCapabilitiesFunction {}
inlineconstexpr

◆ timer_name

auto iris::timer_name = TimerName {}
inlineconstexpr

◆ timer_resolution

auto iris::timer_resolution = TimerResolutionFunction {}
inlineconstexpr

◆ timer_set_interval

auto iris::timer_set_interval = TimerSetIntervalFunction {}
inlineconstexpr

◆ timer_set_single_shot

auto iris::timer_set_single_shot = TimerSetSingleShotFunction {}
inlineconstexpr

◆ write_file

auto iris::write_file = WriteFileFunction {}
inlineconstexpr