Skip to content

Commit 822cf9a

Browse files
committed
Progress testing
1 parent 1029bd3 commit 822cf9a

9 files changed

Lines changed: 702 additions & 30 deletions

File tree

config/examples/nxp-t1040.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,34 @@ WOLFTPM?=0
2626
ELF?=1
2727
DEBUG_ELF=0
2828

29-
# NOR Base Address (256MB NOR at 0xE8000000 - 0xF7FFFFFF)
29+
# NOR Base Address (128MB NOR at 0xE8000000 - 0xEFFFFFFF)
3030
ARCH_FLASH_OFFSET?=0xE8000000
3131

3232
# Flash Sector Size (128KB)
3333
WOLFBOOT_SECTOR_SIZE=0x20000
3434

35-
# wolfBoot start address
36-
WOLFBOOT_ORIGIN=0xF7F40000
35+
# wolfBoot start address (same as T1024 - NOR top is 0xEFFFFFFF)
36+
WOLFBOOT_ORIGIN=0xEFF40000
3737
# wolfBoot partition size (custom)
3838
BOOTLOADER_PARTITION_SIZE=0xC0000
3939

4040
# Application Partition Size (15MB)
4141
WOLFBOOT_PARTITION_SIZE?=0xF00000
4242
# Location in Flash for Application Partition
43-
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xF6000000
43+
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xEE000000
4444
# Load Partition to RAM Address
4545
WOLFBOOT_LOAD_ADDRESS?=0x70000000
4646

4747
# Location in Flash for Update Partition
48-
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xF6F00000
48+
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xEEF00000
4949

5050
# Location of temporary sector used during updates
5151
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xE80F0000
5252

5353
# Stage 1 loader settings (16KB)
5454
WOLFBOOT_STAGE1_SIZE=0x4000
5555
# Location in Flash for stage 1 loader (XIP from boot ROM)
56-
WOLFBOOT_STAGE1_FLASH_ADDR=0xF7FFC000
56+
WOLFBOOT_STAGE1_FLASH_ADDR=0xEFFFC000
5757
# Address in RAM to load wolfBoot (end of DDR at 2GB-1MB for 32-bit addressing)
5858
WOLFBOOT_STAGE1_LOAD_ADDR=0x7FF00000
5959

docs/Targets.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,9 +3277,9 @@ Reset Configuration Word (RCW):
32773277
00000020: 00000000 00000000 00000000 00030810
32783278
00000030: 00000000 0342580f 00000000 00000000
32793279

3280-
Flash is NOR on IFC CS0 (0x0_E800_0000) 256MB.
3280+
Flash is NOR on IFC CS0 (0x0_E800_0000) 128MB (Micron JS28F00AM29EWHA, 16-bit, AMD CFI).
32813281

3282-
Default NOR Flash Memory Layout (256MB) (128KB block, 1K page)
3282+
Default NOR Flash Memory Layout (128MB) (128KB block, 1K page)
32833283

32843284
| Description | Address | Size |
32853285
| ----------------- | ---------- | -------------------- |
@@ -3289,13 +3289,13 @@ Default NOR Flash Memory Layout (256MB) (128KB block, 1K page)
32893289
| Free | 0xE8100000 | 0x00700000 ( 7 MB) |
32903290
| FDT (Primary) | 0xE8800000 | 0x00020000 (128 KB) |
32913291
| FDT (Update) | 0xE8820000 | 0x00020000 (128 KB) |
3292-
| Free | 0xE8840000 | 0x0D7C0000 (~200 MB) |
3293-
| Application (OS) | 0xF6000000 | 0x00F00000 ( 15 MB) |
3294-
| Update (OS) | 0xF6F00000 | 0x00F00000 ( 15 MB) |
3295-
| QUICC | 0xF7E00000 | 0x00100000 ( 1 MB) |
3296-
| DPAA (FMAN) | 0xF7F00000 | 0x00020000 (128 KB) |
3297-
| wolfBoot | 0xF7F40000 | 0x000BC000 (752 KB) |
3298-
| wolfBoot Stage 1 | 0xF7FFC000 | 0x00004000 ( 16 KB) |
3292+
| Free | 0xE8840000 | 0x057C0000 ( 87 MB) |
3293+
| Application (OS) | 0xEE000000 | 0x00F00000 ( 15 MB) |
3294+
| Update (OS) | 0xEEF00000 | 0x00F00000 ( 15 MB) |
3295+
| QUICC | 0xEFE00000 | 0x00100000 ( 1 MB) |
3296+
| DPAA (FMAN) | 0xEFF00000 | 0x00020000 (128 KB) |
3297+
| wolfBoot | 0xEFF40000 | 0x000BC000 (752 KB) |
3298+
| wolfBoot Stage 1 | 0xEFFFC000 | 0x00004000 ( 16 KB) |
32993299

33003300
QE: uploading microcode 'Microcode for T1040 r1.0' version 0.0.1
33013301

