Mercurial > flash_v2
comparison packages/hal/sh/edk/current/include/platform.inc @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | |
| children | 6736c52df507 |
comparison
equal
deleted
inserted
replaced
| 75:41bf073c0c32 | 76:435cced73e2f |
|---|---|
| 1 #ifndef CYGONCE_HAL_PLATFORM_INC | |
| 2 #define CYGONCE_HAL_PLATFORM_INC | |
| 3 ##============================================================================= | |
| 4 ## | |
| 5 ## platform.inc | |
| 6 ## | |
| 7 ## SH/EDK7708 board assembler header file | |
| 8 ## | |
| 9 ##============================================================================= | |
| 10 #####COPYRIGHTBEGIN#### | |
| 11 # | |
| 12 # ------------------------------------------- | |
| 13 # The contents of this file are subject to the Red Hat eCos Public License | |
| 14 # Version 1.0 (the "License"); you may not use this file except in | |
| 15 # compliance with the License. You may obtain a copy of the License at | |
| 16 # http://sourceware.cygnus.com/ecos | |
| 17 # | |
| 18 # Software distributed under the License is distributed on an | |
| 19 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 20 # License for the specific language governing rights and limitations under | |
| 21 # the License. | |
| 22 # | |
| 23 # The Original Code is eCos - Embedded Configurable Operating System, | |
| 24 # released September 30, 1998. | |
| 25 # | |
| 26 # The Initial Developer of the Original Code is Red Hat. | |
| 27 # Portions created by Red Hat are | |
| 28 # Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | |
| 29 # All Rights Reserved. | |
| 30 # ------------------------------------------- | |
| 31 # | |
| 32 #####COPYRIGHTEND#### | |
| 33 ##============================================================================= | |
| 34 #######DESCRIPTIONBEGIN#### | |
| 35 ## | |
| 36 ## Author(s): jskov | |
| 37 ## Contributors:jskov | |
| 38 ## Date: 2000-02-02 | |
| 39 ## Purpose: SH/EDK7708 board definitions. | |
| 40 ## Description: This file contains various definitions and macros that are | |
| 41 ## useful for writing assembly code for the SH/EDK7708 board. | |
| 42 ## Usage: | |
| 43 ## #include <cyg/hal/platform.inc> | |
| 44 ## ... | |
| 45 ## | |
| 46 ## | |
| 47 ######DESCRIPTIONEND#### | |
| 48 ## | |
| 49 ##============================================================================= | |
| 50 | |
| 51 #include <pkgconf/hal.h> | |
| 52 | |
| 53 #include <cyg/hal/sh_offsets.inc> | |
| 54 | |
| 55 #------------------------------------------------------------------------------ | |
| 56 # Monitor initialization. | |
| 57 | |
| 58 #ifndef CYGPKG_HAL_SH_MON_DEFINED | |
| 59 | |
| 60 #if defined(CYG_HAL_STARTUP_ROM) || \ | |
| 61 ( defined(CYG_HAL_STARTUP_RAM) && \ | |
| 62 !defined(CYGSEM_HAL_USE_ROM_MONITOR)) | |
| 63 | |
| 64 # If we are starting up from ROM, or we are starting in | |
| 65 # RAM and NOT using a ROM monitor, initialize the VSR table. | |
| 66 | |
| 67 .macro hal_mon_init | |
| 68 mov.l $_hal_vsr_table_p,r3 | |
| 69 # Write exception vectors | |
| 70 mov.l $_cyg_hal_default_exception_vsr_p,r4 | |
| 71 mov #CYGNUM_HAL_VSR_EXCEPTION_COUNT,r5 | |
| 72 1: mov.l r4,@r3 | |
| 73 add #4,r3 | |
| 74 dt r5 | |
| 75 bf 1b | |
| 76 # Write interrupt vector | |
| 77 mov.l $_cyg_hal_default_interrupt_vsr_p,r4 | |
| 78 mov.l r4,@r3 | |
| 79 bra 2f | |
| 80 nop | |
| 81 .align 2 | |
| 82 | |
| 83 $_cyg_hal_default_exception_vsr_p: | |
| 84 .long _cyg_hal_default_exception_vsr | |
| 85 $_cyg_hal_default_interrupt_vsr_p: | |
| 86 .long _cyg_hal_default_interrupt_vsr | |
| 87 | |
| 88 .extern _hal_vsr_table | |
| 89 $_hal_vsr_table_p: | |
| 90 .long _hal_vsr_table | |
| 91 | |
| 92 2: | |
| 93 .endm | |
| 94 | |
| 95 #elif defined(CYG_HAL_STARTUP_RAM) && defined(CYGSEM_HAL_USE_ROM_MONITOR) | |
| 96 | |
| 97 # Initialize the VSR table entries | |
| 98 # We only take control of the interrupt vector, | |
| 99 # the rest are left to the ROM for now... | |
| 100 | |
| 101 .macro hal_mon_init | |
| 102 # Write interrupt vector | |
| 103 mov.l $_hal_vsr_table_p,r3 | |
| 104 mov.l $_cyg_hal_default_interrupt_vsr_p,r4 | |
| 105 mov.l r4,@r3 | |
| 106 bra 2f | |
| 107 nop | |
| 108 .align 2 | |
| 109 | |
| 110 $_cyg_hal_default_interrupt_vsr_p: | |
| 111 .long _cyg_hal_default_interrupt_vsr | |
| 112 | |
| 113 .extern _hal_vsr_table | |
| 114 $_hal_vsr_table_p: | |
| 115 .long _hal_vsr_table+CYGNUM_HAL_VECTOR_INTERRUPT*4 | |
| 116 | |
| 117 2: | |
| 118 .endm | |
| 119 | |
| 120 #else | |
| 121 | |
| 122 .macro hal_mon_init | |
| 123 .endm | |
| 124 | |
| 125 #endif | |
| 126 | |
| 127 | |
| 128 #define CYGPKG_HAL_SH_MON_DEFINED | |
| 129 | |
| 130 #endif // CYGPKG_HAL_SH_MON_DEFINED | |
| 131 | |
| 132 #endif // CYGONCE_HAL_PLATFORM_INC |
