Skip to content

os: Support ss partition powercut function of bk7239n#7281

Open
Poly-J wants to merge 3 commits intoSamsung:masterfrom
bekencorp:secu_dev
Open

os: Support ss partition powercut function of bk7239n#7281
Poly-J wants to merge 3 commits intoSamsung:masterfrom
bekencorp:secu_dev

Conversation

@Poly-J
Copy link
Copy Markdown
Contributor

@Poly-J Poly-J commented Apr 16, 2026

Based on the new partitioning, the layout of the SS partition has been readapted and the powercut function is supported.

Copy link
Copy Markdown
Contributor

@ewoodev ewoodev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove ss.bin in this repo

Comment thread os/se/armino/security_armino_wrapper_tz.c
@xiaotao-yuan
Copy link
Copy Markdown
Contributor

please remove ss.bin in this repo

hi @ewoodev
This ss.bin was generated based on the demo file secure_storage. csv. As the generated script is closed source, placing this file is only for testing the secure storage function.

@@ -2851,7 +2851,7 @@ int armino_hal_write_storage(uint32_t ss_idx, hal_data *data)
TFM_NSC_UNLOCK();
if (ret != 0) {
dbg("Failed to write storage: %d\n", ret);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jylee9613 Regardless of this PR, could you check se specific dbg? The dbg is only way for here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Poly-J , There are sedbg and selldbg. so please use them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcs1265 Thank you for your feedback. I have replaced all the 'dbg' in the file with 'sedbg'.


#define HWRAP_TAG "[ARMINO_HAL_WRAPPER]"
#define HWRAP_ENTER do { dbg(HWRAP_TAG"%s:%d\n", __FILE__, __LINE__); } while (0)
#define HWRAP_ENTER do { sedbg(HWRAP_TAG"%s:%d\n", __FILE__, __LINE__); } while (0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Let's split the commit to replace dbg to sedbg. It's different topic.
  2. xxvdbg for information, xxdbg for error. You changed all to sedbg. But many things are information. Could you use them differently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunghan-chang Thank you for the reminder, I have added another commit.


if (key_idx < FACTORY_KEY_INDEX_MAX) {
dbg("Key index %d (0-31) for factory key\n", key_idx);
sedbg("Key index %d (0-31) for factory key\n", key_idx);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not print this information. Let's use read only instead of factory

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are another locations for that. Need to modify as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have already made the changes

@ewoodev
Copy link
Copy Markdown
Contributor

ewoodev commented Apr 17, 2026

please remove ss.bin in this repo

hi @ewoodev , This ss.bin was generated based on the demo file secure_storage. csv. As the generated script is closed source, placing this file is only for testing the secure storage function.

yes, The generated scripte is in closed source, so we don't need to open ss.bin here also. Please remove this file.

@xiaotao-yuan
Copy link
Copy Markdown
Contributor

please remove ss.bin in this repo

hi @ewoodev , This ss.bin was generated based on the demo file secure_storage. csv. As the generated script is closed source, placing this file is only for testing the secure storage function.

yes, The generated scripte is in closed source, so we don't need to open ss.bin here also. Please remove this file.

hi @ewoodev
We use ss.bin for internal testing. During compilation, when beken-utils does not exist, the file in this path is used for testing. If you feel that there is no need to place this file, we will specifically delete it in the next PR

ewoodev
ewoodev previously approved these changes Apr 17, 2026
Copy link
Copy Markdown
Contributor

@ewoodev ewoodev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build/tools/armino: Support ss partition powercut function of bk7239n

please remove this commit in this PR. and let's remove ss.bin next PR.

jun.pan added 3 commits April 17, 2026 17:45
Change the return value of the interface so that when an error occurs,
the internal error code is directly displayed, making it easier to locate the problem.
Use sedbg and sevdbg to distinguish different log information.
Since implementing the powercut function for the ss partition changed
the logic in tfm, it is necessary to synchronously update the closed-source tfm library.
Copy link
Copy Markdown
Contributor

@jylee9613 jylee9613 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked it works properly with new ss.bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants