INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.Apache-2.0 DESTINATION ${HAL_LICENSE_DIR}/${PROJECT_NAME})
-ADD_SUBDIRECTORY(hw/display)
\ No newline at end of file
+ADD_SUBDIRECTORY(hw/display)
+ADD_SUBDIRECTORY(hw/memory)
\ No newline at end of file
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(hal-backend-device-memory C)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(hal-backend-device-memory_pkgs REQUIRED dlog)
+
+FOREACH(flag ${hal-backend-device-memory_pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_LIBRARY(${PROJECT_NAME} MODULE memory.c)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${hal-backend-device-memory_pkgs_LDFLAGS})
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${HAL_LIB_DIR} COMPONENT RuntimeLibraries)
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#include <hal/hal-device-memory-interface.h>
+#include <hal/hal-common-interface.h>
+
+#include "hal-backend-device-visionfive2-common.h"
+
+static int memory_get_gpu_info(const int pid, hal_device_memory_gpu_info_s *info)
+{
+ return -ENODEV;
+}
+
+static int memory_get_gem_info(const int pid, hal_device_memory_gem_info_s *info)
+{
+ return -ENODEV;
+}
+
+static int memory_init(void **data)
+{
+ hal_backend_device_memory_funcs *device_memory_funcs;
+
+ if (!data) {
+ _E("Invalid parameter");
+ return -EINVAL;
+ }
+
+ device_memory_funcs = *(hal_backend_device_memory_funcs **) data;
+ if (!device_memory_funcs)
+ return -EINVAL;
+
+ device_memory_funcs->get_gpu_info = memory_get_gpu_info;
+ device_memory_funcs->get_gem_info = memory_get_gem_info;
+
+ return 0;
+}
+
+static int memory_exit(void *data)
+{
+ return 0;
+}
+
+hal_backend EXPORT hal_backend_device_memory_data = {
+ .name = "memory",
+ .vendor = "VisionFive2",
+ .init = memory_init,
+ .exit = memory_exit,
+ .major_version = 1,
+ .minor_version = 0,
+};