Skip to content

Feature/patch pre crypto#3222

Merged
jforissier merged 6 commits intoOP-TEE:masterfrom
cneveux:feature/patch_pre_crypto
Aug 29, 2019
Merged

Feature/patch pre crypto#3222
jforissier merged 6 commits intoOP-TEE:masterfrom
cneveux:feature/patch_pre_crypto

Conversation

@cneveux
Copy link
Copy Markdown
Contributor

@cneveux cneveux commented Aug 28, 2019

Modification/addition of core features to start integration of HW Cryptographic driver (NXP CAAM HW module).

Add functions sev() and wfe() to implememt assembly instructions
WFE/SEV.

Signed-off-by: Cedric Neveux <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Add registers to handle CAAM clocks

Signed-off-by: Cedric Neveux <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Add DT functions:
dt_get_irq()
  get the interrupt number of a node

dt_disable_status()
  disable the 'status' field of node's prop

dt_enable_secure_status()
  set 'secure-status' field of node's prop and disable
  the 'status' field in the same time

Signed-off-by: Cedric Neveux <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
This change moves the DT pack operation at the end of the generic boot,
in release_external_dt(). This change allows any driver or
initialization function to change the DT and get its content
repacked before DT is accessed by another boot agent.

Signed-off-by: Cedric Neveux <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Add 32 and 64 bits little endian put/get functions

Signed-off-by: Cedric Neveux <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Add the read_ctr_el0 function in the arm64.h file

Signed-off-by: Cedric Neveux <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Copy link
Copy Markdown
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

comments for "core: add DT function to read/modify DT"

Comment thread core/include/kernel/dt.h
*
* Returns 0 on success or -1 on failure
*/
int dt_enable_secure_status(void *fdt, int node);
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.

suggest to rename dt_enable_secure_only_status().

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.

well... dt_enable_secure_only_status() is as confusing as dt_enable_secure_status().
Discard my comment.

Comment thread core/kernel/dt.c
return -1;
}

if (fdt_setprop_string(fdt, node, "secure-status", "okay"))
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.

suggest at line 112:

	assert(!fdt_getprop(fdt, node, "secure-status", &len) ||
	       len >= sizeof("okay"));

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.

I don't understand why, could you explain?

Below is the description of the fdt_setprop_string saying that the property length will be the length of the string to set. Hence the len >= sizeof("okay") will never occurred.

/**

  • fdt_setprop_string - set a property to a string value
  • @fdt: pointer to the device tree blob
  • @nodeoffset: offset of the node whose property to change
  • @name: name of the property to change
  • @str: string value for the property
  • fdt_setprop_string() sets the value of the named property in the
  • given node to the given string value (using the length of the
  • string to determine the new length of the property), or creates a
  • new property with that value if it does not already exist.
  • This function may insert or delete data from the blob, and will
  • therefore change the offsets of some existing nodes.
    */

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.

ok, you're right. discard my comment.

@jforissier jforissier merged commit c462c67 into OP-TEE:master Aug 29, 2019
@cneveux cneveux deleted the feature/patch_pre_crypto branch October 13, 2020 12:57
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.

4 participants