1 /*
2  * Copyright (c) 2019, Cypress Semiconductor Corporation. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __PC_CONFIG_H__
19 #define __PC_CONFIG_H__
20 
21 /* Which PC is used for what */
22 /* PC=0 : romboot (CM0+) */
23 /* PC=1 : BL2/SPM (CM0+) */
24 #define CY_PROT_SPM_DEFAULT     CY_PROT_PC1
25 /* PC=2 : unused (secure) */
26 /* PC=3 : unused (secure) */
27 /* PC=4 : unused (secure) */
28 /* PC=5 : unused (non-secure) */
29 /* PC=6 : non-secure code (CM4) */
30 #define CY_PROT_HOST_DEFAULT    CY_PROT_PC6
31 /* PC=7 : Test Controller */
32 #define CY_PROT_TC              CY_PROT_PC7
33 
34 #define ONLY_BL2_SPM_MASK       CY_PROT_PCMASK1
35 #define SECURE_PCS_MASK         (CY_PROT_PCMASK1 | CY_PROT_PCMASK2 | CY_PROT_PCMASK3 | \
36                                  CY_PROT_PCMASK4)
37 #define HOST_PCS_MASK           (CY_PROT_PCMASK5 | CY_PROT_PCMASK6)
38 #define TC_PC_MASK              CY_PROT_PCMASK7
39 #define ALL_PCS_EXCEPT_TC_MASK  (CY_PROT_PCMASK1 | CY_PROT_PCMASK2 | CY_PROT_PCMASK3 | \
40                                  CY_PROT_PCMASK4 | CY_PROT_PCMASK5 | CY_PROT_PCMASK6)
41 #define ALL_PCS_MASK            (CY_PROT_PCMASK1 | CY_PROT_PCMASK2 | CY_PROT_PCMASK3 | \
42                                  CY_PROT_PCMASK4 | CY_PROT_PCMASK5 | CY_PROT_PCMASK6 | CY_PROT_PCMASK7)
43 #endif /* __PC_CONFIG_H__ */
44 
45