IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
igros::sys Namespace Reference

System formats (ELF). More...

Classes

struct  device_t
 Device description structure. More...
struct  elfIdentity_t
 ELF identity class. More...
struct  elfHeader_t
 ELF file header. More...
struct  elfProgramHeader_t
 ELF program header. More...

Typedefs

using devFuncInit_t = std::add_pointer_t<auto()->igros_pointer_t>
 Device init function pointer.
using devFuncDeinit_t = std::add_pointer_t<void(igros_pointer_t)>
 Device deinit function pointer.
using devFuncOpen_t = std::add_pointer_t<auto(const char*, const igros_dword_t)->igros_pointer_t>
 Device open function pointer.
using devFuncClose_t = std::add_pointer_t<void(igros_pointer_t)>
 Device close function pointer.
using devFuncWrite_t = std::add_pointer_t<auto(const igros_pointer_t, const void* const, const igros_usize_t)->igros_usize_t>
 Device write function pointer.
using devFuncRead_t = std::add_pointer_t<auto(const igros_pointer_t, void* const, const igros_usize_t)->igros_usize_t>
 Device read function pointer.
using devFuncIOCTL_t = std::add_pointer_t<auto(const igros_pointer_t, const igros_dword_t, ...)->igros_usize_t>
 Device IOCTL function pointer.

Enumerations

enum class  ELF_CLASS : igros_byte_t { NONE = 0x00_u8 , CLASS32 = 0x01_u8 , CLASS64 = 0x02_u8 }
 ELF class type. More...
enum class  ELF_DATA : igros_byte_t { NONE = 0x00_u8 , LSB = 0x01_u8 , MSB = 0x02_u8 }
 ELF data type. More...
enum class  ELF_VERSION : igros_byte_t { NONE = 0x00_u8 , CURRENT = 0x01_u8 }
 ELF version. More...
enum class  ELF_ABI : igros_byte_t {
  SYSV = 0x00_u8 , HP_UX = 0x01_u8 , NETBSD = 0x02_u8 , LINUX = 0x03_u8 ,
  HURD = 0x04_u8 , SOLARIS = 0x06_u8 , AIX = 0x07_u8 , IRIS = 0x08_u8 ,
  FREEBSD = 0x09_u8 , TRU64 = 0x0A_u8 , NOVELL = 0x0B_u8 , OPENBSD = 0x0C_u8 ,
  VMS = 0x0D_u8 , NONSTOP = 0x0E_u8 , AROS = 0x0F_u8 , FENIX = 0x10_u8 ,
  CLOUD = 0x11_u8 , VOS = 0x12_u8
}
 ELF OS ABI. More...
enum class  ELF_TYPE : igros_word_t {
  NONE = 0x0000_u16 , REL = 0x0001_u16 , EXEC = 0x0002_u16 , DYN = 0x0003_u16 ,
  CORE = 0x0004_u16 , LOOS = 0xFE00_u16 , HIOS = 0xFEFF_u16 , LOPROC = 0xFF00_u16 ,
  HIPROC = 0xFFFF_u16
}
 ELF type. More...
enum class  ELF_MACHINE : igros_word_t {
  NONE = 0x00_u16 , M32 = 0x01_u16 , SPARC = 0x02_u16 , I386 = 0x03_u16 ,
  M68K = 0x04_u16 , M88K = 0x05_u16 , I8086 = 0x07_u16 , MIPS = 0x08_u16 ,
  POWERPC = 0x14_u16 , S390 = 0x16_u16 , ARM = 0x28_u16 , SUPERH = 0x2A_u16 ,
  IA_64 = 0x32_u16 , X86_64 = 0x3E_u16 , AARCH64 = 0xB7_u16 , RISC_V = 0xF3_u16
}
 ELF machine type. More...
enum class  ELF_PROGRAM_TYPE : igros_dword_t {
  NONE = 0x00000000_u32 , LOAD = 0x00000001_u32 , DYNAMIC = 0x00000002_u32 , INTERP = 0x00000003_u32 ,
  NOTE = 0x00000004_u32 , SHLIB = 0x00000005_u32 , PHDR = 0x00000006_u32 , LOOS = 0x60000000_u32 ,
  HIOS = 0x6FFFFFFF_u32 , LOPROC = 0x70000000_u32 , HIPROC = 0x7FFFFFFF_u32
}
 ELF program type. More...

Functions

auto registerDevice (const device_t &dev) noexcept -> bool
 Register device.
auto unregisterDevice (const device_t &dev) noexcept -> bool
 Unregister device.

Variables

static constexpr auto ELF_MAGIC_0 {0x7F_u8}
 127
static constexpr auto ELF_MAGIC_1 {0x45_u8}
 'E'
static constexpr auto ELF_MAGIC_2 {0x4C_u8}
 'L'
static constexpr auto ELF_MAGIC_3 {0x46_u8}
 'F'

Detailed Description

System formats (ELF).

Typedef Documentation

◆ devFuncClose_t

using igros::sys::devFuncClose_t = std::add_pointer_t<void(igros_pointer_t)>

Device close function pointer.

Definition at line 36 of file device.hpp.

◆ devFuncDeinit_t

using igros::sys::devFuncDeinit_t = std::add_pointer_t<void(igros_pointer_t)>

Device deinit function pointer.

Definition at line 31 of file device.hpp.

◆ devFuncInit_t

using igros::sys::devFuncInit_t = std::add_pointer_t<auto()->igros_pointer_t>

