Skip to content

Allow hardware specific region-ACL extensions #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2016
Merged

Allow hardware specific region-ACL extensions #320

merged 2 commits into from
Sep 2, 2016

Conversation

meriac
Copy link
Contributor

@meriac meriac commented Sep 2, 2016

  • Enables hardware specific region-ACL extensions
  • Move subregion configuration into HW-specific ACLs:
    • For K64F DMA Busmaster overrides are possible
    • For ARMv7-M Subregions can be defined- Enables access to box 0 memories by the Ethernet peripheral
  • Background region privileges reduced to Core and Debugger

@AlessandroA

vmpu_mpu_set_static_acl(1, FLASH_ORIGIN, (uint32_t) __uvisor_config.secure_end - FLASH_ORIGIN,
UVISOR_TACL_SREAD |
UVISOR_TACL_SEXECUTE |
UVISOR_TACL_UREAD |
UVISOR_TACL_UEXECUTE |
UVISOR_TACL_USER);
UVISOR_TACL_USER,
0x4UL<<18);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add spaces in 0x4UL << 18)? (also in the other occurrence below)

BTW, do we want to provide an interface/macro for selecting a certain bus master or to set the K64F-specific ACLs? The hardcoded numbers are not very user-friendly. If we don't want to do it now we can add and issue/story.

@meriac
Copy link
Contributor Author

meriac commented Sep 2, 2016

@AlessandroA I fixed the spacing problem. I would like to avoid though macros for now for the hw-specific ACLs, as they are currently only used in this two lines plus I don't want to make this "as thing".

/* Allow uVisor-internal code to extend permissions for certain
* ACLs by hardware-specific ACLs like DMA busmaster access.
* Ensure that core ACLs are specified trough the generic ACL
* method b masking it out. */
Copy link
Contributor

Choose a reason for hiding this comment

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

-    * method b masking it out. */
+    * method by masking it out. */

Move subregion configuration into HW-specific ACLs:
- For K64F DMA Busmaster overrides are possible
- For ARMv7-M Subregions can be defined
@AlessandroA
Copy link
Contributor

LGTM 👍

@sherrellbc
Copy link

DMA confirmed to work (see #315) to/from box 0 using LwIP as a test case (the original motivation for this patch). Other problems related to managing mutually exclusive memory (mutex) at run-time have now manifested as either a side-effect of this patch or as something previously unknown and un-tested. See the above quoted git issue for more information.

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.

3 participants