@@ -3336,11 +3336,11 @@ If getting errors with keystore then you can reset things using `make distclean`
33363336
./tools/bin-assemble/bin-assemble factory_custom.bin \
33373337
0xE8000000 RCW.bin \
33383338
0xE8020000 custom.dtb \
3339-
0xF6000000 custom_v1_signed.bin \
3340-
0xF7E00000 iram_Type_A_T1040_r1.0.bin \
3341-
0xF7F00000 fsl_fman_ucode_t1040.bin \
3342-
0xF7F40000 wolfboot.bin \
3343-
0xF7FFC000 stage1/loader_stage1.bin
3339+
0xEE000000 custom_v1_signed.bin \
3340+
0xEFE00000 iram_Type_A_T1040_r1.0.bin \
3341+
0xEFF00000 fsl_fman_ucode_t1040.bin \
3342+
0xEFF40000 wolfboot.bin \
3343+
0xEFFFC000 stage1/loader_stage1.bin
33443344
```
33453345

33463346
Flash factory_custom.bin to NOR base 0xE800_0000

hal/nxp_ppc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@
131131
#define DDR_SIZE (8192ULL * 1024ULL * 1024ULL) /* 8GB */
132132
#endif
133133

134-
/* 256MB NOR: 0xE8000000 - 0xF7FFFFFF */
134+
/* 128MB NOR: 0xE8000000 - 0xEFFFFFFF */
135135
#define FLASH_BASE_ADDR 0xE8000000UL
136136
#define FLASH_BASE_PHYS_HIGH 0xFULL
137-
#define FLASH_LAW_SIZE LAW_SIZE_256MB
137+
#define FLASH_LAW_SIZE LAW_SIZE_128MB
138+
/* e5500 BookE has no 128M page size (64M->256M), use 256M TLB */
138139
#define FLASH_TLB_PAGESZ BOOKE_PAGESZ_256M
139140

140141
#define USE_LONG_JUMP

hal/nxp_t1040.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENTRY( _reset )
44

55
MEMORY
66
{
7-
/* DDR4 - 8GB (offset by destination address and 4KB boot region) */
7+
/* DDR4 - 8GB physical (32-bit addressing limits window to <2GB) */
88
DRAM (rwx) : ORIGIN = @WOLFBOOT_STAGE1_LOAD_ADDR@,
99
LENGTH = 0x7FFFFFFF - 4K - @WOLFBOOT_STAGE1_LOAD_ADDR@
1010

hal/nxp_t1040_stage1.ld

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ OUTPUT_ARCH( "powerpc" )
22

33
ENTRY( _reset )
44

5-
/* Boot ROM out of reset mapped to 0xF7FFF000 */
5+
/* Boot ROM out of reset mapped to 0xEFFFF000 (top of 128MB NOR) */
66
BASE_ADDR = @WOLFBOOT_STAGE1_FLASH_ADDR@;
77

88
LOADER_STAGE1_SIZE = @WOLFBOOT_STAGE1_SIZE@;
99

1010
/* Boot initialization code */
11-
BOOTSTRAP_TLB = 0xF7FFF000;
11+
BOOTSTRAP_TLB = 0xEFFFF000;
1212

1313
/* Entry point where RCW directs code to execute from */
14-
BOOTSTRAP_ENTRY = 0xF7FFFFFC;
14+
BOOTSTRAP_ENTRY = 0xEFFFFFFC;
1515

1616
MEMORY
1717
{
@@ -24,7 +24,8 @@ MEMORY
2424
/* Platform SRAM - 160KB */
2525
PSRAM (rwx) : ORIGIN = 0xFDFC0000, LENGTH = 0x28000
2626

27-
/* DDR - 8GB: Start at 16MB to avoid using 0x0 (NULL) addresses */
27+
/* DDR - 8GB physical, 32-bit addressing limits window to <2GB.
28+
* Start at 16MB to avoid using 0x0 (NULL) addresses */
2829
DRAM (rwx) : ORIGIN = 0x1000000, LENGTH = 0x7FFFFFFF - 0x1000000
2930
}
3031

hal/nxp_t10xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ enum ifc_amask_sizes {
525525

526526
/* NOR Flash */
527527
#ifdef TARGET_nxp_t1040
528-
#define FLASH_BANK_SIZE (256*1024*1024) /* 256MB NOR */
528+
#define FLASH_BANK_SIZE (128*1024*1024) /* 128MB NOR */
529529
#else
530530
#define FLASH_BANK_SIZE (64*1024*1024) /* 64MB NOR */
531531
#endif
@@ -1304,7 +1304,7 @@ static void hal_flash_init(void)
13041304
IFC_CSPR_MSEL_NOR |
13051305
IFC_CSPR_V));
13061306
#ifdef TARGET_nxp_t1040
1307-
set32(IFC_AMASK(0), IFC_AMASK_256MB);
1307+
set32(IFC_AMASK(0), IFC_AMASK_128MB);
13081308
#else
13091309
set32(IFC_AMASK(0), IFC_AMASK_64MB);
13101310
#endif

test-app/app_nxp_t1040.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static const char* hex_lut = "0123456789abcdef";
2828
void main(void)
2929
{
3030
int i = 0;
31-
int j = 0;
31+
volatile int j = 0;
3232
int k = 0;
3333
char snum[8];
3434

0 commit comments

Comments
 (0)