1 /** 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * 15 * Description: Partition manage module -- seperate configuration for each product. 16 */ 17 18 #include <stdint.h> 19 #include <stddef.h> 20 #include "partition.h" 21 #include "partition_porting.h" 22 23 #define PARTITION_START_ADDRESS 0x200380 24 #define uapi_array_size(_array) (sizeof(_array) / sizeof((_array)[0])) 25 26 static partition_path_map_t g_image_path[] = {}; partition_get_addr(void)27uintptr_t partition_get_addr(void) 28 { 29 return PARTITION_START_ADDRESS; 30 } 31 partition_get_path_map(partition_path_map_t ** path_map)32uint32_t partition_get_path_map(partition_path_map_t **path_map) 33 { 34 *path_map = g_image_path; 35 return uapi_array_size(g_image_path); 36 } 37