Mercurial > flash_v2
diff packages/hal/mips/arch/current/include/hal_arch.h @ 112:02ea4320376c ecos-sw-2000-07-21
Merge from eCos master repository on 2000-07-21-21:01:39-BST
| author | jlarmour |
|---|---|
| date | Fri, 21 Jul 2000 21:34:11 +0000 |
| parents | c37d3a9e1b28 |
| children | 25e238959bae |
line wrap: on
line diff
--- a/packages/hal/mips/arch/current/include/hal_arch.h +++ b/packages/hal/mips/arch/current/include/hal_arch.h @@ -35,7 +35,7 @@ //#####DESCRIPTIONBEGIN#### // // Author(s): nickg -// Contributors: nickg +// Contributors: nickg, dmoseley // Date: 1999-02-17 // Purpose: Define architecture abstractions // Usage: #include <cyg/hal/hal_arch.h> @@ -44,6 +44,7 @@ // //========================================================================== +#ifndef __ASSEMBLER__ #include <pkgconf/hal.h> #include <cyg/infra/cyg_type.h> @@ -195,6 +196,7 @@ externC void hal_thread_load_context( CY // happen if executed. // HAL_BREAKINST is the value of the breakpoint instruction and // HAL_BREAKINST_SIZE is its size in bytes. +// HAL_BREAKINST_TYPE is the type. #define HAL_BREAKPOINT(_label_) \ asm volatile (" .globl " #_label_ ";" \ @@ -206,6 +208,8 @@ asm volatile (" .globl " #_label_ ";" #define HAL_BREAKINST_SIZE 4 +#define HAL_BREAKINST_TYPE cyg_uint32 + //-------------------------------------------------------------------------- // Thread register state manipulation for GDB support. @@ -368,6 +372,26 @@ externC void hal_idle_thread_action(cyg_ #endif +#endif /* __ASSEMBLER__ */ + +// Convenience macros for accessing memory cached or uncached +#define CYGARC_KSEG_MASK (0xE0000000) +#define CYGARC_KSEG_CACHED (0x80000000) +#define CYGARC_KSEG_UNCACHED (0xA0000000) +#define CYGARC_KSEG_CACHED_BASE (0x80000000) +#define CYGARC_KSEG_UNCACHED_BASE (0xA0000000) +#define CYGARC_CACHED_ADDRESS(x) (((x) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_CACHED) +#define CYGARC_UNCACHED_ADDRESS(x) (((x) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_UNCACHED) +#define CYGARC_PHYSICAL_ADDRESS(x) ((x) & ~CYGARC_KSEG_MASK) +#ifdef __ASSEMBLER__ +#define CYGARC_ADDRESS_REG_CACHED(reg) \ + and reg, reg, ~CYGARC_KSEG_MASK; \ + or reg, reg, CYGARC_KSEG_CACHED +#define CYGARC_ADDRESS_REG_UNCACHED(reg) \ + and reg, reg, ~CYGARC_KSEG_MASK; \ + or reg, reg, CYGARC_KSEG_UNCACHED +#endif /* __ASSEMBLER__ */ + //-------------------------------------------------------------------------- // Macros for switching context between two eCos instances (jump from // code in ROM to code in RAM or vice versa).
