liberis
|
Functions to handle V810 specific functionality. More...
#include <eris/types.h>
Go to the source code of this file.
Functions | |
void | cache_enable (void) |
Enable V810 cache. | |
void | cache_disable (void) |
Disable V810 cache. | |
void | cache_clear (int entry, int count) |
Clear select entries in the V810 cache. | |
void | cache_dump (void *dumpaddr) |
Dump the V810 cache. | |
void | cache_restore (void *restaddr) |
Restore the V810 cache. | |
int | irq_enable (void) |
Enable V810 IRQs. | |
int | irq_disable (void) |
Disable V810 IRQs. | |
void | irq_restore (int on) |
Restore V810 IRQs. | |
void | irq_set_level (int lv) |
Set minimum V810 maskable interrupt level. | |
void | irq_set_mask (int mask) |
Set interrupt masking. | |
void | irq_set_priority (u32 prio) |
Set priorities for each interrupt level. | |
int | irq_get_level (void) |
Get minimum/current V810 maskable interrupt level. | |
u16 | irq_get_mask (void) |
Get interrupt masking. | |
u32 | irq_get_priority (void) |
Get priorities for each interrupt level. | |
void | irq_set_handler (int level, void(*fn)(void)) |
Set an IRQ handler. | |
void | out32 (u32 port, u32 data) |
Output 32bit data. | |
void | out16 (u32 port, u16 data) |
Output 16bit data. | |
void | out8 (u32 port, u8 data) |
Output 8bit data. | |
u32 | in32 (u32 port) |
Input 32bit data. | |
u16 | in16 (u32 port) |
Input 16bit data. | |
u8 | in8 (u32 port) |
Input 8bit data. |
Functions to handle V810 specific functionality.
Exposes functions for cache control, IRQ handling, and port usage.
void cache_clear | ( | int | entry, |
int | count | ||
) |
Clear select entries in the V810 cache.
entry | The first entry in the cache to clear. (0 ~ 127) |
count | The amount of entries to clear from the cache. (1 ~ 128) |
void cache_disable | ( | void | ) |
Disable V810 cache.
void cache_dump | ( | void * | dumpaddr | ) |
Dump the V810 cache.
dumpaddr | The memory to dump the cache into. Must be 256 byte aligned. |
void cache_enable | ( | void | ) |
Enable V810 cache.
void cache_restore | ( | void * | restaddr | ) |
Restore the V810 cache.
Restores the V810 cache from a dump made with cache_dump().
restaddr | The memory to restore the cache from. Must be 256 byte aligned. |
int irq_disable | ( | void | ) |
Disable V810 IRQs.
int irq_enable | ( | void | ) |
Enable V810 IRQs.
int irq_get_level | ( | void | ) |
Get minimum/current V810 maskable interrupt level.
Gets the current/minimum (they're the same here) maskable interrupt level.
u16 irq_get_mask | ( | void | ) |
Get interrupt masking.
Gets the interrupt masking for the interrupt levels 8 ~ 15.
u32 irq_get_priority | ( | void | ) |
Get priorities for each interrupt level.
Gets interrupt priorities for interrupt levels 8 ~ 15.
void irq_restore | ( | int | on | ) |
Restore V810 IRQs.
on | Whether the IRQs should be turned on or off. A return value from irq_disable() or irq_enable() is also valid. |
void irq_set_handler | ( | int | level, |
void(*)(void) | fn | ||
) |
Set an IRQ handler.
Sets a handler for a specific IRQ level.
level | The level that this handler will correspond to. |
fn | The handler that will be run when an interrupt with the correct level is signaled. |
void irq_set_level | ( | int | lv | ) |
Set minimum V810 maskable interrupt level.
Sets the minimum interrupt level that will be accepted by the interrupt handling in the V810. Any interrupts with a level below this will not be acknowledged.
lv | Minimum V810 maskable interrupt level. (0 ~ 15) |
void irq_set_mask | ( | int | mask | ) |
Set interrupt masking.
Sets the interrupt masking for the interrupt levels 8 ~ 15.
mask | The mask on levels. bit0 is level 15, bit 7 is level 8, etc. |
void irq_set_priority | ( | u32 | prio | ) |
Set priorities for each interrupt level.
Sets interrupt priorities for interrupt levels 8 ~ 15.
prio | The priority for levels. Each level gets 3 bits, with bit0~2 being level 15, and bit29~31 is level 8. |