From c925f9973f8afe1b4a869f323f455967739608b9 Mon Sep 17 00:00:00 2001 From: Alessandro Angelino Date: Mon, 21 Mar 2016 10:04:59 +0000 Subject: [PATCH 1/6] Remove outdated redirection header files --- uvisor-lib/benchmark.h | 23 ----------------------- uvisor-lib/box_config.h | 23 ----------------------- uvisor-lib/debug.h | 23 ----------------------- uvisor-lib/debug_exports.h | 23 ----------------------- uvisor-lib/disabled.h | 23 ----------------------- uvisor-lib/error.h | 23 ----------------------- uvisor-lib/halt_exports.h | 23 ----------------------- uvisor-lib/interrupts.h | 23 ----------------------- uvisor-lib/register_gateway.h | 23 ----------------------- uvisor-lib/secure_access.h | 23 ----------------------- uvisor-lib/secure_gateway.h | 23 ----------------------- uvisor-lib/svc_exports.h | 23 ----------------------- uvisor-lib/svc_gw_exports.h | 23 ----------------------- uvisor-lib/unvic_exports.h | 23 ----------------------- uvisor-lib/uvisor_exports.h | 23 ----------------------- uvisor-lib/vmpu_exports.h | 23 ----------------------- 16 files changed, 368 deletions(-) delete mode 100644 uvisor-lib/benchmark.h delete mode 100644 uvisor-lib/box_config.h delete mode 100644 uvisor-lib/debug.h delete mode 100644 uvisor-lib/debug_exports.h delete mode 100644 uvisor-lib/disabled.h delete mode 100644 uvisor-lib/error.h delete mode 100644 uvisor-lib/halt_exports.h delete mode 100644 uvisor-lib/interrupts.h delete mode 100644 uvisor-lib/register_gateway.h delete mode 100644 uvisor-lib/secure_access.h delete mode 100644 uvisor-lib/secure_gateway.h delete mode 100644 uvisor-lib/svc_exports.h delete mode 100644 uvisor-lib/svc_gw_exports.h delete mode 100644 uvisor-lib/unvic_exports.h delete mode 100644 uvisor-lib/uvisor_exports.h delete mode 100644 uvisor-lib/vmpu_exports.h diff --git a/uvisor-lib/benchmark.h b/uvisor-lib/benchmark.h deleted file mode 100644 index b24403c..0000000 --- a/uvisor-lib/benchmark.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_BENCHMARK_H__ -#define __UVISOR_LIB_BENCHMARK_H__ - -#warning "Deprecated: Do not include uvisor-lib/benchmark.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/benchmark.h" - -#endif /* __UVISOR_LIB_BENCHMARK_H__ */ diff --git a/uvisor-lib/box_config.h b/uvisor-lib/box_config.h deleted file mode 100644 index 464291f..0000000 --- a/uvisor-lib/box_config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_BOX_CONFIG_H__ -#define __UVISOR_LIB_BOX_CONFIG_H__ - -#warning "Deprecated: Do not include uvisor-lib/box_config.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/box_config.h" - -#endif /* __UVISOR_LIB_BOX_CONFIG_H__ */ diff --git a/uvisor-lib/debug.h b/uvisor-lib/debug.h deleted file mode 100644 index c100ce4..0000000 --- a/uvisor-lib/debug.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_DEBUG_H__ -#define __UVISOR_LIB_DEBUG_H__ - -#warning "Deprecated: Do not include uvisor-lib/debug.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/debug.h" - -#endif /* __UVISOR_LIB_DEBUG_H__ */ diff --git a/uvisor-lib/debug_exports.h b/uvisor-lib/debug_exports.h deleted file mode 100644 index 63efcf7..0000000 --- a/uvisor-lib/debug_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_DEBUG_EXPORTS_H__ -#define __UVISOR_LIB_DEBUG_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/debug_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/debug_exports.h" - -#endif /* __UVISOR_LIB_DEBUG_EXPORTS_H__ */ diff --git a/uvisor-lib/disabled.h b/uvisor-lib/disabled.h deleted file mode 100644 index 3577d42..0000000 --- a/uvisor-lib/disabled.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_DISABLED_H__ -#define __UVISOR_LIB_DISABLED_H__ - -#warning "Deprecated: Do not include uvisor-lib/disabled.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/disabled.h" - -#endif /* __UVISOR_LIB_DISABLED_H__ */ diff --git a/uvisor-lib/error.h b/uvisor-lib/error.h deleted file mode 100644 index 04c05c5..0000000 --- a/uvisor-lib/error.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_ERROR_H__ -#define __UVISOR_LIB_ERROR_H__ - -#warning "Deprecated: Do not include uvisor-lib/error.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/error.h" - -#endif /* __UVISOR_LIB_ERROR_H__ */ diff --git a/uvisor-lib/halt_exports.h b/uvisor-lib/halt_exports.h deleted file mode 100644 index da8f44a..0000000 --- a/uvisor-lib/halt_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_HALT_EXPORTS_H__ -#define __UVISOR_LIB_HALT_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/halt_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/halt_exports.h" - -#endif /* __UVISOR_LIB_HALT_EXPORTS_H__ */ diff --git a/uvisor-lib/interrupts.h b/uvisor-lib/interrupts.h deleted file mode 100644 index 21bf899..0000000 --- a/uvisor-lib/interrupts.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_INTERRUPTS_H__ -#define __UVISOR_LIB_INTERRUPTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/interrupts.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/interrupts.h" - -#endif /* __UVISOR_LIB_INTERRUPTS_H__ */ diff --git a/uvisor-lib/register_gateway.h b/uvisor-lib/register_gateway.h deleted file mode 100644 index 992b2e3..0000000 --- a/uvisor-lib/register_gateway.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_REGISTER_GATEWAY_H__ -#define __UVISOR_LIB_REGISTER_GATEWAY_H__ - -#warning "Deprecated: Do not include uvisor-lib/register_gateway.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/register_gateway.h" - -#endif /* __UVISOR_LIB_REGISTER_GATEWAY_H__ */ diff --git a/uvisor-lib/secure_access.h b/uvisor-lib/secure_access.h deleted file mode 100644 index eef90c4..0000000 --- a/uvisor-lib/secure_access.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_SECURE_ACCESS_H__ -#define __UVISOR_LIB_SECURE_ACCESS_H__ - -#warning "Deprecated: Do not include uvisor-lib/secure_access.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/secure_access.h" - -#endif /* __UVISOR_LIB_SECURE_ACCESS_H__ */ diff --git a/uvisor-lib/secure_gateway.h b/uvisor-lib/secure_gateway.h deleted file mode 100644 index a1f0c2c..0000000 --- a/uvisor-lib/secure_gateway.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_SECURE_GATEWAY_H__ -#define __UVISOR_LIB_SECURE_GATEWAY_H__ - -#warning "Deprecated: Do not include uvisor-lib/secure_gateway.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/secure_gateway.h" - -#endif /* __UVISOR_LIB_SECURE_GATEWAY_H__ */ diff --git a/uvisor-lib/svc_exports.h b/uvisor-lib/svc_exports.h deleted file mode 100644 index 51e17c8..0000000 --- a/uvisor-lib/svc_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_SVC_EXPORTS_H__ -#define __UVISOR_LIB_SVC_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/svc_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/svc_exports.h" - -#endif /* __UVISOR_LIB_SVC_EXPORTS_H__ */ diff --git a/uvisor-lib/svc_gw_exports.h b/uvisor-lib/svc_gw_exports.h deleted file mode 100644 index 8d1f2e8..0000000 --- a/uvisor-lib/svc_gw_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_SVC_GW_EXPORTS_H__ -#define __UVISOR_LIB_SVC_GW_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/svc_gw_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/svc_gw_exports.h" - -#endif /* __UVISOR_LIB_SVC_GW_EXPORTS_H__ */ diff --git a/uvisor-lib/unvic_exports.h b/uvisor-lib/unvic_exports.h deleted file mode 100644 index 1a2084a..0000000 --- a/uvisor-lib/unvic_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_UNVIC_EXPORTS_H__ -#define __UVISOR_LIB_UNVIC_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/unvic_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/unvic_exports.h" - -#endif /* __UVISOR_LIB_UNVIC_EXPORTS_H__ */ diff --git a/uvisor-lib/uvisor_exports.h b/uvisor-lib/uvisor_exports.h deleted file mode 100644 index 7f63530..0000000 --- a/uvisor-lib/uvisor_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_UVISOR_EXPORTS_H__ -#define __UVISOR_LIB_UVISOR_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/uvisor_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/uvisor_exports.h" - -#endif /* __UVISOR_LIB_UVISOR_EXPORTS_H__ */ diff --git a/uvisor-lib/vmpu_exports.h b/uvisor-lib/vmpu_exports.h deleted file mode 100644 index b11bea4..0000000 --- a/uvisor-lib/vmpu_exports.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_VMPU_EXPORTS_H__ -#define __UVISOR_LIB_VMPU_EXPORTS_H__ - -#warning "Deprecated: Do not include uvisor-lib/vmpu_exports.h directly. Instead, include uvisor-lib/uvisor-lib.h." -#include "uvisor/api/inc/vmpu_exports.h" - -#endif /* __UVISOR_LIB_VMPU_EXPORTS_H__ */ From 4447c1313b00fd28c35ac23044467a08720b9eed Mon Sep 17 00:00:00 2001 From: Alessandro Angelino Date: Mon, 21 Mar 2016 13:19:53 +0000 Subject: [PATCH 2/6] Remove unsupported.* files They are moved to ARMmbed/uvisor, since they are general enough to be kept in the main uVisor code-base. --- source/unsupported.c | 23 ----- uvisor-lib/unsupported.h | 195 --------------------------------------- 2 files changed, 218 deletions(-) delete mode 100644 source/unsupported.c delete mode 100644 uvisor-lib/unsupported.h diff --git a/source/unsupported.c b/source/unsupported.c deleted file mode 100644 index c339efb..0000000 --- a/source/unsupported.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "uvisor-lib/uvisor-lib.h" - -/* uVisor hook for unsupported platforms */ -UVISOR_EXTERN void __attribute__((section(".uvisor.main"))) uvisor_init(void) -{ - return; -} diff --git a/uvisor-lib/unsupported.h b/uvisor-lib/unsupported.h deleted file mode 100644 index 577ea8e..0000000 --- a/uvisor-lib/unsupported.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2015-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __UVISOR_LIB_UNSUPPORTED_H__ -#define __UVISOR_LIB_UNSUPPORTED_H__ - -#include "uvisor/api/inc/uvisor_exports.h" -#include - -/* uVisor hook for unsupported platforms */ -UVISOR_EXTERN void uvisor_init(void); - -/******************************************************************************* - * Re-definitions from: - ******************************************************************************/ - -/* uvisor-lib/box-config.h */ - -UVISOR_EXTERN const uint32_t __uvisor_mode; - -#define UVISOR_DISABLED 0 - -#define UVISOR_SET_MODE(mode) \ - UVISOR_SET_MODE_ACL_COUNT(mode, NULL, 0) - -#define UVISOR_SET_MODE_ACL(mode, acl_list) \ - UVISOR_SET_MODE_ACL_COUNT(mode, acl_list, UVISOR_ARRAY_COUNT(acl_list)) - -#define UVISOR_SET_MODE_ACL_COUNT(mode, acl_list, acl_list_count) \ - UVISOR_EXTERN const uint32_t __uvisor_mode = UVISOR_DISABLED; \ - static const void *main_acl = acl_list; \ - extern const __attribute__((section(".keep.uvisor.cfgtbl_ptr_first"), aligned(4))) void * const main_cfg_ptr = &main_acl; - -#define __UVISOR_BOX_CONFIG_NOCONTEXT(box_name, acl_list, stack_size) \ - static const void *box_acl_ ## box_name = acl_list; \ - extern const __attribute__((section(".keep.uvisor.cfgtbl_ptr"), aligned(4))) void * const box_name ## _cfg_ptr = &box_acl_ ## box_name; - -#define __UVISOR_BOX_CONFIG_CONTEXT(box_name, acl_list, stack_size, context_type) \ - context_type box_ctx_ ## box_name; \ - context_type * const uvisor_ctx = &box_ctx_ ## box_name; \ - static const void *box_acl_ ## box_name = acl_list; \ - const __attribute__((section(".keep.uvisor.cfgtbl_ptr"), aligned(4))) volatile void *box_name ## _cfg_ptr = \ - &box_acl_ ## box_name; - -#define __UVISOR_BOX_MACRO(_1, _2, _3, _4, NAME, ...) NAME -#define UVISOR_BOX_CONFIG(...) \ - __UVISOR_BOX_MACRO(__VA_ARGS__, __UVISOR_BOX_CONFIG_CONTEXT, \ - __UVISOR_BOX_CONFIG_NOCONTEXT)(__VA_ARGS__) - -#define UVISOR_BOX_CONFIG_ACL(...) UVISOR_BOX_CONFIG(__VA_ARGS__) - -#define UVISOR_BOX_CONFIG_CTX(...) UVISOR_BOX_CONFIG(__VA_ARGS__) - -/* uvisor-lib/interrupts.h */ - -#define vIRQ_SetVector(irqn, vector) NVIC_SetVector((IRQn_Type) (irqn), (uint32_t) (vector)) -#define vIRQ_GetVector(irqn) NVIC_GetVector((IRQn_Type) (irqn)) -#define vIRQ_EnableIRQ(irqn) NVIC_EnableIRQ((IRQn_Type) (irqn)) -#define vIRQ_DisableIRQ(irqn) NVIC_DisableIRQ((IRQn_Type) (irqn)) -#define vIRQ_ClearPendingIRQ(irqn) NVIC_ClearPendingIRQ((IRQn_Type) (irqn)) -#define vIRQ_SetPendingIRQ(irqn) NVIC_SetPendingIRQ((IRQn_Type) (irqn)) -#define vIRQ_GetPendingIRQ(irqn) NVIC_GetPendingIRQ((IRQn_Type) (irqn)) -#define vIRQ_SetPriority(irqn, priority) NVIC_SetPriority((IRQn_Type) (irqn), (uint32_t) (priority)) -#define vIRQ_GetPriority(irqn) NVIC_GetPriority((IRQn_Type) (irqn)) - -/* uvisor-lib/register_gateway.h */ - -#define UVISOR_OP_READ(op) (op) -#define UVISOR_OP_WRITE(op) ((1 << 4) | (op)) -#define UVISOR_OP_NOP 0x0 -#define UVISOR_OP_AND 0x1 -#define UVISOR_OP_OR 0x2 -#define UVISOR_OP_XOR 0x3 - -/* Default mask for whole register operatins */ -#define __UVISOR_OP_DEFAULT_MASK 0x0 - -static inline UVISOR_FORCEINLINE uint32_t uvisor_read(uint32_t addr, uint32_t op, uint32_t mask) -{ - switch(op) - { - case UVISOR_OP_READ(UVISOR_OP_NOP): - return *((uint32_t *) addr); - case UVISOR_OP_READ(UVISOR_OP_AND): - return *((uint32_t *) addr) & mask; - case UVISOR_OP_READ(UVISOR_OP_OR): - return *((uint32_t *) addr) | mask; - case UVISOR_OP_READ(UVISOR_OP_XOR): - return *((uint32_t *) addr) ^ mask; - default: - /* FIXME */ - return 0; - } -} - -#define uvisor_read(addr) uvisor_read((uint32_t) (addr), UVISOR_OP_READ(UVISOR_OP_NOP), __UVISOR_OP_DEFAULT_MASK) - -static inline UVISOR_FORCEINLINE void uvisor_write(uint32_t addr, uint32_t val, uint32_t op, uint32_t mask) -{ - switch(op) - { - case UVISOR_OP_WRITE(UVISOR_OP_NOP): - *((uint32_t *) addr) = val; - case UVISOR_OP_WRITE(UVISOR_OP_AND): - *((uint32_t *) addr) &= val | ~mask; - case UVISOR_OP_WRITE(UVISOR_OP_OR): - *((uint32_t *) addr) |= val & mask; - case UVISOR_OP_WRITE(UVISOR_OP_XOR): - *((uint32_t *) addr) ^= val & mask; - default: - /* FIXME */ - return; - } -} - -#define uvisor_write(addr, val) uvisor_write((uint32_t) (addr), (uint32_t) (val), \ - UVISOR_OP_WRITE(UVISOR_OP_NOP), __UVISOR_OP_DEFAULT_MASK) - -/* uvisor-lib/secure_access.h */ - -/* The conditional statement will be optimised away since the compiler already - * knows the sizeof(type). */ -#define ADDRESS_READ(type, addr) \ - (sizeof(type) == 4 ? uvisor_read32((volatile uint32_t *) (addr)) : \ - sizeof(type) == 2 ? uvisor_read16((volatile uint16_t *) (addr)) : \ - sizeof(type) == 1 ? uvisor_read8((volatile uint8_t *) (addr)) : 0) - -/* The switch statement will be optimised away since the compiler already knows - * the sizeof(type). */ -#define ADDRESS_WRITE(type, addr, val) \ - { \ - switch(sizeof(type)) \ - { \ - case 4: \ - uvisor_write32((volatile uint32_t *) (addr), (uint32_t) (val)); \ - break; \ - case 2: \ - uvisor_write16((volatile uint16_t *) (addr), (uint16_t) (val)); \ - break; \ - case 1: \ - uvisor_write8((volatile uint8_t *) (addr), (uint8_t) (val)); \ - break; \ - } \ - } - -#define UNION_READ(type, addr, fieldU, fieldB) ((*((volatile type *) (addr))).fieldB) - -static inline UVISOR_FORCEINLINE void uvisor_write32(uint32_t volatile *addr, uint32_t val) -{ - *(addr) = val; -} - -static inline UVISOR_FORCEINLINE void uvisor_write16(uint16_t volatile *addr, uint16_t val) -{ - *(addr) = val; -} - -static inline UVISOR_FORCEINLINE void uvisor_write8(uint8_t volatile *addr, uint8_t val) -{ - *(addr) = val; -} - -static inline UVISOR_FORCEINLINE uint32_t uvisor_read32(uint32_t volatile *addr) -{ - return *(addr); -} - -static inline UVISOR_FORCEINLINE uint16_t uvisor_read16(uint16_t volatile *addr) -{ - return *(addr); -} - -static inline UVISOR_FORCEINLINE uint8_t uvisor_read8(uint8_t volatile *addr) -{ - return *(addr); -} - -/* uvisor-lib/secure_gateway.h */ - -#define secure_gateway(dst_box, dst_fn, ...) dst_fn(__VA_ARGS__) - -#endif /* __UVISOR_LIB_UNSUPPORTED_H__ */ From 62308b7afea15de53221ba81543f60513ee605cd Mon Sep 17 00:00:00 2001 From: Alessandro Angelino Date: Mon, 21 Mar 2016 13:20:48 +0000 Subject: [PATCH 3/6] Translate yotta-specific symbols to uVisor ones With this commit uvisor-lib/uvisor-lib.h becomes a wrapper to uvisor/api/inc/uvisor-lib.h. This latter file is included after all yotta-specific symbols have been translated into uVisor ones. This currently includes the following symbols: * UVISOR_PRESENT * ARCH_MPU_{ARMv7M, KINETIS} --- uvisor-lib/uvisor-lib.h | 43 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/uvisor-lib/uvisor-lib.h b/uvisor-lib/uvisor-lib.h index 0a2437b..593c6cb 100644 --- a/uvisor-lib/uvisor-lib.h +++ b/uvisor-lib/uvisor-lib.h @@ -17,38 +17,31 @@ #ifndef __UVISOR_LIB_UVISOR_LIB_H__ #define __UVISOR_LIB_UVISOR_LIB_H__ -/* This file includes all the uVisor library header files at once. - * Some files are included depending on the whether uVisor is supported on the - * target or not. */ - -/* Note: uvisor-lib/override.h should never be included automatically, but only - * when needed to explicitly override symbols in a source file. See the - * file's comments for further information. */ +/* This file translates yotta-specific pre-processor symbols into + * uVisor-specific ones. Then the main uvisor-lib.h file is included. */ #if defined(YOTTA_CFG_UVISOR_PRESENT) && YOTTA_CFG_UVISOR_PRESENT == 1 -#include "uvisor/api/inc/benchmark.h" -#include "uvisor/api/inc/box_config.h" -#include "uvisor/api/inc/debug.h" -#include "uvisor/api/inc/disabled.h" -#include "uvisor/api/inc/error.h" -#include "uvisor/api/inc/interrupts.h" -#include "uvisor/api/inc/register_gateway.h" -#include "uvisor/api/inc/secure_access.h" -#include "uvisor/api/inc/secure_gateway.h" +#define UVISOR_PRESENT 1 + +/* Specify the MPU architecture */ +#if defined(TARGET_LIKE_ARMV7_M) + +#if defined(TARGET_LIKE_KINETIS) +#define ARCH_MPU_KINETIS +#else +#define ARCH_MPU_ARMv7M +#endif + +#endif /* defined(TARGET_LIKE_ARMV7_M) */ #else /* defined(YOTTA_CFG_UVISOR_PRESENT) && YOTTA_CFG_UVISOR_PRESENT == 1 */ -#include "uvisor-lib/unsupported.h" +/* There is no need to specify any other symbol if uVisor is unsupported. */ +#define UVISOR_PRESENT 0 -#endif /* defined(YOTTA_CFG_UVISOR_PRESENT) && YOTTA_CFG_UVISOR_PRESENT == 1 */ +#endif /* define(YOTTA_CFG_UVISOR_PRESENT) && YOTTA_CFG_UVISOR_PRESENT == 1 */ -#include "uvisor/api/inc/debug_exports.h" -#include "uvisor/api/inc/halt_exports.h" -#include "uvisor/api/inc/svc_exports.h" -#include "uvisor/api/inc/svc_gw_exports.h" -#include "uvisor/api/inc/unvic_exports.h" -#include "uvisor/api/inc/uvisor_exports.h" -#include "uvisor/api/inc/vmpu_exports.h" +#include "uvisor/api/inc/uvisor-lib.h" #endif /* __UVISOR_LIB_UVISOR_LIB_H__ */ From 7028c8f07901d5f0c5cfbccf2f7d4a29dd123d4d Mon Sep 17 00:00:00 2001 From: Alessandro Angelino Date: Mon, 21 Mar 2016 13:22:42 +0000 Subject: [PATCH 4/6] Build unsupported.c if not UVISOR_SUPPORTED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now unsupported.c is located in the uVisor main code-base. It is only built by yotta if uVisor is not supported on the current target. Otherwise, the uVisor release library (*.a) is included — as usual. --- source/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index fce16c2..1cb4770 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -20,6 +20,7 @@ # uVisor paths set(UVISOR_ROOT "${CMAKE_CURRENT_LIST_DIR}/../uvisor") set(UVISOR_API_LIB "${UVISOR_ROOT}/api/lib") +set(UVISOR_API_SRC "${UVISOR_ROOT}/api/src") # Detect the yotta build mode. if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") @@ -50,9 +51,8 @@ if(UVISOR_SUPPORTED) add_library(uvisor-lib) target_link_libraries(uvisor-lib ${UVISOR_API_LIB}/${UVISOR_FAMILY}/${UVISOR_MODE}/${UVISOR_CONFIGURATION}.a) else() - # uvisor-lib source files - file(GLOB UVISOR_LIB_SRC "${CMAKE_CURRENT_LIST_DIR}/*.c") - add_library(uvisor-lib ${UVISOR_LIB_SRC}) + # Build unsupported.c + add_library(uvisor-lib ${UVISOR_API_SRC}/unsupported.c) message(WARNING "\n ********************************************************************* From 075cae3dd96a8a840e4293b4c3ca294beb502f2c Mon Sep 17 00:00:00 2001 From: ccli8 Date: Tue, 3 May 2016 10:59:05 +0800 Subject: [PATCH 5/6] Support Nuvoton NUC472 and M451 --- source/support_nuvoton.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 source/support_nuvoton.cmake diff --git a/source/support_nuvoton.cmake b/source/support_nuvoton.cmake new file mode 100644 index 0000000..817a5c7 --- /dev/null +++ b/source/support_nuvoton.cmake @@ -0,0 +1,28 @@ +########################################################################### +# +# Copyright (c) 2016-2017, Nuvoton, All Rights Reserved +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +########################################################################### + +if(TARGET_LIKE_NUC472 OR TARGET_LIKE_NUC442) + # Nuvoton NUC472/442 series + set(UVISOR_FAMILY "nuc472") + set(UVISOR_CONFIGURATION "configuration_nuc472_m4_0x20000000_0x0") +elseif(TARGET_LIKE_M451 OR TARGET_LIKE_M452 OR TARGET_LIKE_M453) + # Nuvoton M451 series + set(UVISOR_FAMILY "m451") + set(UVISOR_CONFIGURATION "configuration_m451_m4_0x20000000_0x0") +endif() From 04fa92bbf6bfeb6f2b69b8672239873766643aa1 Mon Sep 17 00:00:00 2001 From: Milosch Meriac Date: Mon, 25 Jul 2016 17:55:58 +0100 Subject: [PATCH 6/6] Deprecate uVisor for yotta - point to new repository --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0bd8f36..7f3961b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +> **This library is deprecated and kept for historic purposed: please refer to the [main repository](https://github.com/ARMmbed/uvisor) for more information**. + # The `uvisor-lib` library This is a yotta module that provides a packaged version of uVisor for use in ARM mbed OS.