Device init function pointer.

Definition at line 29 of file device.hpp.

◆ devFuncIOCTL_t

using igros::sys::devFuncIOCTL_t = std::add_pointer_t<auto(const igros_pointer_t, const igros_dword_t, ...)->igros_usize_t>

Device IOCTL function pointer.

Definition at line 44 of file device.hpp.

◆ devFuncOpen_t

using igros::sys::devFuncOpen_t = std::add_pointer_t<auto(const char*, const igros_dword_t)->igros_pointer_t>

Device open function pointer.

Definition at line 34 of file device.hpp.

◆ devFuncRead_t

using igros::sys::devFuncRead_t = std::add_pointer_t<auto(const igros_pointer_t, void* const, const igros_usize_t)->igros_usize_t>

Device read function pointer.

Definition at line 41 of file device.hpp.

◆ devFuncWrite_t

using igros::sys::devFuncWrite_t = std::add_pointer_t<auto(const igros_pointer_t, const void* const, const igros_usize_t)->igros_usize_t>

Device write function pointer.

Definition at line 39 of file device.hpp.

Enumeration Type Documentation

◆ ELF_ABI

enum class igros::sys::ELF_ABI : igros_byte_t
strong

ELF OS ABI.

Enumerator
SYSV 

System-V.

HP_UX 

HP-UX.

NETBSD 

NetBSD.

LINUX 

Linux.

HURD 

GNU Hurd.

SOLARIS 

Solaris.

AIX 

AIX.

IRIS 

IRIS.

FREEBSD 

FreeBSD.

TRU64 

Tru64.

NOVELL 

Novell Modesto.

OPENBSD 

OpenBSD.

VMS 

OpenVMS.

NONSTOP 

NonStop Kernel.

AROS 

AROS.

FENIX 

Fenix OS.

CLOUD 

Cloud ABI.

VOS 

OpenVOS.

Definition at line 55 of file elf.hpp.

◆ ELF_CLASS

enum class igros::sys::ELF_CLASS : igros_byte_t
strong

ELF class type.

Enumerator
NONE 

Unknown.

CLASS32 

32-bit

CLASS64 

64-bit

Definition at line 35 of file elf.hpp.

◆ ELF_DATA

enum class igros::sys::ELF_DATA : igros_byte_t
strong

ELF data type.

Enumerator
NONE 

Unknown.

LSB 

LSB order.

MSB 

MSB order.

Definition at line 42 of file elf.hpp.

◆ ELF_MACHINE

ELF machine type.

Enumerator
NONE 

Unknown.

M32 

AT&T WE 32100.

SPARC 

SPARC.

I386 

Intel 80386.

M68K 

Motorola 68000.

M88K 

Motorola 88000.

I8086 

Intel 80860.

MIPS 

MIPS RS3000.

POWERPC 

PowerPC.

S390 

IBM s390.

ARM 

ARM.

SUPERH 

SuperH.

IA_64 

Intel 64.

X86_64 

AMD/Intel x86-64.

AARCH64 

AArch64.

RISC_V 

RISC-V.

Definition at line 106 of file elf.hpp.

◆ ELF_PROGRAM_TYPE

ELF program type.

Enumerator
NONE 

Unused.

LOAD 

Loadable segment.

DYNAMIC 

Dynamic linking info.

INTERP 

Interpreter info.

NOTE 

Auxiliary info.

SHLIB 

Reserved.

PHDR 

Program header table itself.

LOOS 

Inclusive reserved ranges for OS/Proc semantic.

HIOS 

— // —

LOPROC 

— // —

HIPROC 

— // —

Definition at line 147 of file elf.hpp.

◆ ELF_TYPE

enum class igros::sys::ELF_TYPE : igros_word_t
strong

ELF type.

Enumerator
NONE 

Unknown.

REL 

Relocatable file.

EXEC 

Executable file.

DYN 

Shared object file.

CORE 

Core file.

LOOS 

OS-specific.

HIOS 

— // —

LOPROC 

Processor-specific.

HIPROC 

— // —

Definition at line 92 of file elf.hpp.

◆ ELF_VERSION

ELF version.

Enumerator
NONE 

Unknown version.

CURRENT 

Current version.

Definition at line 49 of file elf.hpp.

Function Documentation

◆ registerDevice()

auto igros::sys::registerDevice ( const device_t & dev) ->bool
nodiscardnoexcept

Register device.

Parameters
devDevice
Returns
true if device is registered

◆ unregisterDevice()

auto igros::sys::unregisterDevice ( const device_t & dev) ->bool
nodiscardnoexcept

Unregister device.

Parameters
devDevice
Returns
true if device was registered

Variable Documentation

◆ ELF_MAGIC_0

auto igros::sys::ELF_MAGIC_0 {0x7F_u8}
staticconstexpr

127

Definition at line 28 of file elf.hpp.

◆ ELF_MAGIC_1

auto igros::sys::ELF_MAGIC_1 {0x45_u8}
staticconstexpr

'E'

Definition at line 29 of file elf.hpp.

◆ ELF_MAGIC_2

auto igros::sys::ELF_MAGIC_2 {0x4C_u8}
staticconstexpr

'L'

Definition at line 30 of file elf.hpp.

◆ ELF_MAGIC_3

auto igros::sys::ELF_MAGIC_3 {0x46_u8}
staticconstexpr

'F'

Definition at line 31 of file elf.hpp.