Home About us GitHub Contact us Docs

FoxOS

Welcome to the FoxOS website!

laihost_map

Signature: void* laihost_map(size_t address, size_t count)
Description: Function needed by the lai library. Maps a memory region.

Parameters:

Return: void*

laihost_unmap

Signature: void laihost_unmap(void* pointer, size_t count)
Description: Function needed by the lai library. Unmaps a memory region.

Parameters:

Return: void

laihost_log

Signature: void laihost_log(int level, const char* msg)
Description: Function needed by the lai library. Logs a message.

Parameters:

Return: void

laihost_panic

Signature: void laihost_panic(const char* msg)
Description: Function needed by the lai library. Panics the system.

Parameters:

Return: void

laihost_malloc

Signature: void* laihost_malloc(size_t size)
Description: Function needed by the lai library. Allocates a memory region.

Parameters:

Return: void*

laihost_realloc

Signature: void* laihost_realloc(void *oldptr, size_t newsize, size_t oldsize)
Description: Function needed by the lai library. Reallocates a memory region.

Parameters:

Return: void*

laihost_free

Signature: void laihost_free(void *ptr, size_t size)
Description: Function needed by the lai library. Frees a memory region.

Parameters:

Return: void

laihost_outb

Signature: void laihost_outb(uint16_t port, uint8_t val)
Description: Function needed by the lai library. Writes a byte to an io port.

Parameters:

Return: void

laihost_outw

Signature: void laihost_outw(uint16_t port, uint16_t val)
Description: Function needed by the lai library. Writes a word to an io port.

Parameters:

Return: void

laihost_outd

Signature: void laihost_outd(uint16_t port, uint32_t val)
Description: Function needed by the lai library. Writes an double word value to an io port.

Parameters:

Return: void

laihost_inb

Signature: uint8_t laihost_inb(uint16_t port)
Description: Function needed by the lai library. Reads a byte from an io port.

Parameters:

Return: uint8_t

laihost_inw

Signature: uint16_t laihost_inw(uint16_t port)
Description: Function needed by the lai library. Reads a word from an io port.

Parameters:

Return: uint16_t

laihost_ind

Signature: uint32_t laihost_ind(uint16_t port)
Description: Function needed by the lai library. Reads an double word value from an io port.

Parameters:

Return: uint32_t

laihost_pci_writeb

Signature: void laihost_pci_writeb(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset, uint8_t val)
Description: Function needed by the lai library. Writes a byte to a pci device.

Parameters:

Return: void

laihost_pci_writew

Signature: void laihost_pci_writew(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset, uint16_t val)
Description: Function needed by the lai library. Writes a word to a pci device.

Parameters:

Return: void

laihost_pci_writed

Signature: void laihost_pci_writed(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset, uint32_t val)
Description: Function needed by the lai library. Writes a dword to a pci device.

Parameters:

Return: void

laihost_pci_readb

Signature: uint8_t laihost_pci_readb(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset)
Description: Function needed by the lai library. Reads a byte from a pci device.

Parameters:

Return: uint8_t

laihost_pci_readw

Signature: uint16_t laihost_pci_readw(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset)
Description: Function needed by the lai library. Reads a word from a pci device.

Parameters:

Return: uint16_t

laihost_pci_readd

Signature: uint32_t laihost_pci_readd(uint16_t seg, uint8_t bus, uint8_t slot, uint8_t fun, uint16_t offset)
Description: Function needed by the lai library. Reads a dword from a pci device.

Parameters:

Return: uint32_t

laihost_sleep

Signature: void laihost_sleep(uint64_t ms)
Description: Function needed by the lai library. Sleeps for a certain amount of time.

Parameters:

Return: void

laihost_timer

Signature: uint64_t laihost_timer(void)
Description: Function needed by the lai library.

Parameters:

Return: uint64_t

laihost_handle_amldebug

Signature: void laihost_handle_amldebug(lai_variable_t* var)
Description: Function needed by the lai library. Handles the amldebug output.

Parameters:

Return: void

laihost_sync_wait

Signature: int laihost_sync_wait(struct lai_sync_state *sync, unsigned int val, int64_t timeout)
Description: Function needed by the lai library.

Parameters:

Return: int

laihost_sync_wake

Signature: void laihost_sync_wake(struct lai_sync_state *sync)
Description: Function needed by the lai library.

Parameters:

Return: void

laihost_scan

Signature: void* laihost_scan(const char *sig, size_t index)
Description: Function needed by the lai library. Scans the acpi tables for a certain table

Parameters:

Return: void*

memcpy

Signature: void* memcpy(void* dest, const void* src, size_t count)
Description: Copies a memory region

Parameters:

Return: void*

memset

Signature: void* memset(void* dest, int val, size_t count)
Description: Sets a memory region to a value

Parameters:

Return: void*

memcmp

Signature: int memcmp(const void* dest, const void* src, size_t count)
Description: Compares two memory regions

Parameters:

Return: int

Show file on GitHub