Introduce uefi service component
In preparation for adding authenticated variable support, this
commit adds a service/uefi directory to act as a parent for
uefi related service components. The auth support that will
be added has broader scope than just uefi variables and may
also be used for capsule verification. Because of this,
it will live in its own directory.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: Ie58f6537a8e105dfcf0904c8a80a27bdf219502a
diff --git a/components/service/locator/standalone/services/smm-variable/smm_variable_service_context.h b/components/service/locator/standalone/services/smm-variable/smm_variable_service_context.h
index 10c9880..4420614 100644
--- a/components/service/locator/standalone/services/smm-variable/smm_variable_service_context.h
+++ b/components/service/locator/standalone/services/smm-variable/smm_variable_service_context.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -10,7 +10,7 @@
#include <stddef.h>
#include <stdint.h>
#include <service/locator/standalone/standalone_service_context.h>
-#include <service/smm_variable/provider/smm_variable_provider.h>
+#include <service/uefi/smm_variable/provider/smm_variable_provider.h>
#include <service/secure_storage/backend/secure_storage_client/secure_storage_client.h>
#include <service/secure_storage/backend/mock_store/mock_store.h>
diff --git a/components/service/smm_variable/backend/component.cmake b/components/service/uefi/smm_variable/backend/component.cmake
similarity index 100%
rename from components/service/smm_variable/backend/component.cmake
rename to components/service/uefi/smm_variable/backend/component.cmake
diff --git a/components/service/smm_variable/backend/test/component.cmake b/components/service/uefi/smm_variable/backend/test/component.cmake
similarity index 100%
rename from components/service/smm_variable/backend/test/component.cmake
rename to components/service/uefi/smm_variable/backend/test/component.cmake
diff --git a/components/service/smm_variable/backend/test/variable_index_tests.cpp b/components/service/uefi/smm_variable/backend/test/variable_index_tests.cpp
similarity index 98%
rename from components/service/smm_variable/backend/test/variable_index_tests.cpp
rename to components/service/uefi/smm_variable/backend/test/variable_index_tests.cpp
index 9f3d8dd..b9b81f9 100644
--- a/components/service/smm_variable/backend/test/variable_index_tests.cpp
+++ b/components/service/uefi/smm_variable/backend/test/variable_index_tests.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
#include <CppUTest/TestHarness.h>
-#include <service/smm_variable/backend/variable_index.h>
-#include <service/smm_variable/backend/variable_index_iterator.h>
+#include <service/uefi/smm_variable/backend/variable_index.h>
+#include <service/uefi/smm_variable/backend/variable_index_iterator.h>
TEST_GROUP(UefiVariableIndexTests)
diff --git a/components/service/smm_variable/backend/test/variable_store_tests.cpp b/components/service/uefi/smm_variable/backend/test/variable_store_tests.cpp
similarity index 99%
rename from components/service/smm_variable/backend/test/variable_store_tests.cpp
rename to components/service/uefi/smm_variable/backend/test/variable_store_tests.cpp
index 3408730..3e8b6b2 100644
--- a/components/service/smm_variable/backend/test/variable_store_tests.cpp
+++ b/components/service/uefi/smm_variable/backend/test/variable_store_tests.cpp
@@ -8,7 +8,7 @@
#include <vector>
#include <string.h>
#include <CppUTest/TestHarness.h>
-#include <service/smm_variable/backend/uefi_variable_store.h>
+#include <service/uefi/smm_variable/backend/uefi_variable_store.h>
#include <service/secure_storage/backend/mock_store/mock_store.h>
TEST_GROUP(UefiVariableStoreTests)
diff --git a/components/service/smm_variable/backend/uefi_variable_store.c b/components/service/uefi/smm_variable/backend/uefi_variable_store.c
similarity index 100%
rename from components/service/smm_variable/backend/uefi_variable_store.c
rename to components/service/uefi/smm_variable/backend/uefi_variable_store.c
diff --git a/components/service/smm_variable/backend/uefi_variable_store.h b/components/service/uefi/smm_variable/backend/uefi_variable_store.h
similarity index 100%
rename from components/service/smm_variable/backend/uefi_variable_store.h
rename to components/service/uefi/smm_variable/backend/uefi_variable_store.h
diff --git a/components/service/smm_variable/backend/variable_checker.c b/components/service/uefi/smm_variable/backend/variable_checker.c
similarity index 100%
rename from components/service/smm_variable/backend/variable_checker.c
rename to components/service/uefi/smm_variable/backend/variable_checker.c
diff --git a/components/service/smm_variable/backend/variable_checker.h b/components/service/uefi/smm_variable/backend/variable_checker.h
similarity index 100%
rename from components/service/smm_variable/backend/variable_checker.h
rename to components/service/uefi/smm_variable/backend/variable_checker.h
diff --git a/components/service/smm_variable/backend/variable_index.c b/components/service/uefi/smm_variable/backend/variable_index.c
similarity index 100%
rename from components/service/smm_variable/backend/variable_index.c
rename to components/service/uefi/smm_variable/backend/variable_index.c
diff --git a/components/service/smm_variable/backend/variable_index.h b/components/service/uefi/smm_variable/backend/variable_index.h
similarity index 100%
rename from components/service/smm_variable/backend/variable_index.h
rename to components/service/uefi/smm_variable/backend/variable_index.h
diff --git a/components/service/smm_variable/backend/variable_index_iterator.c b/components/service/uefi/smm_variable/backend/variable_index_iterator.c
similarity index 100%
rename from components/service/smm_variable/backend/variable_index_iterator.c
rename to components/service/uefi/smm_variable/backend/variable_index_iterator.c
diff --git a/components/service/smm_variable/backend/variable_index_iterator.h b/components/service/uefi/smm_variable/backend/variable_index_iterator.h
similarity index 100%
rename from components/service/smm_variable/backend/variable_index_iterator.h
rename to components/service/uefi/smm_variable/backend/variable_index_iterator.h
diff --git a/components/service/smm_variable/client/cpp/component.cmake b/components/service/uefi/smm_variable/client/cpp/component.cmake
similarity index 100%
rename from components/service/smm_variable/client/cpp/component.cmake
rename to components/service/uefi/smm_variable/client/cpp/component.cmake
diff --git a/components/service/smm_variable/client/cpp/smm_variable_client.cpp b/components/service/uefi/smm_variable/client/cpp/smm_variable_client.cpp
similarity index 100%
rename from components/service/smm_variable/client/cpp/smm_variable_client.cpp
rename to components/service/uefi/smm_variable/client/cpp/smm_variable_client.cpp
diff --git a/components/service/smm_variable/client/cpp/smm_variable_client.h b/components/service/uefi/smm_variable/client/cpp/smm_variable_client.h
similarity index 100%
rename from components/service/smm_variable/client/cpp/smm_variable_client.h
rename to components/service/uefi/smm_variable/client/cpp/smm_variable_client.h
diff --git a/components/service/smm_variable/frontend/mm_communicate/component.cmake b/components/service/uefi/smm_variable/frontend/mm_communicate/component.cmake
similarity index 100%
rename from components/service/smm_variable/frontend/mm_communicate/component.cmake
rename to components/service/uefi/smm_variable/frontend/mm_communicate/component.cmake
diff --git a/components/service/smm_variable/frontend/mm_communicate/smm_variable_mm_service.c b/components/service/uefi/smm_variable/frontend/mm_communicate/smm_variable_mm_service.c
similarity index 100%
rename from components/service/smm_variable/frontend/mm_communicate/smm_variable_mm_service.c
rename to components/service/uefi/smm_variable/frontend/mm_communicate/smm_variable_mm_service.c
diff --git a/components/service/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h b/components/service/uefi/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h
similarity index 100%
rename from components/service/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h
rename to components/service/uefi/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h
diff --git a/components/service/smm_variable/frontend/mm_communicate/test/test_smm_variable_mm_service.cpp b/components/service/uefi/smm_variable/frontend/mm_communicate/test/test_smm_variable_mm_service.cpp
similarity index 100%
rename from components/service/smm_variable/frontend/mm_communicate/test/test_smm_variable_mm_service.cpp
rename to components/service/uefi/smm_variable/frontend/mm_communicate/test/test_smm_variable_mm_service.cpp
diff --git a/components/service/smm_variable/frontend/mm_communicate/tests.cmake b/components/service/uefi/smm_variable/frontend/mm_communicate/tests.cmake
similarity index 100%
rename from components/service/smm_variable/frontend/mm_communicate/tests.cmake
rename to components/service/uefi/smm_variable/frontend/mm_communicate/tests.cmake
diff --git a/components/service/smm_variable/provider/component.cmake b/components/service/uefi/smm_variable/provider/component.cmake
similarity index 100%
rename from components/service/smm_variable/provider/component.cmake
rename to components/service/uefi/smm_variable/provider/component.cmake
diff --git a/components/service/smm_variable/provider/smm_variable_provider.c b/components/service/uefi/smm_variable/provider/smm_variable_provider.c
similarity index 100%
rename from components/service/smm_variable/provider/smm_variable_provider.c
rename to components/service/uefi/smm_variable/provider/smm_variable_provider.c
diff --git a/components/service/smm_variable/provider/smm_variable_provider.h b/components/service/uefi/smm_variable/provider/smm_variable_provider.h
similarity index 92%
rename from components/service/smm_variable/provider/smm_variable_provider.h
rename to components/service/uefi/smm_variable/provider/smm_variable_provider.h
index 4c22fab..3e8ddba 100644
--- a/components/service/smm_variable/provider/smm_variable_provider.h
+++ b/components/service/uefi/smm_variable/provider/smm_variable_provider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -9,7 +9,7 @@
#include "rpc/common/endpoint/rpc_service_interface.h"
#include "service/common/provider/service_provider.h"
-#include "service/smm_variable/backend/uefi_variable_store.h"
+#include "service/uefi/smm_variable/backend/uefi_variable_store.h"
#ifdef __cplusplus
extern "C" {
diff --git a/components/service/smm_variable/test/service/component.cmake b/components/service/uefi/smm_variable/test/service/component.cmake
similarity index 100%
rename from components/service/smm_variable/test/service/component.cmake
rename to components/service/uefi/smm_variable/test/service/component.cmake
diff --git a/components/service/smm_variable/test/service/smm_variable_attack_tests.cpp b/components/service/uefi/smm_variable/test/service/smm_variable_attack_tests.cpp
similarity index 98%
rename from components/service/smm_variable/test/service/smm_variable_attack_tests.cpp
rename to components/service/uefi/smm_variable/test/service/smm_variable_attack_tests.cpp
index 330789e..32e5778 100644
--- a/components/service/smm_variable/test/service/smm_variable_attack_tests.cpp
+++ b/components/service/uefi/smm_variable/test/service/smm_variable_attack_tests.cpp
@@ -6,7 +6,7 @@
#include <cstring>
#include <limits>
-#include <service/smm_variable/client/cpp/smm_variable_client.h>
+#include <service/uefi/smm_variable/client/cpp/smm_variable_client.h>
#include <protocols/rpc/common/packed-c/encoding.h>
#include <service_locator.h>
#include <CppUTest/TestHarness.h>
diff --git a/components/service/smm_variable/test/service/smm_variable_service_tests.cpp b/components/service/uefi/smm_variable/test/service/smm_variable_service_tests.cpp
similarity index 99%
rename from components/service/smm_variable/test/service/smm_variable_service_tests.cpp
rename to components/service/uefi/smm_variable/test/service/smm_variable_service_tests.cpp
index af43425..b3ca761 100644
--- a/components/service/smm_variable/test/service/smm_variable_service_tests.cpp
+++ b/components/service/uefi/smm_variable/test/service/smm_variable_service_tests.cpp
@@ -5,7 +5,7 @@
*/
#include <cstring>
-#include <service/smm_variable/client/cpp/smm_variable_client.h>
+#include <service/uefi/smm_variable/client/cpp/smm_variable_client.h>
#include <protocols/rpc/common/packed-c/encoding.h>
#include <service_locator.h>
#include <CppUTest/TestHarness.h>
diff --git a/deployments/component-test/component-test.cmake b/deployments/component-test/component-test.cmake
index 9852ac2..1f5c38a 100644
--- a/deployments/component-test/component-test.cmake
+++ b/deployments/component-test/component-test.cmake
@@ -179,9 +179,9 @@
"components/service/test_runner/provider"
"components/service/test_runner/provider/serializer/packed-c"
"components/service/test_runner/provider/backend/null"
- "components/service/smm_variable/provider"
- "components/service/smm_variable/backend"
- "components/service/smm_variable/backend/test"
+ "components/service/uefi/smm_variable/provider"
+ "components/service/uefi/smm_variable/backend"
+ "components/service/uefi/smm_variable/backend/test"
"components/media/disk"
"components/media/disk/disk_images"
"components/media/disk/formatter"
diff --git a/deployments/libts/linux-pc/CMakeLists.txt b/deployments/libts/linux-pc/CMakeLists.txt
index 32ee621..d3e2912 100644
--- a/deployments/libts/linux-pc/CMakeLists.txt
+++ b/deployments/libts/linux-pc/CMakeLists.txt
@@ -123,8 +123,8 @@
"components/service/test_runner/provider/serializer/packed-c"
"components/service/test_runner/provider/backend/mock"
"components/service/test_runner/provider/backend/simple_c"
- "components/service/smm_variable/backend"
- "components/service/smm_variable/provider"
+ "components/service/uefi/smm_variable/backend"
+ "components/service/uefi/smm_variable/provider"
"components/media/disk"
"components/media/disk/disk_images"
"components/media/disk/formatter"
diff --git a/deployments/smm-gateway/common/smm_gateway.c b/deployments/smm-gateway/common/smm_gateway.c
index 86269fa..329c883 100644
--- a/deployments/smm-gateway/common/smm_gateway.c
+++ b/deployments/smm-gateway/common/smm_gateway.c
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <protocols/rpc/common/packed-c/encoding.h>
-#include <service/smm_variable/provider/smm_variable_provider.h>
+#include <service/uefi/smm_variable/provider/smm_variable_provider.h>
#include <service/secure_storage/backend/secure_storage_client/secure_storage_client.h>
#include <service/secure_storage/backend/mock_store/mock_store.h>
#include <service_locator.h>
diff --git a/deployments/smm-gateway/config/linux-pc/CMakeLists.txt b/deployments/smm-gateway/config/linux-pc/CMakeLists.txt
index 9ee6e49..aaec898 100644
--- a/deployments/smm-gateway/config/linux-pc/CMakeLists.txt
+++ b/deployments/smm-gateway/config/linux-pc/CMakeLists.txt
@@ -52,4 +52,4 @@
include(${TS_ROOT}/components/rpc/common/tests.cmake)
include(${TS_ROOT}/components/rpc/mm_communicate/endpoint/sp/tests.cmake)
-include(${TS_ROOT}/components/service/smm_variable/frontend/mm_communicate/tests.cmake)
+include(${TS_ROOT}/components/service/uefi/smm_variable/frontend/mm_communicate/tests.cmake)
diff --git a/deployments/smm-gateway/env/commonsp/smm_gateway_sp.c b/deployments/smm-gateway/env/commonsp/smm_gateway_sp.c
index 65f5d01..c87e73e 100644
--- a/deployments/smm-gateway/env/commonsp/smm_gateway_sp.c
+++ b/deployments/smm-gateway/env/commonsp/smm_gateway_sp.c
@@ -8,7 +8,7 @@
#include "config/interface/config_store.h"
#include "config/loader/sp/sp_config_loader.h"
#include "components/rpc/mm_communicate/endpoint/sp/mm_communicate_call_ep.h"
-#include "components/service/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h"
+#include "components/service/uefi/smm_variable/frontend/mm_communicate/smm_variable_mm_service.h"
#include "platform/interface/memory_region.h"
#include "protocols/common/mm/mm_smc.h"
#include "ffa_api.h"
diff --git a/deployments/smm-gateway/env/commonsp/smm_gateway_sp.cmake b/deployments/smm-gateway/env/commonsp/smm_gateway_sp.cmake
index 4976bdf..0dc7549 100644
--- a/deployments/smm-gateway/env/commonsp/smm_gateway_sp.cmake
+++ b/deployments/smm-gateway/env/commonsp/smm_gateway_sp.cmake
@@ -26,7 +26,7 @@
"components/rpc/mm_communicate/endpoint/sp"
"components/service/locator/sp"
"components/service/locator/sp/ffa"
- "components/service/smm_variable/frontend/mm_communicate"
+ "components/service/uefi/smm_variable/frontend/mm_communicate"
)
target_sources(smm-gateway PRIVATE
diff --git a/deployments/smm-gateway/smm-gateway.cmake b/deployments/smm-gateway/smm-gateway.cmake
index e3eca34..7921d59 100644
--- a/deployments/smm-gateway/smm-gateway.cmake
+++ b/deployments/smm-gateway/smm-gateway.cmake
@@ -12,8 +12,8 @@
"components/rpc/common/interface"
"components/service/common/include"
"components/service/common/provider"
- "components/service/smm_variable/backend"
- "components/service/smm_variable/provider"
+ "components/service/uefi/smm_variable/backend"
+ "components/service/uefi/smm_variable/provider"
"components/service/secure_storage/include"
"components/service/secure_storage/backend/mock_store"
"protocols/rpc/common/packed-c"
diff --git a/deployments/ts-service-test/linux-pc/CMakeLists.txt b/deployments/ts-service-test/linux-pc/CMakeLists.txt
index 51b7ccb..ed4c363 100644
--- a/deployments/ts-service-test/linux-pc/CMakeLists.txt
+++ b/deployments/ts-service-test/linux-pc/CMakeLists.txt
@@ -88,8 +88,8 @@
"components/common/crc32"
"components/service/test_runner/client/cpp"
"components/service/test_runner/test/service"
- "components/service/smm_variable/client/cpp"
- "components/service/smm_variable/test/service"
+ "components/service/uefi/smm_variable/client/cpp"
+ "components/service/uefi/smm_variable/test/service"
"components/service/block_storage/block_store"
"components/service/block_storage/block_store/client"
"components/service/block_storage/block_store/partitioned"
diff --git a/deployments/uefi-test/uefi-test.cmake b/deployments/uefi-test/uefi-test.cmake
index 2f47891..841127d 100644
--- a/deployments/uefi-test/uefi-test.cmake
+++ b/deployments/uefi-test/uefi-test.cmake
@@ -28,8 +28,8 @@
TARGET "uefi-test"
BASE_DIR ${TS_ROOT}
COMPONENTS
- "components/service/smm_variable/client/cpp"
- "components/service/smm_variable/test/service"
+ "components/service/uefi/smm_variable/client/cpp"
+ "components/service/uefi/smm_variable/test/service"
)
#-------------------------------------------------------------------------------