diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-07-25 18:11:25 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-07-25 18:11:25 -0600 |
commit | 5170306806fc4b68047219f811e9fe00f7f030ca (patch) | |
tree | 3a0ad48602b394f90cdfd365d05ca2702f1c5f4f | |
parent | df8869d9a6096cd1e972904b76752fe51370c61d (diff) | |
download | nuttx-5170306806fc4b68047219f811e9fe00f7f030ca.tar.gz nuttx-5170306806fc4b68047219f811e9fe00f7f030ca.tar.bz2 nuttx-5170306806fc4b68047219f811e9fe00f7f030ca.zip |
Fix some bad page table definitions of last commit
-rw-r--r-- | nuttx/arch/arm/src/sama5/chip/sama5d3x_memorymap.h | 50 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/ostest/defconfig | 2 |
2 files changed, 26 insertions, 26 deletions
diff --git a/nuttx/arch/arm/src/sama5/chip/sama5d3x_memorymap.h b/nuttx/arch/arm/src/sama5/chip/sama5d3x_memorymap.h index f17df9b0a..a5d1065b5 100644 --- a/nuttx/arch/arm/src/sama5/chip/sama5d3x_memorymap.h +++ b/nuttx/arch/arm/src/sama5/chip/sama5d3x_memorymap.h @@ -448,29 +448,6 @@ # endif #endif -/* Base address of the interrupt vector table. - * - * SAM_VECTOR_PADDR - Unmapped, physical address of vector table in SRAM - * SAM_VECTOR_VSRAM - Virtual address of vector table in SRAM - * SAM_VECTOR_VADDR - Virtual address of vector table (0x00000000 or 0xffff0000) - */ - -#define VECTOR_TABLE_SIZE 0x00010000 -#ifdef CONFIG_ARCH_LOWVECTORS /* Vectors located at 0x0000:0000 */ -# define SAM_VECTOR_PADDR SAM_ISRAM0_PADDR -# define SAM_VECTOR_VSRAM SAM_ISRAM0_VADDR -# define SAM_VECTOR_VADDR 0x00000000 -#else /* Vectors located at 0xffff:0000 -- this probably does not work */ -# ifdef SAM_ISRAM1_SIZE >= VECTOR_TABLE_SIZE -# define SAM_VECTOR_PADDR (SAM_ISRAM1_PADDR+SAM_ISRAM1_SIZE-VECTOR_TABLE_SIZE) -# define SAM_VECTOR_VSRAM (SAM_ISRAM1_VADDR+SAM_ISRAM1_SIZE-VECTOR_TABLE_SIZE) -# else -# define SAM_VECTOR_PADDR (SAM_ISRAM0_PADDR+SAM_ISRAM0_SIZE-VECTOR_TABLE_SIZE) -# define SAM_VECTOR_VSRAM (SAM_ISRAM0_VADDR+SAM_ISRAM0_SIZE-VECTOR_TABLE_SIZE) -# endif -# define SAM_VECTOR_VADDR 0xffff0000 -#endif - /* Level 2 Page table start addresses. * * 16Kb of memory is reserved hold the page table for the virtual mappings. A @@ -514,8 +491,8 @@ #define PGTABLE_L2_PBASE (PGTABLE_BASE_PADDR+PGTABLE_L2_OFFSET) #define PGTABLE_L2_VBASE (PGTABLE_BASE_VADDR+PGTABLE_L2_OFFSET) -#define VECTOR_L2_PBASE (SAM_VECTOR_PADDR+VECTOR_L2_OFFSET) -#define VECTOR_L2_VBASE (SAM_VECTOR_VADDR+VECTOR_L2_OFFSET) +#define VECTOR_L2_PBASE (PGTABLE_BASE_PADDR+VECTOR_L2_OFFSET) +#define VECTOR_L2_VBASE (PGTABLE_BASE_VADDR+VECTOR_L2_OFFSET) /* Page table end addresses: */ @@ -525,6 +502,29 @@ #define VECTOR_L2_END_PADDR (VECTOR_L2_PBASE+VECTOR_L2_SIZE) #define VECTOR_L2_END_VADDR (VECTOR_L2_VBASE+VECTOR_L2_SIZE) +/* Base address of the interrupt vector table. + * + * SAM_VECTOR_PADDR - Unmapped, physical address of vector table in SRAM + * SAM_VECTOR_VSRAM - Virtual address of vector table in SRAM + * SAM_VECTOR_VADDR - Virtual address of vector table (0x00000000 or 0xffff0000) + */ + +#define VECTOR_TABLE_SIZE 0x00010000 +#ifdef CONFIG_ARCH_LOWVECTORS /* Vectors located at 0x0000:0000 */ +# define SAM_VECTOR_PADDR SAM_ISRAM0_PADDR +# define SAM_VECTOR_VSRAM SAM_ISRAM0_VADDR +# define SAM_VECTOR_VADDR 0x00000000 +#else /* Vectors located at 0xffff:0000 -- this probably does not work */ +# ifdef SAM_ISRAM1_SIZE >= VECTOR_TABLE_SIZE +# define SAM_VECTOR_PADDR (SAM_ISRAM1_PADDR+SAM_ISRAM1_SIZE-VECTOR_TABLE_SIZE) +# define SAM_VECTOR_VSRAM (SAM_ISRAM1_VADDR+SAM_ISRAM1_SIZE-VECTOR_TABLE_SIZE) +# else +# define SAM_VECTOR_PADDR (SAM_ISRAM0_PADDR+SAM_ISRAM0_SIZE-VECTOR_TABLE_SIZE) +# define SAM_VECTOR_VSRAM (SAM_ISRAM0_VADDR+SAM_ISRAM0_SIZE-VECTOR_TABLE_SIZE) +# endif +# define SAM_VECTOR_VADDR 0xffff0000 +#endif + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/nuttx/configs/sama5d3x-ek/ostest/defconfig b/nuttx/configs/sama5d3x-ek/ostest/defconfig index 2247c2733..3b8fa9df1 100644 --- a/nuttx/configs/sama5d3x-ek/ostest/defconfig +++ b/nuttx/configs/sama5d3x-ek/ostest/defconfig @@ -201,7 +201,7 @@ CONFIG_BOARD_LOOPSPERMSEC=16717 # CONFIG_ARCH_CALIBRATION is not set CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_VSTART=0x20000000 -CONFIG_DRAM_SIZE=131072 +CONFIG_DRAM_SIZE=114688 CONFIG_ARCH_HAVE_INTERRUPTSTACK=y CONFIG_ARCH_INTERRUPTSTACK=0 |