WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
ssb_config_common.h
浏览该文件的文档.
1
/*
2
* Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2021. All rights reserved.
3
* Description: Default SSB memory configurations
4
*
5
* Create: 2021-06-16
6
*/
7
#ifndef SSB_CONFIG_COMMON_H
8
#define SSB_CONFIG_COMMON_H
9
10
/* ----------------------------------------------------------------------------------------------------------------- */
11
/* IMAGE Area Defines */
12
/* SSB FOTA Region */
13
#define SSB_FOTA_REGION_START (FLASH_START + FOTA_IMAGE_START)
14
15
#define FOTA_IAMGE_SIGN_START (FLASH_START + 0x7EC000)
16
#define FOTA_ROOT_PUBKEY_START (FOTA_IAMGE_SIGN_START)
17
#define FOTA_SUB_PUBKEY_START (FOTA_ROOT_PUBKEY_START + FLASH_PAGE_SIZE)
18
#define FOTA_SSB_SIGN_START (FOTA_SUB_PUBKEY_START + FLASH_PAGE_SIZE)
19
#define FOTA_RECOVERY_SIGN_START (FOTA_SSB_SIGN_START + FLASH_PAGE_SIZE)
20
#define FOTA_BT_SIGN_START (FOTA_RECOVERY_SIGN_START + FLASH_PAGE_SIZE)
21
#define FOTA_DSP_SIGN_START (FOTA_BT_SIGN_START + FLASH_PAGE_SIZE)
22
#define FOTA_DSP1_SIGN_START (FOTA_DSP_SIGN_START + FLASH_PAGE_SIZE)
23
#define FOTA_APP_SIGN_START (FOTA_DSP1_SIGN_START + FLASH_PAGE_SIZE)
24
25
/*
26
* ********************* RAM ALLOCATION *********************
27
*
28
* Three main RAM areas, the 'BCPU' RAM, the 'APP' RAM, and 'share' RAM.
29
* 'APP' RAM include 'ITCM' for code and 'DTCM' for DATA.
30
* As the name implies, every core can access it's RAM and they all allowed
31
* to access 'share' RAM
32
*
33
* BT core can access all RAM include APP RAM and DSP RAM.
34
*
35
* The 'shared' RAM is used by all cores, this area visible to them all
36
* to exchange larger amounts of data.
37
*
38
* SHARED RAM IPC mail box
39
* LOG Area
40
*/
41
/* ----------------------------------------------------------------------------------------------------------------- */
42
/* SSB based application code */
43
#define SSB_VECTORS_ORIGIN (APP_ITCM_ORIGIN)
44
#define SSB_ITCM_ORIGIN (APP_ITCM_ORIGIN)
45
#define SSB_ITCM_LENGTH (SSB_FLASH_REGION_LENGTH)
46
47
/* SSB DTCM config */
48
#define MCU_DTCM_END (APP_SRAM_ORIGIN + APP_SRAM_LENGTH)
49
/* stack for normal 7k */
50
#define USER_STACK_BASEADDR APP_SRAM_ORIGIN
51
#define USER_STACK_LEN 0x1c00
52
#define USER_STACK_LIMIT (USER_STACK_BASEADDR + USER_STACK_LEN)
53
54
/* stack for irq 1k */
55
#define IRQ_STACK_BASEADDR USER_STACK_LIMIT
56
#define IRQ_STACK_LEN 0x400
57
#define IRQ_STACK_LIMIT (IRQ_STACK_BASEADDR + IRQ_STACK_LEN)
58
59
/* stack for exception 1k */
60
#define EXCP_STACK_BASEADDR IRQ_STACK_LIMIT
61
#define EXCP_STACK_LEN 0x400
62
#define EXCP_STACK_LIMIT (EXCP_STACK_BASEADDR + EXCP_STACK_LEN)
63
#define SSB_USE_DTCM_ORIGIN EXCP_STACK_LIMIT
64
65
/* SSB actually used ram */
66
#define SSB_USE_ITCM_LENGTH (APP_ITCM_LENGTH - SSB_FLASH_REGION_LENGTH)
67
#define SSB_USE_ITCM_ORIGIN (MCU_ITCM_END - SSB_USE_ITCM_LENGTH)
68
69
/* ROMLOADER USED TO SAVE ROOTKEY(0x400), SUBPUBKEY CERT(0x800), SSB IMAGE SIGN(0x210) */
70
#define ROMLOADER_USE_ITCM_LENGTH (0x1000)
71
#define ROMLOADER_USE_ITCM_ORIGIN (MCU_ITCM_END - ROMLOADER_USE_ITCM_LENGTH)
72
73
#define ROMLOADER_USE_ROOTKEY_ORIGIN ROMLOADER_USE_ITCM_ORIGIN
74
#define ROMLOADER_USE_ROOTKEY_LENGTH 0x400
75
76
#define ROMLOADER_USE_CERT_ORIGIN (ROMLOADER_USE_ROOTKEY_ORIGIN + ROMLOADER_USE_ROOTKEY_LENGTH)
77
#define ROMLOADER_USE_CERT_LENGTH 0x800
78
79
#define ROMLOADER_USE_SSB_SIGN_ORIGIN (ROMLOADER_USE_CERT_ORIGIN + ROMLOADER_USE_CERT_LENGTH)
80
#define ROMLOADER_USE_SSB_SIGN_LENGTH 0x400
81
82
/* 48 byte for BCPU system clocks status */
83
#define MCPU_SYSTEM_CLOCKS_LENGTH 0x30
84
85
#define BT_OTP_OFFSET 0
86
#define BT_OTP_LENGTH OTP_SIZE_IN_BYTES
87
#define BT_OTP_MIN_LENGTH 5
88
89
/* 0x800 for rsa4096 calculate */
90
#define MCU_RSA_PUBLIC_KEY_LENGTH 0x400
91
#define MCU_RSA_SIGNATURE_LENGTH 0x200
92
#define MCU_RSA_RESULT_LENGTH 0x200
93
#define MCU_RSA_REGION_LENGTH (MCU_RSA_PUBLIC_KEY_LENGTH + MCU_RSA_SIGNATURE_LENGTH + MCU_RSA_RESULT_LENGTH)
94
95
#define MCU_RSA_REGION_ORIGIN (MCU_DTCM_END - MCU_RSA_REGION_LENGTH)
96
#define MCU_RSA_PUBLIC_KEY_ORIGIN MCU_RSA_REGION_ORIGIN
97
#define MCU_RSA_SIGNATURE_ORIGIN (MCU_RSA_PUBLIC_KEY_ORIGIN + MCU_RSA_PUBLIC_KEY_LENGTH)
98
#define MCU_RSA_RESULT_ORIGIN (MCU_RSA_SIGNATURE_ORIGIN + MCU_RSA_SIGNATURE_LENGTH)
99
100
/* 176 bytes for app core preserve region */
101
#define MCU_PRESERVED_REGION_LENGTH 0xfc
102
#define MCU_PRESERVED_REGION_ORIGIN (MCU_RSA_REGION_ORIGIN - MCU_PRESERVED_REGION_LENGTH)
103
104
#if defined VIRTUAL_OTP
105
#define VIRTUAL_OTP_LENGTH (OTP_SIZE_IN_BYTES)
106
#define COM_RAM_ORIGIN 0x87000000
107
#define COM_RAM_LENGTH 0x4000
108
/* Virtual otp range 640KB+96KB - VIRTUAL_OTP_LENGTH -> 640KB+96KB */
109
#define VIRTUAL_OTP_ORIGIN (COM_RAM_ORIGIN + COM_RAM_LENGTH - VIRTUAL_OTP_LENGTH)
110
#endif
111
112
#define MCPU_SYSTEM_CLOCKS_ORIGIN (MCU_PRESERVED_REGION_ORIGIN - MCPU_SYSTEM_CLOCKS_LENGTH)
113
114
#endif
src
drivers
boards
ws63
evb
memory_config
include
ssb_config_common.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8