diff options
Diffstat (limited to 'rom_access_library/library/rom/src')
4 files changed, 32 insertions, 32 deletions
diff --git a/rom_access_library/library/rom/src/ss_sm_boot_access.cpp b/rom_access_library/library/rom/src/ss_sm_boot_access.cpp index 36f3a9f4..44e8a531 100644 --- a/rom_access_library/library/rom/src/ss_sm_boot_access.cpp +++ b/rom_access_library/library/rom/src/ss_sm_boot_access.cpp @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/rom_access_library/library/rom/src/ss_sm_checksum.cpp b/rom_access_library/library/rom/src/ss_sm_checksum.cpp index 39a087ae..52cb1147 100644 --- a/rom_access_library/library/rom/src/ss_sm_checksum.cpp +++ b/rom_access_library/library/rom/src/ss_sm_checksum.cpp @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/rom_access_library/library/rom/src/ss_sm_ram_access.cpp b/rom_access_library/library/rom/src/ss_sm_ram_access.cpp index f101fb4b..b5cf244b 100644 --- a/rom_access_library/library/rom/src/ss_sm_ram_access.cpp +++ b/rom_access_library/library/rom/src/ss_sm_ram_access.cpp @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ #include <fcntl.h> #include <native_service/cl_lock.h> #include <native_service/cl_lockid.h> -//#include <stub/el_mem.h> +#include <stub/el_mem.h> #include "system_service/ss_sm_boot_access.h" #include "ss_rom_access_if_romaccesslibrarylog.h" #include "ss_sm_checksum.h" @@ -29,7 +29,7 @@ -#define RAM_PATH "/nv/romaccess/ramdata.dat" +#define RAM_PATH "/nv/BS/ss/rom_access_library/rwdata/ramdata.dat" #define RAM_OLD_PATH RAM_PATH".old" static const uint8_t kSigNature[] = { 0xDE, 0xAD, 0xBE, 0xEF }; static const uint8_t kMagic[] = { 0xDE, 0xAD, 0xBE, 0xEF }; @@ -56,11 +56,11 @@ void RAM_AccessIf::initRamBackupEnable(RAM_WAKEUP_STATE wupState) { ROM_ACCESS_STATIC_ASERT((sizeof(RAM_SM_DRAM_INFO_t) % sizeof(UI_32)) == 0); if (g_m_bakup_map == MAP_FAILED) { -// g_m_bakup_map = EL_mem_exram_mmap( // LCOV_EXCL_BR_LINE 11:unexpected branch -// EL_MEM_TYPE_REGION_SYS, -// EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_RAM_OFFSET, // LCOV_EXCL_BR_LINE 11:unexpected branch -// SS_SYS_AREA_RAM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, -// EL_MEM_CACHE_INVALID); + g_m_bakup_map = EL_mem_exram_mmap( // LCOV_EXCL_BR_LINE 11:unexpected branch + EL_MEM_TYPE_REGION_SYS, + EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_RAM_OFFSET, // LCOV_EXCL_BR_LINE 11:unexpected branch + SS_SYS_AREA_RAM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + EL_MEM_CACHE_INVALID); // LCOV_EXCL_BR_START 6:impossible to confirm because g_m_bakup_map can not be changed if (g_m_bakup_map == MAP_FAILED) { // LCOV_EXCL_BR_STOP diff --git a/rom_access_library/library/rom/src/ss_sm_rom_access.cpp b/rom_access_library/library/rom/src/ss_sm_rom_access.cpp index 5c70846f..53589c29 100644 --- a/rom_access_library/library/rom/src/ss_sm_rom_access.cpp +++ b/rom_access_library/library/rom/src/ss_sm_rom_access.cpp @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ #include <native_service/frameworkunified_types.h> #include <native_service/frameworkunified_framework_types.h> -//#include <stub/el_mem.h> +#include <stub/el_mem.h> #include <native_service/cl_lock.h> #include <native_service/cl_lockid.h> @@ -38,7 +38,7 @@ #include "ss_sm_checksum.h" #include "ss_rom_access_define.h" -#define ROM_ACCESS_DIR "/nv/romaccess" +#define ROM_ACCESS_DIR "/nv/BS/ss/rom_access_library/rwdata" #define ROM_ACCESS_FILE "romdata.dat" const CHAR kDefaultRomDevice[] = ROM_ACCESS_DIR"/"ROM_ACCESS_FILE; const CHAR kRecoveryRomDevice[] = ROM_ACCESS_DIR"/"ROM_ACCESS_FILE".old"; @@ -259,11 +259,11 @@ EFrameworkunifiedStatus ROM_AccessIf::SystemInitialize(DRAM_BACKUP_STATE bkupSta // LCOV_EXCL_BR_START 6:impossible to confirm because g_m_bakup_map can not be changed if (g_m_bakup_map == MAP_FAILED) { // LCOV_EXCL_BR_STOP -// g_m_bakup_map = EL_mem_exram_mmap( -// EL_MEM_TYPE_REGION_SYS, -// EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_ROM_OFFSET, -// SS_SYS_AREA_ROM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, -// EL_MEM_CACHE_INVALID); + g_m_bakup_map = EL_mem_exram_mmap( + EL_MEM_TYPE_REGION_SYS, + EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_ROM_OFFSET, + SS_SYS_AREA_ROM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + EL_MEM_CACHE_INVALID); if (g_m_bakup_map == MAP_FAILED) { ROM_ACCESS_ERRNO(0); return eFrameworkunifiedStatusFail; @@ -292,11 +292,11 @@ EFrameworkunifiedStatus ROM_AccessIf::Initialize() { CSMChecksum l_checksum; FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+"); if (g_m_bakup_map == MAP_FAILED) { -// g_m_bakup_map = EL_mem_exram_mmap( // LCOV_EXCL_BR_LINE 11:unexpected branch -// EL_MEM_TYPE_REGION_SYS, -// EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_ROM_OFFSET, // LCOV_EXCL_BR_LINE 11:unexpected branch -// SS_SYS_AREA_ROM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, -// EL_MEM_CACHE_INVALID); + g_m_bakup_map = EL_mem_exram_mmap( // LCOV_EXCL_BR_LINE 11:unexpected branch + EL_MEM_TYPE_REGION_SYS, + EL_mem_getOffset(EL_MEM_ID_SYS_BOOT) + SS_SYS_AREA_ROM_OFFSET, // LCOV_EXCL_BR_LINE 11:unexpected branch + SS_SYS_AREA_ROM_MAX_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + EL_MEM_CACHE_INVALID); // LCOV_EXCL_BR_START 6:impossible to confirm because g_m_bakup_map can not be changed if (g_m_bakup_map == MAP_FAILED) { // LCOV_EXCL_BR_STOP @@ -663,14 +663,14 @@ EFrameworkunifiedStatus ROM_AccessIf::GetDataResetModeFast(EDATARESET_MODE* pDat LBM_RAM_t* p_lbm = NULL; mapSize = SS_SYS_AREA_BOOT_MAX_SIZE; -// if (EL_mem_getLength(EL_MEM_ID_SYS_BOOT) < SS_SYS_AREA_BOOT_MAX_SIZE) { // LCOV_EXCL_BR_LINE 11:unexpected branch -// mapSize = EL_mem_getLength(EL_MEM_ID_SYS_BOOT); // LCOV_EXCL_BR_LINE 11:unexpected branch -// } + if (EL_mem_getLength(EL_MEM_ID_SYS_BOOT) < SS_SYS_AREA_BOOT_MAX_SIZE) { // LCOV_EXCL_BR_LINE 11:unexpected branch + mapSize = EL_mem_getLength(EL_MEM_ID_SYS_BOOT); // LCOV_EXCL_BR_LINE 11:unexpected branch + } // LCOV_EXCL_BR_START 11:unexpected branch -// p_map = reinterpret_cast<LBM_RAM_t*>(EL_mem_exram_mmap(EL_MEM_TYPE_REGION_SYS, -// EL_mem_getOffset(EL_MEM_ID_SYS_BOOT), -// mapSize, PROT_READ | PROT_WRITE, -// MAP_SHARED, EL_MEM_CACHE_INVALID)); + p_map = reinterpret_cast<LBM_RAM_t*>(EL_mem_exram_mmap(EL_MEM_TYPE_REGION_SYS, + EL_mem_getOffset(EL_MEM_ID_SYS_BOOT), + mapSize, PROT_READ | PROT_WRITE, + MAP_SHARED, EL_MEM_CACHE_INVALID)); // LCOV_EXCL_BR_STOP if (p_map == MAP_FAILED) { // LCOV_EXCL_BR_LINE 6:impossible to confirm because p_map can not be changed ROM_ACCESS_ERRNO(0); // LCOV_EXCL_BR_LINE 6:impossible to confirm because p_map can not be changed @@ -692,8 +692,8 @@ EFrameworkunifiedStatus ROM_AccessIf::GetDataResetModeFast(EDATARESET_MODE* pDat } // LCOV_EXCL_STOP if (p_map != MAP_FAILED) { // LCOV_EXCL_BR_LINE 6:impossible to confirm because p_map can not be changed -// ROM_ACCESS_ERRNO(0 == EL_mem_exram_munmap(p_map, // LCOV_EXCL_BR_LINE 11:unexpected branch -// mapSize)); + ROM_ACCESS_ERRNO(0 == EL_mem_exram_munmap(p_map, // LCOV_EXCL_BR_LINE 11:unexpected branch + mapSize)); } return eStatus; // LCOV_EXCL_BR_LINE 11:unexpected branch } |