Address translation, Global pointer, Interrupt handling – Comtrol eCos User Manual
Page 286: Vector numbers

Chapter 9. HAL Interfaces
CYGNUM_HAL_STACK_SIZE_TYPICAL
is a reasonable increment over
CYGNUM_HAL_STACK_SIZE_MINIMUM
, usu-
ally about 1kB. This should be adequate for most modest thread needs. Only threads that need to define significant
amounts of local data, or have very deep call trees should need to use a larger stack size.
Address Translation
CYGARC_CACHED_ADDRESS(addr)
CYGARC_UNCACHED_ADDRESS(addr)
CYGARC_PHYSICAL_ADDRESS(addr)
These macros provide address translation between different views of memory. In many architectures a given mem-
ory location may be visible at different addresses in both cached and uncached forms. It is also possible that the
MMU or some other address translation unit in the CPU presents memory to the program at a different virtual
address to its physical address on the bus.
CYGARC_CACHED_ADDRESS()
translates the given address to its location in cached memory. This is typically where
the application will access the memory.
CYGARC_UNCACHED_ADDRESS()
translates the given address to its location in uncached memory. This is typically
where device drivers will access the memory to avoid cache problems. It may additionally be necessary for the
cache to be flushed before the contents of this location is fully valid.
CYGARC_PHYSICAL_ADDRESS()
translates the given address to its location in the physical address space. This is
typically the address that needs to be passed to device hardware such as a DMA engine, ethernet device or PCI
bus bridge. The physical address may not be directly accessible to the program, it may be re-mapped by address
translation.
Global Pointer
CYGARC_HAL_SAVE_GP()
CYGARC_HAL_RESTORE_GP()
These macros insert code to save and restore any global data pointer that the ABI uses. These are necessary when
switching context between two eCos instances - for example between an eCos application and RedBoot.
Interrupt Handling
These interfaces contain definitions related to interrupt handling. They include definitions of exception and interrupt
numbers, interrupt enabling and masking, and realtime clock operations.
These definitions are normally found in
cyg/hal/hal_intr.h
. This file is supplied by the architecture HAL.
Any variant or platform specific definitions will be found in
cyg/hal/var_intr.h
,
cyg/hal/plf_intr.h
or
cyg/hal/hal_platform_ints.h
in the variant or platform HAL, depending on the exact target. These files are
include automatically by this header, so need not be included explicitly.
182