)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f82e9796ba469be9a451f7ef84a3fd46ea6a1ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3e464cb2_47ad4ac0","updated":"2021-09-11 07:58:32.000000000","message":"Hm.. this is like reduce RAM size available for Linux to let some subsystems fail, to disable DMA.\nFirst of all, the work-are is used not only by flash, but also but target code. And the second point, there is no obvious link for the end user, between RAM allocation and internal logic of some driver.\n\nI would strongly discourage using this kind of workarounds to enable or disable some functionality.","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"62288227ec89574a47dddeba6b47af44bbcf2136","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"36e646c1_010d0fcf","updated":"2021-09-11 05:36:42.000000000","message":"Sorry, Tarek, for commenting this change so late.\n\nIf the workarea is not usable then we can prevent OpenOCD using it by command:\n\n $_TARGETNAME configure -work-area-size 0\n\nand we can re-start using it by similar command with proper size.\nAFAIK this approach works for all target side algorithms.\n\nWhat is purpose of blocking just flash write algo and letting erase check and verify commands to use workarea RAM (which leads to hard fault)?\n\nI\u0027d recommend to revert this change.","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"90a386588349e62ae64b71a8a38a75ff6762a3a4","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"4fb1a6f7_21662e47","in_reply_to":"02ee7741_ae4793b3","updated":"2021-09-11 13:18:29.000000000","message":"\u003e The work-area provide root functionality to allow other components to use extended functionality. If user wont to disable extended functionality for one component, requesting user to disable root functionality is - bad.\n\nCan you give a meaningful example why the user might need to disable the flashloader only and only in stm32l4x driver? Well except the trivial workaround in the case the flashloader simply doesn\u0027t work... (as it currently doesn\u0027t on 64-bit host ;-).\nIf there is such need I have no objection with \u0027flashloader enable|disable\u0027\n\nIMO this command is introduced in the context of STM32L5 TrustZone security.\nTarek wrote:\n\u003e the command is added only to disable the loader in some conditions that could be managed in target configuration files (this could be used in IDE level with STM32L5 in RDP level 0.5, where we are not sure that the configured workarea is non-secure RAM)\n\nOleksij:\n\u003e Configured but not functional work-area is different topic. OpenOCD should test it and use fallback method or provide enough information on what should be done next.\n\nSo it\u0027s clearly this case, the workarea might not be available depending on TZEN and RDP setting. Both verify and erase_check have fallbacks. The only problem when a workarea is configured but not usable that target_run_algorithm() must time out first. So user must wait 3 or more seconds (timeout is computed according to image size) then the slow fallback algo is started.\nBTW: flash write has a fallback too. So again, why an extra command for flashloader only?","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"b03df8d2021c29cda7f9b83b775f9a71cb0b1d2b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"02ee7741_ae4793b3","in_reply_to":"1ff6ac97_6f10f884","updated":"2021-09-11 11:19:42.000000000","message":"The work-area provide root functionality to allow other components to use extended functionality. If user wont to disable extended functionality for one component, requesting user to disable root functionality is - bad.\n\nConfigured but not functional work-area is different topic. OpenOCD should test it and use fallback method or provide enough information on what should be done next.\n\nArgumentation \"it\u0027s not intuitive enough for a beginner, like most of OpenOCD\" to keep it not intuitive is bad too.","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"9d02f8e266b350dc0a578088073818202b7ccc1c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1ff6ac97_6f10f884","in_reply_to":"3e464cb2_47ad4ac0","updated":"2021-09-11 09:55:06.000000000","message":"What do you call workaround?\nThe size of workarea is configured on target layer because it is a property of a target. Zero size has been used for long time to indicate we don\u0027t have a workarea (I admit that it\u0027s not intuitive enough for a beginner, like most of OpenOCD)\n\nSecure RAM means we cannot use it as a workarea. Neither from flash driver neither from any other target code. So \u0027flashloader enable|disable\u0027 as introduced in this change is an ugly workaround as the rest of target code is not aware of this setting.","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"6c66e7779ec650e0061afa75741f84231be96636","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":9,"id":"22bcde82_2566cb46","in_reply_to":"4fb1a6f7_21662e47","updated":"2021-09-11 13:23:37.000000000","message":"Good point, I have no more argumentation :-)\n\nI\u0027ll give some time Tarek and Antonio to respond here.","commit_id":"1247eee4e6e55889b14bec8d81c4748767bb67b8"}],"src/flash/nor/core.c":[{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"eb0935ce08d7c5c42ea1db623a42ce72c39b488e","unresolved":false,"context_lines":[{"line_number":98,"context_line":"{"},{"line_number":99,"context_line":"\tint retval;"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"\tretval \u003d bank-\u003edriver-\u003ewrite(bank, buffer, offset, count);"},{"line_number":102,"context_line":"\tif (retval !\u003d ERROR_OK) {"},{"line_number":103,"context_line":"\t\tLOG_ERROR("},{"line_number":104,"context_line":"\t\t\t\"error writing to flash at address \" TARGET_ADDR_FMT"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_44764cd7","line":101,"range":{"start_line":101,"start_character":1,"end_line":101,"end_character":59},"updated":"2021-05-25 16:04:06.000000000","message":"[1] here, if the call to the underlying driver.write() fails, there is no fall back to any fallback method, just we report the error.","commit_id":"1d4465880ba6281c2cc117fdbb4e23128a766ddd"}],"src/flash/nor/stm32l4x.c":[{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"eb0935ce08d7c5c42ea1db623a42ce72c39b488e","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"\t\tretval \u003d stm32l4_write_block(bank, buffer, offset, count / 8);"},{"line_number":1469,"context_line":"\t}"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"\tif (!stm32l4_info-\u003euse_flashloader || retval \u003d\u003d ERROR_TARGET_RESOURCE_NOT_AVAILABLE) {"},{"line_number":1472,"context_line":"\t\tLOG_INFO(\"falling back to single memory accesses\");"},{"line_number":1473,"context_line":"\t\tretval \u003d stm32l4_write_block_without_loader(bank, buffer, offset, count / 8);"},{"line_number":1474,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"aedf27f1_047844be","line":1471,"range":{"start_line":1471,"start_character":36,"end_line":1471,"end_character":84},"updated":"2021-05-25 16:04:06.000000000","message":"[2]","commit_id":"1d4465880ba6281c2cc117fdbb4e23128a766ddd"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"5c6ade1a501b3d5c8fd13a3f3f5b587eb1ad2e26","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"\tif (CMD_ARGC \u003d\u003d 2)"},{"line_number":2092,"context_line":"\t\tCOMMAND_PARSE_ENABLE(CMD_ARGV[1], stm32l4_info-\u003euse_flashloader);"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"\tLOG_INFO(\"FlashLoader usage is %s\", stm32l4_info-\u003euse_flashloader ? \"enabled\" : \"disabled\");"},{"line_number":2095,"context_line":""},{"line_number":2096,"context_line":"\treturn ERROR_OK;"},{"line_number":2097,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"2ecb373e_0b9b7d1c","line":2094,"updated":"2021-08-14 05:30:49.000000000","message":"The idea of LOG_* commands is the ability to disable it. In case of LOG_INFO is disable, part of this command will be not functional. Instead, command_print() should be used.\nPlease review you other patches if proper print version is used.","commit_id":"f6656351f95ec3068005cd3ff4b6d68335d688a5"},{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"a269d96adf955d5d83a21901a87d0c62bd911e36","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"\tif (CMD_ARGC \u003d\u003d 2)"},{"line_number":2092,"context_line":"\t\tCOMMAND_PARSE_ENABLE(CMD_ARGV[1], stm32l4_info-\u003euse_flashloader);"},{"line_number":2093,"context_line":""},{"line_number":2094,"context_line":"\tLOG_INFO(\"FlashLoader usage is %s\", stm32l4_info-\u003euse_flashloader ? \"enabled\" : \"disabled\");"},{"line_number":2095,"context_line":""},{"line_number":2096,"context_line":"\treturn ERROR_OK;"},{"line_number":2097,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"2ecb373e_0e806b4a","line":2094,"in_reply_to":"2ecb373e_0b9b7d1c","updated":"2021-08-14 13:32:14.000000000","message":"Done","commit_id":"f6656351f95ec3068005cd3ff4b6d68335d688a5"}]}
