US20140223052A1 - System and method for slave-based memory protection - Google Patents
System and method for slave-based memory protection Download PDFInfo
- Publication number
- US20140223052A1 US20140223052A1 US14/015,690 US201314015690A US2014223052A1 US 20140223052 A1 US20140223052 A1 US 20140223052A1 US 201314015690 A US201314015690 A US 201314015690A US 2014223052 A1 US2014223052 A1 US 2014223052A1
- Authority
- US
- United States
- Prior art keywords
- transaction
- bus
- task
- mpu
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1416—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
- G06F12/1483—Protection against unauthorised use of memory or access to memory by checking the subject access rights using an access-table, e.g. matrix or list
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1605—Handling requests for interconnection or transfer for access to memory bus based on arbitration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4221—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1052—Security improvement
Definitions
- IEC 61508 addresses functional safety of electrical, electronic, and programmable electronic devices, such as microcontrollers or other computers used to control industrial or other safety critical processes.
- IEC 61508 defines Safety Integrity Levels (SIL) based on a probabilistic analysis of a particular application. To achieve a given SIL, the application, including constituent components, must meet targets for the maximum probability of “dangerous failure” and a minimum “safe failure fraction.” The concept of “dangerous failure” is defined on an application-specific basis, but is based on requirement constraints that are verified for their integrity during the development of the safety critical application.
- SIL Safety Integrity Levels
- the “safe failure fraction” determines capability of the system to manage dangerous failures and compares the likelihood of safe and detected failures with the likelihood of dangerous, undetected failures.
- an electronic device's certification to a particular SIL requires that the electronic device provide a certain level of detection of and resilience to failures as well as enable the safety critical application to transition to a safe state after a failure.
- ISO 26262 Another functional safety standard is ISO 26262, which addresses the functional safety of road vehicles such as automobiles.
- ISO 26262 aims to address possible hazards caused by malfunctioning behavior of automotive electronic and electrical systems. Similar to SILs defined by IEC 61508, ISO 26262 provides an automotive-specific risk-based approach to determine risk classes referred to as Automotive Safety Integrity Levels (ASIL). ASILs are used to specify a particular product's ability to achieve acceptable safety goals.
- ASIL Automotive Safety Integrity Levels
- a safety function is a function whose operation impacts the safety of the process; for example, a closed-loop control system that drives an electric motor used for power steering is a safety function.
- a non-safety function is a function whose operation does not impact the safety of the process; for example, debug functionality built into the electronic device that is used to develop software for the control functions, but is not used when the electronic device is integrated into a vehicle, is a non-safety function.
- a system including a bus slave coupled to a plurality of bus masters via one or more interconnects.
- the system also includes a memory protection unit (MPU) associated with the bus slave, the MPU having a set of access permissions that grants access to the bus slave from a first bus master and denies access to the bus slave from a second bus master.
- the MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
- inventions of the present disclosure are directed to a method including receiving a transaction from a bus master directed at a bus slave, determining whether to grant or deny the transaction access to the bus slave, and generating an error response as a result of determining to deny access to the transaction.
- Still other embodiments of the present disclosure are directed to an electronic device including a bus slave that is memory or a peripheral and first and second bus masters to execute one or more tasks. Each task generates transactions directed at the bus slave.
- the device also includes an interconnect to couple the bus slave to the bus master and a memory protection unit (MPU) associated with the bus slave.
- MPU memory protection unit
- the MPU has a set of access permissions that grants access to the bus slave from the first bus master and denies access to the bus slave from the second bus master.
- the MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
- FIG. 1 shows a block diagram of an exemplary system on a chip (SOC) architecture in accordance with various embodiments
- FIG. 2 shows a block diagram of an exemplary memory protection unit (MPU) in conjunction with a multiple-task bus master in accordance with various embodiments;
- MPU memory protection unit
- FIG. 3 shows a block diagram of an exemplary MPU in conjunction with a single-task bus master in accordance with various embodiments
- FIG. 4 shows a block diagram of an exemplary direct memory access (DMA) controller in conjunction with a multiple-task bus master in accordance with various embodiments;
- DMA direct memory access
- FIG. 5 shows a block diagram of an exemplary MPU in conjunction with a multiple-task bus master with a virtualized hardware scheme in accordance with various embodiments
- FIG. 6 shows a block diagram of multiple exemplary MPUs for slave-based memory protection in accordance with various embodiments.
- FIG. 7 shows a flow chart of a method in accordance with various embodiments.
- reaction refers to a request to read from/write to memory or read from/write to another piece of logic or register.
- bus master refers to a piece of logic that initiates a transaction.
- bus slave refers to a component that receives a transaction; for example, a memory region or a peripheral may be a bus slave.
- interconnect refers to a component that distributes a transaction, for example between bus masters and bus slaves.
- Safety and non-safety function may be implemented, for example, on a system on a chip (SOC) with one or more processor cores and a memory, which may be shared among processor cores.
- SOC system on a chip
- a highest level of safety is achieved when a separate SOC carries out each of the various functions of the electronic device. In this way, the operation of a particular function cannot be impaired or corrupted by other functions since a bus master that implements a particular function cannot access any bus slave(s) other than its own.
- such an approach is cost-prohibitive.
- safety functions may be implemented alongside non-safety functions, for example with multiple functions carried out by a single SOC.
- certain functions should be prevented from interfering with other functions (e.g., a function should be prevented from accessing an address region memory that is not allocated to that function or by sending a transaction to a peripheral that is not allocated to that function).
- Safety functions may be associated with one of a plurality of SILs.
- a safety function with a SIL of 3 may require a high level of safety assurance while a function with a SIL of 2 or lower requires a lower level of safety assurance, while still requiring more safety assurance than a non-safety function. That is, the function with a SIL of 3 presents a greater degree of risk relative to the function with a SIL of 2 (or lower) and as such requires greater risk reduction measures.
- multiple safety functions may have SILs that are independent of each other.
- Various standards require that functions having different SIL ratings should not interfere with one another. Similarly a non-safety critical task must not interfere with a safety critical task.
- a higher-SIL safety function i.e., numerically greater
- FIG. 1 shows a system comprising SOC architecture 100 having multiple functions (also referred to as tasks) implemented by a number of bus masters.
- the SOC architecture 100 may be part of an electronic device that controls a process and performs multiple functions. Certain of the tasks may be safety functions, in some cases having varying SILs, and other of the tasks may be non-safety functions.
- the SOC architecture 100 comprises a CPU 102 implementing tasks A and B, a direct memory access (DMA) engine 104 implementing tasks C and D, and a Universal Serial Bus (USB) controller 106 implementing task E.
- DMA direct memory access
- USB Universal Serial Bus
- the CPU 102 , DMA engine 104 , and USB controller 106 are examples of bus masters.
- the SOC architecture 100 also comprises an interconnect 108 that couples the bus masters 102 , 104 , 106 to exemplary bus slaves, such as random access memory (RAM) 110 and read-only memory (ROM) 112 . Additionally, the interconnect 108 may couple the bus masters 102 , 104 , 106 to peripherals 116 a - 116 n (e.g., a serial port, a general purpose input/output port, or a timer). In some cases, a peripheral interconnect 114 is inserted between the interconnect 108 and the peripherals 116 a - 116 n to further facilitate routing of transactions to the appropriate peripheral 116 a - 116 n.
- peripherals 116 a - 116 n e.g., a serial port, a general purpose input/output port, or a timer.
- a peripheral interconnect 114 is inserted between the interconnect 108 and the peripherals 116 a - 116 n to further facilitate routing of transactions to
- the SOC architecture 100 is exemplary, and it should be appreciated that multiple instances of various bus masters 102 , 104 , 106 may exist within an application-specific SOC. Regardless of the particular implementation, maintaining freedom from interference between various tasks at the bus slave level is important to assure that the device that carries out the various tasks achieves an acceptable level of risk. Additionally, as shown in FIG. 1 , certain bus masters 102 , 104 , 106 implement multiple tasks, some of which may be safety functions and others of which may be non-safety functions, and so maintaining freedom of interference between tasks operating on a single bus master 102 , 104 , 106 is important as well.
- preventing a bus master 102 , 104 , 106 from improperly accessing a certain bus slave may provide further security from interference between tasks executing within the SOC architecture 100 .
- the CPU 102 is shown with a local memory protection unit (MPU) 202 .
- the MPU 202 comprises hardware logic (not shown) that determines whether to grant or deny access to a bus slave on a per transaction basis.
- the hardware logic may comprise various comparators, encoders, decoders and the like that utilize information contained in a transaction to determine whether to grant or deny access to a bus slave.
- a transaction may be an instruction fetch or data access request.
- the MPU 202 may transmit an instruction fetch to an instruction bus, transmit a data access request to a data bus, or transmit either to a mixed instruction and data bus, along with a control signal to identify whether the transaction is an instruction fetch or a data access request. This is shown in FIG. 2 by way of the MPU 202 transmitting the instruction fetch and data access requests separately.
- the interconnect 108 represents the various bus implementations.
- Information contained in the instruction fetch and/or data access request may be used to determine whether to grant or deny access to a bus slave. Additionally, the determination by the MPU 202 of whether to grant or deny access to a bus slave may be based on one or a combination of a number of factors.
- transactions may be isolated based on the address of memory to which the transaction is directed. For example, certain addresses may be protected while other addresses are non-protected.
- a transaction originating from a safety function may be granted access by the MPU 202 to an address that is either protected or non-protected, while a transaction originating from a non-safety function is granted access to an address that is non-protected and denied access to an address that is protected.
- transactions may be isolated based on a privilege level associated with the function or task that generates the transaction.
- certain functions may be “privileged” and other functions may be “non-privileged.”
- Transactions originating from a privileged function may be granted access by the MPU 202 to bus slaves that require a privileged level and transactions originating from a non-privileged function may be denied access to bus slaves that require a privileged level.
- transactions may be isolated based on a security level where some functions comprise trusted code while other functions comprise non-trusted code. Transactions originating from trusted code are granted access by the MPU 202 to secure bus slaves and transactions originating from non-trusted code are denied access to secure bus slaves.
- transactions may be isolated based on a task identification (ID) associated with the function or task that generates the transaction.
- ID a task identification
- the bus master or a CPU 102 may assign a task ID to each task that is running, which can be used by the MPU 202 to discriminate permissions on a per task basis.
- transactions may be isolated based on whether the transaction originated from a function or task executed by a bus master that is a “functional unit” or executed by a bus master that is a “debug unit.”
- the MPU 202 may grant access to certain bus slaves for tasks originating from a functional unit and deny access to those bus slaves for tasks originating from a debug unit.
- address regions of the RAM 110 and/or ROM 112 have associated permissions. If various attributes of a particular function or task satisfy the permission level of the address region, the MPU 202 grants access to a transaction originating from that function or task. If the attributes do not satisfy the permission level of the address region, access is denied.
- the associated MPU 202 is reconfigured when the task being executed changes to support task-based isolation. Configuration of the MPU 202 refers to the access permissions that are applied to the currently-executing task. For example, a memory buffer may belong to a first task.
- the MPU 202 When the CPU 102 is executing the first task, the MPU 202 is configured to grant access to the memory buffer; however, when the CPU 102 switches to a second task, the MPU 202 is reconfigured to prevent access to the memory buffer.
- the MPU 202 may have many stored configurations corresponding to different tasks executed by the CPU 102 . In some embodiments, the MPU 202 may switch configurations based on a different received task ID for a transaction. In other embodiments, such as where the bus master is the CPU 102 , software executing on the CPU 102 that changes the task also reconfigures the MPU 202 .
- the MPU 202 may report the attempted access violation to a system-level monitoring task executing on the CPU 102 .
- the MPU 202 blocks the transaction from occurring, while in other cases the MPU 202 tags the transaction as having an error.
- a response may be generated that mimics a normal response, but which contains false data.
- FIG. 3 shows the USB controller 106 , which is an example of a single-task bus master.
- a MPU 302 similar to the MPU 202 is implemented, although on a simplified basis.
- the USB controller 106 typically accesses only two regions—a transmit buffer and a receive buffer. Additionally, it is not necessary that the MPU 302 implement task-based discrimination since only one task is implemented by the USB controller 106 .
- a MPU 202 , 302 facilitates protection of certain regions of memory and/or certain peripherals by limiting access by lower-level or non-safety functions where appropriate. As a result, an acceptable level of safety is achieved by the overall device on which the SOC architecture 100 is implemented while reducing the cost of the device by implementing many functions on a single SOC.
- the MPU 202 may report the attempted access violation to a system-level monitoring task executing on the CPU 102 .
- the MPU 202 blocks the transaction from occurring, while in other cases the MPU 202 tags the transaction as having an error.
- a response may be generated that mimics a normal response, but which contains false data.
- a non-programmable bus master such as the DMA controller 104
- a bus master such as the CPU 102
- the DMA controller 104 does not execute software to optimize its performance during DMA operations, and thus is non-programmable.
- the DMA controller 104 comprises an integrated MPU 402 .
- the DMA controller 104 is shown as able to implement multiple tasks, namely task C and task D. Each task generates various transactions to access memory 110 , 112 or peripherals 116 a - 116 n .
- the DMA controller 104 includes hardware logic that switches between tasks as needed to perform the required functionality of the DMA controller 104 .
- the MPU 402 is integrated to the DMA controller 104 such that, upon switching from one task to another, the DMA controller 104 causes a configuration of the MPU 402 to switch as well.
- the DMA controller 104 when the DMA controller 104 is executing task C, the DMA controller 104 causes the MPU 402 to operate in a first configuration, while when the DMA controller 104 is executing task D, the DMA controller 104 causes the MPU 402 to operate in a second configuration.
- the MPU 402 regulates access to certain bus slaves in each configuration.
- the MPU 402 may have a different configuration for each task implemented by the DMA controller 104 .
- the DMA controller 104 implements automated task-switching by automatically changing the configuration of the integrated MPU 402 when the DMA controller 104 switches tasks.
- the DMA controller 104 may provide task identification (ID) to the MPU 402 and, as a result of receiving a different task ID, the MPU 402 changes its configuration. This allows the MPU 402 to be less closely integrated to the DMA controller 104 .
- ID task identification
- the MPU 402 determines whether to grant or deny access to a bus slave for that transaction. This determination may be based on the address of memory to which the transaction is directed, a privilege level of the transaction or the task that generates the transaction, or a security level of the task that generates the transaction.
- the DMA controller 104 enables automated task-switching for the MPU 402 configurations to apply different access permissions to each task executed by the DMA controller 104 .
- memory protection is enabled, achieving an acceptable level of risk, even in systems where a non-programmable bus master such as the DMA controller 104 implements multiple tasks, which include safety and non-safety functions.
- a bus master such as the CPU 102
- the CPU 102 may implement multiple instances of virtualized hardware to perform various functions.
- the CPU 102 may contain a first virtual CPU 502 that implements a safety function and a second virtual CPU 504 that implements a non-safety function.
- the CPU ID for a transaction generated by either function would be the same.
- a task ID for a transaction generated by either function may be the same.
- the MPU 202 described above would not be able to differentiate the transactions and a lower-level or non-safety function may be inappropriately granted access to a particular bus slave.
- a virtual CPU ID is associated with each virtual CPU 502 , 504 simulated on the physical CPU 102 .
- a virtual task ID may be associated with each virtual task running on the virtual CPUs 502 , 504 .
- An MPU 506 associated with a bus master that implements virtualized hardware e.g., the physical CPU 102 implementing one or more virtual CPUs 502 , 504 ) grants or denies access to a peripheral, memory region, or other bus slave based on the virtual CPU ID and/or the virtual task ID.
- memory protection is enabled, achieving an acceptable level of risk, even in systems where safety and non-safety functions are implemented in virtualized hardware.
- the physical CPU 102 may execute tasks (e.g., task E) independently of tasks (e.g., tasks A-D) executed by the virtual CPUs 502 , 504 .
- the MPU 506 does not only grant or deny access based on virtual CPU ID or virtual task ID, but rather grants and denies access generally based on virtual CPU ID and CPU ID or virtual task ID and task ID. In this way, the MPU 506 applies an equal permission scheme to CPUs, regardless of whether they are virtual CPUs 502 , 504 or a physical CPU 102 .
- the MPU 506 applies an equal permission scheme to tasks, regardless of whether they are tasks implemented by virtual hardware (i.e., tasks A-D implemented by virtual CPUs 502 , 504 ) or tasks implemented by physical hardware (i.e., task E implemented by CPU 102 ).
- a MPU 604 is positioned in the datapath between a bus slave (e.g., memory 602 ) and an interconnect 108 that transmits data to and from the bus slave 602 .
- a bus slave e.g., memory 602
- interconnect 108 that transmits data to and from the bus slave 602 .
- a MPU 606 is integrated into the interconnect 108 .
- being integrated refers to an interconnect 108 design in which the MPU 606 is included directly into the datapath at the time of design of the interconnect 108 rather than added to the datapath design after the interconnect 108 has been designed.
- the MPU 606 may provide additional capability relative to the MPU 604 , such as reduced latency (i.e., improved overall performance), reduced power consumption, reduced physical size, and improved response time.
- a MPU 608 is integrated into the bus slave 602 itself. Similar to being integrated into the interconnect 108 , in this context, integrated refers to the fact that the MPU 608 is part of the base design of the bus slave 602 itself. Thus, the MPU 608 may be optimized for the behavior of the particular bus slave 602 . As a result, the MPU 608 may be optimized in particular for the bus slave 602 to which it is integrated. For example, optimization such as reduced latency, reduced power consumption, reduced physical size, and improved response time are possible.
- the MPU 604 , 606 , 608 includes a set of access permissions that grants access to the bus slave 602 when certain conditions are met and denies access to the bus slave 602 when at least one of those conditions are not met. More particularly, granting and denying access is often determined on a transaction by transaction basis, where the transaction is generated by a task executing on a bus master.
- the MPU 604 , 606 , 608 may deny access to the bus slave 602 based on an address to which the transaction is directed, a privilege level associated with the task that generated the transaction, a security level associated with the task that generated the transaction, or whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master.
- the MPU 604 , 606 , 608 grants or denies access to the bus slave 602 based on the bus master that generated the transaction. For example, transactions generated by tasks on a first bus master may be generally granted to access the bus slave 602 while transactions generated by tasks on a second bus master are denied access to the bus slave 602 .
- MPUs associated with bus masters e.g., as shown in FIGS. 4 and 5
- MPUs 604 , 606 , 608 associated with bus slaves may differentiate access permissions on a bus master-by-bus master basis.
- the MPU 604 , 606 , 608 may report the attempted access violation to a system-level monitoring task executing on the CPU 102 .
- the MPU 604 , 606 , 608 blocks the transaction from occurring, while in other cases the MPU 604 , 606 , 608 tags the transaction as having an error and generates a bus error response via the interconnect 108 .
- a response may be generated that mimics a normal response, but which contains false data.
- a system-wide memory protection scheme in which MPUs are implemented at both the bus master level and the bus slave level.
- an acceptable level of safety is achieved by the overall device on which the system-wide memory protection scheme (e.g., including SOC architecture 100 ) is implemented while reducing the cost of the device by implementing many functions on a single SOC.
- FIG. 7 shows a method 700 for bus slave-based memory protection, for example where a MPU is positioned in the data stream between a bus slave and an interconnect, integrated to the interconnect, or integrated to the bus slave, in accordance with various embodiments.
- the method 700 contains various steps, which may be performed in an order other than that shown in FIG. 7 .
- the method 700 begins in block 702 with receiving, by a MPU associated with a bus slave, a transaction from a bus master directed at the bus slave.
- the transaction may be generated by a task executing on the bus master, and may be related to a safety function of varying levels or a non-safety function.
- the method 700 continues in block 704 with the MPU determining whether to grant or deny the transaction access to the bus slave. If it is determined to deny the transaction access to the bus slave in block 704 , the method 700 continues in block 706 with generating an error response.
- the error response may include a bus error response (e.g., an error message is transmitted via the interconnect), transmission of false information intended to appear as a normal response, or blocking the transaction from accessing the bus slave.
- Denial of a transaction may occur as a result of an identification of the bus master that generated the transaction, an address to which the transaction is directed, a privilege or security level associated with the task that generated the transaction, or whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master.
- the method 700 may comprise additional steps not shown in FIG. 7 for conciseness.
- the method 700 may further comprise a non-programmable bus master (e.g., a DMA controller) executing first and second tasks, each generating transactions, where hardware logic of the non-programmable bus master switches between executing the first and second tasks.
- the non-programmable bus master may cause a MPU associated with the non-programmable bus master to operate in a first configuration with a first set of access permissions when the hardware logic executes the first task.
- the non-programmable bus master may cause the MPU associated with the non-programmable bus master to operate in a second configuration with a second set of access permissions when the hardware logic executes the second task.
- the method 700 may further comprise a MPU associated with a virtual CPU (implemented on a physical CPU) receiving a transaction from the virtual CPU directed at a bus slave.
- the transaction may be associated with a virtual CPU ID or a virtual task ID.
- the MPU determines whether to grant or deny access to the bus slave based on the virtual CPU ID or the virtual task ID. In either case, the virtual CPU ID or virtual task ID is different than an ID of the physical CPU on which the virtual CPU is implemented or an ID of a task executed on the physical CPU, respectively.
- the method 700 enables bus slave-based memory protection, where access to a bus slave is determined at least party based on the bus master from which a transaction originates. Additionally, the method 700 facilitates a system-wide memory protection scheme, in which MPUs are implemented at both the bus master level and the bus slave level. As a result, an acceptable level of safety is achieved by the overall device on which the system-wide memory protection scheme (e.g., including SOC architecture 100 ) is implemented while reducing the cost of the device by implementing many functions on a single SOC.
- the system-wide memory protection scheme e.g., including SOC architecture 100
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
Abstract
A system includes a bus slave coupled to a plurality of bus masters via one or more interconnects. The system also includes a memory protection unit (MPU) associated with the bus slave, the MPU having a set of access permissions that grants access to the bus slave from a first bus master and denies access to the bus slave from a second bus master. The MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
Description
- The present application claims priority to U.S. Provisional Patent Application No. 61/762,212, filed on Feb. 7, 2013 (Attorney Docket No. TI-73288PS); which is hereby incorporated herein by reference. The present application is also related to co-pending U.S. patent application Ser. No. 14/015,561 (Attorney Docket No. 1962-85400, Titled “System And Method For Per-Task Memory Protection For A Non-Programmable Bus Master), which is hereby incorporated herein by reference in its entirety.
- Various processes are governed by international standards relating to safety and risk reduction. For example, IEC 61508 addresses functional safety of electrical, electronic, and programmable electronic devices, such as microcontrollers or other computers used to control industrial or other safety critical processes. IEC 61508 defines Safety Integrity Levels (SIL) based on a probabilistic analysis of a particular application. To achieve a given SIL, the application, including constituent components, must meet targets for the maximum probability of “dangerous failure” and a minimum “safe failure fraction.” The concept of “dangerous failure” is defined on an application-specific basis, but is based on requirement constraints that are verified for their integrity during the development of the safety critical application. The “safe failure fraction” determines capability of the system to manage dangerous failures and compares the likelihood of safe and detected failures with the likelihood of dangerous, undetected failures. Ultimately, an electronic device's certification to a particular SIL requires that the electronic device provide a certain level of detection of and resilience to failures as well as enable the safety critical application to transition to a safe state after a failure.
- Another functional safety standard is ISO 26262, which addresses the functional safety of road vehicles such as automobiles. ISO 26262 aims to address possible hazards caused by malfunctioning behavior of automotive electronic and electrical systems. Similar to SILs defined by IEC 61508, ISO 26262 provides an automotive-specific risk-based approach to determine risk classes referred to as Automotive Safety Integrity Levels (ASIL). ASILs are used to specify a particular product's ability to achieve acceptable safety goals.
- An electronic device that controls a process—industrial, automotive, or otherwise—may be used to perform multiple functions, some of which are “safety functions” while others are “non-safety functions.” A safety function is a function whose operation impacts the safety of the process; for example, a closed-loop control system that drives an electric motor used for power steering is a safety function. A non-safety function is a function whose operation does not impact the safety of the process; for example, debug functionality built into the electronic device that is used to develop software for the control functions, but is not used when the electronic device is integrated into a vehicle, is a non-safety function.
- The problems noted above are solved in large part by a system including a bus slave coupled to a plurality of bus masters via one or more interconnects. The system also includes a memory protection unit (MPU) associated with the bus slave, the MPU having a set of access permissions that grants access to the bus slave from a first bus master and denies access to the bus slave from a second bus master. The MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
- Other embodiments of the present disclosure are directed to a method including receiving a transaction from a bus master directed at a bus slave, determining whether to grant or deny the transaction access to the bus slave, and generating an error response as a result of determining to deny access to the transaction.
- Still other embodiments of the present disclosure are directed to an electronic device including a bus slave that is memory or a peripheral and first and second bus masters to execute one or more tasks. Each task generates transactions directed at the bus slave. The device also includes an interconnect to couple the bus slave to the bus master and a memory protection unit (MPU) associated with the bus slave. The MPU has a set of access permissions that grants access to the bus slave from the first bus master and denies access to the bus slave from the second bus master. The MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
- For a detailed description of exemplary embodiments of the invention, reference will now be made to the accompanying drawings in which:
-
FIG. 1 shows a block diagram of an exemplary system on a chip (SOC) architecture in accordance with various embodiments; -
FIG. 2 shows a block diagram of an exemplary memory protection unit (MPU) in conjunction with a multiple-task bus master in accordance with various embodiments; -
FIG. 3 shows a block diagram of an exemplary MPU in conjunction with a single-task bus master in accordance with various embodiments; -
FIG. 4 shows a block diagram of an exemplary direct memory access (DMA) controller in conjunction with a multiple-task bus master in accordance with various embodiments; -
FIG. 5 shows a block diagram of an exemplary MPU in conjunction with a multiple-task bus master with a virtualized hardware scheme in accordance with various embodiments; -
FIG. 6 shows a block diagram of multiple exemplary MPUs for slave-based memory protection in accordance with various embodiments; and -
FIG. 7 shows a flow chart of a method in accordance with various embodiments. - Certain terms are used throughout the following description and claims to refer to particular system components. As one skilled in the art will appreciate, companies may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . .” Also, the term “couple” or “couples” is intended to mean either an indirect or direct electrical connection. Thus, if a first device couples to a second device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
- As used herein, the term “transaction” refers to a request to read from/write to memory or read from/write to another piece of logic or register.
- As used herein, the term “bus master” refers to a piece of logic that initiates a transaction.
- As used herein, the term “bus slave” refers to a component that receives a transaction; for example, a memory region or a peripheral may be a bus slave.
- As used herein, the term “interconnect” refers to a component that distributes a transaction, for example between bus masters and bus slaves.
- The following discussion is directed to various embodiments of the invention. Although one or more of these embodiments may be preferred, the embodiments disclosed should not be interpreted, or otherwise used, as limiting the scope of the disclosure, including the claims. In addition, one skilled in the art will understand that the following description has broad application, and the discussion of any embodiment is meant only to be exemplary of that embodiment, and not intended to intimate that the scope of the disclosure, including the claims, is limited to that embodiment.
- Safety and non-safety function may be implemented, for example, on a system on a chip (SOC) with one or more processor cores and a memory, which may be shared among processor cores. In theory, a highest level of safety is achieved when a separate SOC carries out each of the various functions of the electronic device. In this way, the operation of a particular function cannot be impaired or corrupted by other functions since a bus master that implements a particular function cannot access any bus slave(s) other than its own. However, such an approach is cost-prohibitive.
- To reduce the cost of such electronic devices, safety functions may be implemented alongside non-safety functions, for example with multiple functions carried out by a single SOC. However, to maintain an appropriate SIL, certain functions should be prevented from interfering with other functions (e.g., a function should be prevented from accessing an address region memory that is not allocated to that function or by sending a transaction to a peripheral that is not allocated to that function).
- Safety functions may be associated with one of a plurality of SILs. For example, a safety function with a SIL of 3 may require a high level of safety assurance while a function with a SIL of 2 or lower requires a lower level of safety assurance, while still requiring more safety assurance than a non-safety function. That is, the function with a SIL of 3 presents a greater degree of risk relative to the function with a SIL of 2 (or lower) and as such requires greater risk reduction measures. As a result, multiple safety functions may have SILs that are independent of each other. Various standards require that functions having different SIL ratings should not interfere with one another. Similarly a non-safety critical task must not interfere with a safety critical task. Thus, while a non-safety function should be separated such that the non-safety function does not corrupt the safety function(s), a higher-SIL safety function (i.e., numerically greater) should also be separated such that the lower-SIL safety function does not corrupt the higher-SIL safety function.
-
FIG. 1 shows a system comprisingSOC architecture 100 having multiple functions (also referred to as tasks) implemented by a number of bus masters. As explained above, theSOC architecture 100 may be part of an electronic device that controls a process and performs multiple functions. Certain of the tasks may be safety functions, in some cases having varying SILs, and other of the tasks may be non-safety functions. TheSOC architecture 100 comprises aCPU 102 implementing tasks A and B, a direct memory access (DMA)engine 104 implementing tasks C and D, and a Universal Serial Bus (USB)controller 106 implementing taskE. The CPU 102,DMA engine 104, andUSB controller 106 are examples of bus masters. - The
SOC architecture 100 also comprises aninterconnect 108 that couples thebus masters interconnect 108 may couple thebus masters peripheral interconnect 114 is inserted between theinterconnect 108 and the peripherals 116 a-116 n to further facilitate routing of transactions to the appropriate peripheral 116 a-116 n. - The
SOC architecture 100 is exemplary, and it should be appreciated that multiple instances ofvarious bus masters FIG. 1 ,certain bus masters single bus master bus master SOC architecture 100. - Turning to
FIG. 2 , theCPU 102 is shown with a local memory protection unit (MPU) 202. TheMPU 202 comprises hardware logic (not shown) that determines whether to grant or deny access to a bus slave on a per transaction basis. The hardware logic may comprise various comparators, encoders, decoders and the like that utilize information contained in a transaction to determine whether to grant or deny access to a bus slave. For example, a transaction may be an instruction fetch or data access request. TheMPU 202 may transmit an instruction fetch to an instruction bus, transmit a data access request to a data bus, or transmit either to a mixed instruction and data bus, along with a control signal to identify whether the transaction is an instruction fetch or a data access request. This is shown inFIG. 2 by way of theMPU 202 transmitting the instruction fetch and data access requests separately. Theinterconnect 108 represents the various bus implementations. - Information contained in the instruction fetch and/or data access request may be used to determine whether to grant or deny access to a bus slave. Additionally, the determination by the
MPU 202 of whether to grant or deny access to a bus slave may be based on one or a combination of a number of factors. - In some cases, transactions may be isolated based on the address of memory to which the transaction is directed. For example, certain addresses may be protected while other addresses are non-protected. A transaction originating from a safety function may be granted access by the
MPU 202 to an address that is either protected or non-protected, while a transaction originating from a non-safety function is granted access to an address that is non-protected and denied access to an address that is protected. Additionally, in certain embodiments there may be multiple levels of address protection and a higher-level safety function is granted access to any address, while a lower-level safety function is only granted access to certain levels of protected addresses and a non-safety function is only granted access to non-protected addresses. - In other cases, transactions may be isolated based on a privilege level associated with the function or task that generates the transaction. For example, certain functions may be “privileged” and other functions may be “non-privileged.” Transactions originating from a privileged function may be granted access by the
MPU 202 to bus slaves that require a privileged level and transactions originating from a non-privileged function may be denied access to bus slaves that require a privileged level. Similarly, transactions may be isolated based on a security level where some functions comprise trusted code while other functions comprise non-trusted code. Transactions originating from trusted code are granted access by theMPU 202 to secure bus slaves and transactions originating from non-trusted code are denied access to secure bus slaves. - Additionally, transactions may be isolated based on a task identification (ID) associated with the function or task that generates the transaction. For example, the bus master or a
CPU 102 may assign a task ID to each task that is running, which can be used by theMPU 202 to discriminate permissions on a per task basis. Alternately, transactions may be isolated based on whether the transaction originated from a function or task executed by a bus master that is a “functional unit” or executed by a bus master that is a “debug unit.” TheMPU 202 may grant access to certain bus slaves for tasks originating from a functional unit and deny access to those bus slaves for tasks originating from a debug unit. - Referring to
FIGS. 1 and 2 , address regions of theRAM 110 and/orROM 112 have associated permissions. If various attributes of a particular function or task satisfy the permission level of the address region, theMPU 202 grants access to a transaction originating from that function or task. If the attributes do not satisfy the permission level of the address region, access is denied. For certain components that support the execution of more than one task (e.g., CPU 102), the associatedMPU 202 is reconfigured when the task being executed changes to support task-based isolation. Configuration of theMPU 202 refers to the access permissions that are applied to the currently-executing task. For example, a memory buffer may belong to a first task. When theCPU 102 is executing the first task, theMPU 202 is configured to grant access to the memory buffer; however, when theCPU 102 switches to a second task, theMPU 202 is reconfigured to prevent access to the memory buffer. TheMPU 202 may have many stored configurations corresponding to different tasks executed by theCPU 102. In some embodiments, theMPU 202 may switch configurations based on a different received task ID for a transaction. In other embodiments, such as where the bus master is theCPU 102, software executing on theCPU 102 that changes the task also reconfigures theMPU 202. - In the event of an attempted violation of access rules implemented by the
MPU 202, various actions may be taken. For example, theMPU 202 may report the attempted access violation to a system-level monitoring task executing on theCPU 102. In some cases, theMPU 202 blocks the transaction from occurring, while in other cases theMPU 202 tags the transaction as having an error. Further, in security-sensitive applications where a transaction tagged as having an error may provide useful information to a malicious entity attempting to gain access to secure memory, a response may be generated that mimics a normal response, but which contains false data. -
FIG. 3 shows theUSB controller 106, which is an example of a single-task bus master. In the case of a single-task bus master, aMPU 302 similar to theMPU 202 is implemented, although on a simplified basis. For example, theUSB controller 106 typically accesses only two regions—a transmit buffer and a receive buffer. Additionally, it is not necessary that theMPU 302 implement task-based discrimination since only one task is implemented by theUSB controller 106. - In the above examples, a
MPU SOC architecture 100 is implemented while reducing the cost of the device by implementing many functions on a single SOC. - In the event of an attempted violation of access rules implemented by the
MPU 202, various actions may be taken. For example, theMPU 202 may report the attempted access violation to a system-level monitoring task executing on theCPU 102. In some cases, theMPU 202 blocks the transaction from occurring, while in other cases theMPU 202 tags the transaction as having an error. Further, in security-sensitive applications where a transaction tagged as having an error may provide useful information to a malicious entity attempting to gain access to secure memory, a response may be generated that mimics a normal response, but which contains false data. - In accordance with various embodiments, a non-programmable bus master, such as the
DMA controller 104, may implement multiple tasks to perform various functions. Unlike a bus master such as theCPU 102, which may reconfigure itsMPU 202 with software executing tasks on theCPU 102, theDMA controller 104 does not execute software to optimize its performance during DMA operations, and thus is non-programmable. - Turning to
FIG. 4 , theDMA controller 104 comprises anintegrated MPU 402. TheDMA controller 104 is shown as able to implement multiple tasks, namely task C and task D. Each task generates various transactions to accessmemory DMA controller 104 includes hardware logic that switches between tasks as needed to perform the required functionality of theDMA controller 104. TheMPU 402 is integrated to theDMA controller 104 such that, upon switching from one task to another, theDMA controller 104 causes a configuration of theMPU 402 to switch as well. For example, when theDMA controller 104 is executing task C, theDMA controller 104 causes theMPU 402 to operate in a first configuration, while when theDMA controller 104 is executing task D, theDMA controller 104 causes theMPU 402 to operate in a second configuration. As explained above, theMPU 402 regulates access to certain bus slaves in each configuration. TheMPU 402 may have a different configuration for each task implemented by theDMA controller 104. - In some embodiments, the
DMA controller 104 implements automated task-switching by automatically changing the configuration of theintegrated MPU 402 when theDMA controller 104 switches tasks. However, in other embodiments, theDMA controller 104 may provide task identification (ID) to theMPU 402 and, as a result of receiving a different task ID, theMPU 402 changes its configuration. This allows theMPU 402 to be less closely integrated to theDMA controller 104. - As explained above, for a transaction generated by one of the tasks implemented by the
DMA controller 104, theMPU 402 determines whether to grant or deny access to a bus slave for that transaction. This determination may be based on the address of memory to which the transaction is directed, a privilege level of the transaction or the task that generates the transaction, or a security level of the task that generates the transaction. - Thus, the
DMA controller 104 enables automated task-switching for theMPU 402 configurations to apply different access permissions to each task executed by theDMA controller 104. As such, memory protection is enabled, achieving an acceptable level of risk, even in systems where a non-programmable bus master such as theDMA controller 104 implements multiple tasks, which include safety and non-safety functions. - In accordance with various other embodiments, a bus master, such as the
CPU 102, may implement multiple instances of virtualized hardware to perform various functions. Turning toFIG. 5 , theCPU 102 may contain a firstvirtual CPU 502 that implements a safety function and a secondvirtual CPU 504 that implements a non-safety function. However, since both the safety function and the non-safety function are implemented by the same physical CPU (i.e., the CPU 102), the CPU ID for a transaction generated by either function would be the same. Additionally, in some cases a task ID for a transaction generated by either function may be the same. Thus, theMPU 202 described above would not be able to differentiate the transactions and a lower-level or non-safety function may be inappropriately granted access to a particular bus slave. - In accordance with various embodiments, a virtual CPU ID is associated with each
virtual CPU physical CPU 102. Additionally, a virtual task ID may be associated with each virtual task running on thevirtual CPUs MPU 506 associated with a bus master that implements virtualized hardware (e.g., thephysical CPU 102 implementing one or morevirtual CPUs 502, 504) grants or denies access to a peripheral, memory region, or other bus slave based on the virtual CPU ID and/or the virtual task ID. As such, memory protection is enabled, achieving an acceptable level of risk, even in systems where safety and non-safety functions are implemented in virtualized hardware. - Further, the
physical CPU 102 may execute tasks (e.g., task E) independently of tasks (e.g., tasks A-D) executed by thevirtual CPUs MPU 506 does not only grant or deny access based on virtual CPU ID or virtual task ID, but rather grants and denies access generally based on virtual CPU ID and CPU ID or virtual task ID and task ID. In this way, theMPU 506 applies an equal permission scheme to CPUs, regardless of whether they arevirtual CPUs physical CPU 102. Similarly, theMPU 506 applies an equal permission scheme to tasks, regardless of whether they are tasks implemented by virtual hardware (i.e., tasks A-D implemented byvirtual CPUs 502, 504) or tasks implemented by physical hardware (i.e., task E implemented by CPU 102). - Turning now to
FIG. 6 , multiple examples of a slave-based memory protection scheme are shown in accordance with various embodiments. In a first example, aMPU 604 is positioned in the datapath between a bus slave (e.g., memory 602) and aninterconnect 108 that transmits data to and from thebus slave 602. This is simple but limited because, in some cases, the introduction of a MPU not tightly integrated into the datapath may be physically larger, consume more power, and introduce transaction latency as compared to solutions that are optimized for the particular datapath and coupling between theinterconnect 108 and thebus slave 602. - In a second example, a
MPU 606 is integrated into theinterconnect 108. In this context, being integrated refers to aninterconnect 108 design in which theMPU 606 is included directly into the datapath at the time of design of theinterconnect 108 rather than added to the datapath design after theinterconnect 108 has been designed. As a result, theMPU 606 may provide additional capability relative to theMPU 604, such as reduced latency (i.e., improved overall performance), reduced power consumption, reduced physical size, and improved response time. - In a third example, a
MPU 608 is integrated into thebus slave 602 itself. Similar to being integrated into theinterconnect 108, in this context, integrated refers to the fact that theMPU 608 is part of the base design of thebus slave 602 itself. Thus, theMPU 608 may be optimized for the behavior of theparticular bus slave 602. As a result, theMPU 608 may be optimized in particular for thebus slave 602 to which it is integrated. For example, optimization such as reduced latency, reduced power consumption, reduced physical size, and improved response time are possible. - Regardless of the particular location and implementation of the slave-based
MPU MPU bus slave 602 when certain conditions are met and denies access to thebus slave 602 when at least one of those conditions are not met. More particularly, granting and denying access is often determined on a transaction by transaction basis, where the transaction is generated by a task executing on a bus master. For example, theMPU bus slave 602 based on an address to which the transaction is directed, a privilege level associated with the task that generated the transaction, a security level associated with the task that generated the transaction, or whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master. - In some embodiments, the
MPU bus slave 602 based on the bus master that generated the transaction. For example, transactions generated by tasks on a first bus master may be generally granted to access thebus slave 602 while transactions generated by tasks on a second bus master are denied access to thebus slave 602. In this way, while MPUs associated with bus masters (e.g., as shown inFIGS. 4 and 5 ) differentiate access permissions largely on a task-by-task basis from a single bus master whileMPUs - In the event of an attempted violation of access rules implemented by the
MPU MPU CPU 102. In some cases, theMPU MPU interconnect 108. Further, in security-sensitive applications where a transaction tagged as having an error may provide useful information to a malicious entity attempting to gain access to secure memory (e.g., bus slave 602), a response may be generated that mimics a normal response, but which contains false data. - Thus, in some embodiments a system-wide memory protection scheme is disclosed, in which MPUs are implemented at both the bus master level and the bus slave level. As a result, an acceptable level of safety is achieved by the overall device on which the system-wide memory protection scheme (e.g., including SOC architecture 100) is implemented while reducing the cost of the device by implementing many functions on a single SOC.
-
FIG. 7 shows amethod 700 for bus slave-based memory protection, for example where a MPU is positioned in the data stream between a bus slave and an interconnect, integrated to the interconnect, or integrated to the bus slave, in accordance with various embodiments. Themethod 700 contains various steps, which may be performed in an order other than that shown inFIG. 7 . Themethod 700 begins inblock 702 with receiving, by a MPU associated with a bus slave, a transaction from a bus master directed at the bus slave. For example, the transaction may be generated by a task executing on the bus master, and may be related to a safety function of varying levels or a non-safety function. - The
method 700 continues inblock 704 with the MPU determining whether to grant or deny the transaction access to the bus slave. If it is determined to deny the transaction access to the bus slave inblock 704, themethod 700 continues inblock 706 with generating an error response. The error response may include a bus error response (e.g., an error message is transmitted via the interconnect), transmission of false information intended to appear as a normal response, or blocking the transaction from accessing the bus slave. Denial of a transaction, and thus subsequent generation of an error response, may occur as a result of an identification of the bus master that generated the transaction, an address to which the transaction is directed, a privilege or security level associated with the task that generated the transaction, or whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master. - As explained above, in some embodiments a system-wide memory protection scheme is disclosed, in which MPUs are implemented at both the bus master level and the bus slave level. In such embodiments, the
method 700 may comprise additional steps not shown inFIG. 7 for conciseness. For example, themethod 700 may further comprise a non-programmable bus master (e.g., a DMA controller) executing first and second tasks, each generating transactions, where hardware logic of the non-programmable bus master switches between executing the first and second tasks. The non-programmable bus master may cause a MPU associated with the non-programmable bus master to operate in a first configuration with a first set of access permissions when the hardware logic executes the first task. Correspondingly, the non-programmable bus master may cause the MPU associated with the non-programmable bus master to operate in a second configuration with a second set of access permissions when the hardware logic executes the second task. - As another example, the
method 700 may further comprise a MPU associated with a virtual CPU (implemented on a physical CPU) receiving a transaction from the virtual CPU directed at a bus slave. The transaction may be associated with a virtual CPU ID or a virtual task ID. The MPU determines whether to grant or deny access to the bus slave based on the virtual CPU ID or the virtual task ID. In either case, the virtual CPU ID or virtual task ID is different than an ID of the physical CPU on which the virtual CPU is implemented or an ID of a task executed on the physical CPU, respectively. - As a result, the
method 700 enables bus slave-based memory protection, where access to a bus slave is determined at least party based on the bus master from which a transaction originates. Additionally, themethod 700 facilitates a system-wide memory protection scheme, in which MPUs are implemented at both the bus master level and the bus slave level. As a result, an acceptable level of safety is achieved by the overall device on which the system-wide memory protection scheme (e.g., including SOC architecture 100) is implemented while reducing the cost of the device by implementing many functions on a single SOC. - The above discussion is meant to be illustrative of the principles and various embodiments of the present invention. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.
Claims (21)
1. A system, comprising:
a bus slave coupled to a plurality of bus masters via one or more interconnects; and
a memory protection unit (MPU) associated with the bus slave, the MPU having a set of access permissions that grants access to the bus slave from a first bus master and denies access to the bus slave from a second bus master;
wherein the MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
2. The system of claim 1 wherein the error response comprises a bus error response.
3. The system of claim 1 wherein the error response comprises false information.
4. The system of claim 1 wherein the error response comprises blocking the transaction from accessing the bus slave.
5. The system of claim 1 wherein the MPU comprises hardware logic that generates an error response based on one selected from the group consisting of:
an address to which the transaction is directed;
a privilege level associated with the task that generated the transaction;
a security level associated with the task that generated the transaction; and
whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master.
6. The system of claim 1 further comprising:
a non-programmable bus master; and
a MPU associated with the non-programmable bus master, the MPU to operate in a first configuration with a first set of access permissions and a second configuration with a second set of access permissions;
wherein the non-programmable bus master further comprises hardware logic to:
execute a first task and a second task, wherein the tasks generate transactions and wherein the hardware logic switches between executing the first and second tasks;
cause the MPU to operate in the first configuration when the hardware logic executes the first task; and
cause the MPU to operate in the second configuration when the hardware logic executes the second task.
7. The system of claim 1 further comprising:
a virtual central processing unit (CPU); and
a MPU associated with the virtual CPU comprising hardware logic to:
receive a transaction from the virtual CPU directed at the bus slave, the transaction being associated with a virtual CPU identification (ID), wherein the virtual CPU is implemented on a physical CPU; and
determine whether to grant or deny access to the bus slave based on the virtual CPU ID;
wherein the virtual CPU ID is different than an ID of the physical CPU on which the virtual CPU is implemented.
8. The system of claim 1 further comprising:
a virtual central processing unit (CPU); and
a MPU associated with the CPU comprising hardware logic to:
receive a transaction from a virtual central processing unit (CPU) directed at the bus slave, the transaction being associated with a virtual task identification (ID), wherein the virtual CPU is implemented on a physical CPU; and
determine whether to grant or deny access to the bus slave based on the virtual task ID;
wherein the virtual task ID is different than an ID of a task executed on the physical CPU on which the virtual CPU is implemented.
9. A method, comprising:
receiving, by a memory protection unit (MPU) associated with a bus slave, a transaction from a bus master directed at the bus slave;
determining, by the MPU, whether to grant or deny the transaction access to the bus slave; and
generating an error response as a result of determining to deny access to the transaction.
10. The method of claim 9 wherein the error response comprises a bus error response.
11. The method of claim 9 wherein the error response comprises false information.
12. The method of claim 9 wherein the error response comprises blocking the transaction from accessing the bus slave.
13. The method of claim 9 wherein generating an error response occurs based on one selected from the group consisting of:
an identification of the bus master that generated the transaction;
an address to which the transaction is directed;
a privilege level associated with the task that generated the transaction;
a security level associated with the task that generated the transaction; and
whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master.
14. The method of claim 9 further comprising:
executing, by a non-programmable bus master comprising hardware logic, a first task and a second task, wherein the tasks generate transactions and wherein the hardware logic switches between executing the first and second tasks;
causing, by the non-programmable bus master, a MPU associated with the non-programmable bus master to operate in a first configuration with a first set of access permissions when the hardware logic executes the first task; and
causing, by the non-programmable bus master, the MPU associated with the non-programmable bus master to operate a the second configuration with a second set of access permissions when the hardware logic executes the second task.
15. The method of claim 9 further comprising:
receiving, by a MPU associated with a virtual central processing unit (CPU), a transaction from the virtual CPU directed at the bus slave, the transaction being associated with a virtual CPU identification (ID), wherein the virtual CPU is implemented on a physical CPU; and
determining, by the MPU associated with the virtual CPU, whether to grant or deny access to the bus slave based on the virtual CPU ID;
wherein the virtual CPU ID is different than an ID of a physical CPU on which the virtual CPU is implemented.
16. The method of claim 9 further comprising:
receiving, by a MPU associated with a virtual central processing unit (CPU), a transaction from the virtual CPU directed at the bus slave, the transaction being associated with a virtual task identification (ID), wherein the virtual CPU is implemented on a physical CPU; and
determining, by the MPU associated with the virtual CPU, whether to grant or deny access to the bus slave based on the virtual task ID;
wherein the virtual task ID is different than an ID of a task executed on a physical CPU on which the virtual CPU is implemented.
17. An electronic device to control a process, comprising:
a bus slave comprising memory or a peripheral;
first and second bus masters to execute one or more tasks, each task to generate transactions directed at the bus slave;
an interconnect to couple the bus slave to the bus master; and
a memory protection unit (MPU) associated with the bus slave, the MPU having a set of access permissions that grants access to the bus slave from the first bus master and denies access to the bus slave from the second bus master;
wherein the MPU generates an error response as result of a transaction generated by a task on the second bus master attempting to access the bus slave.
18. The electronic device of claim 17 wherein the error response comprises a bus error response.
19. The electronic device of claim 17 wherein the error response comprises false information.
20. The electronic device of claim 17 wherein the error response comprises blocking the transaction from accessing the bus slave.
21. The electronic device of claim 17 wherein the MPU comprises hardware logic that generates an error response based on one selected from the group consisting of:
an address to which the transaction is directed;
a privilege level associated with the task that generated the transaction;
a security level associated with the task that generated the transaction; and
whether the transaction was generated by a functional unit of the bus master or a debug unit of the bus master.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/015,690 US20140223052A1 (en) | 2013-02-07 | 2013-08-30 | System and method for slave-based memory protection |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201361762212P | 2013-02-07 | 2013-02-07 | |
US14/015,690 US20140223052A1 (en) | 2013-02-07 | 2013-08-30 | System and method for slave-based memory protection |
Publications (1)
Publication Number | Publication Date |
---|---|
US20140223052A1 true US20140223052A1 (en) | 2014-08-07 |
Family
ID=51260292
Family Applications (4)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/896,941 Active 2033-10-13 US9170956B2 (en) | 2013-02-07 | 2013-05-17 | System and method for virtual hardware memory protection |
US14/015,561 Active 2035-10-09 US10489332B2 (en) | 2013-02-07 | 2013-08-30 | System and method for per-task memory protection for a non-programmable bus master |
US14/015,690 Abandoned US20140223052A1 (en) | 2013-02-07 | 2013-08-30 | System and method for slave-based memory protection |
US14/827,077 Active US9489332B2 (en) | 2013-02-07 | 2015-08-14 | System and method for virtual hardware memory protection |
Family Applications Before (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/896,941 Active 2033-10-13 US9170956B2 (en) | 2013-02-07 | 2013-05-17 | System and method for virtual hardware memory protection |
US14/015,561 Active 2035-10-09 US10489332B2 (en) | 2013-02-07 | 2013-08-30 | System and method for per-task memory protection for a non-programmable bus master |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/827,077 Active US9489332B2 (en) | 2013-02-07 | 2015-08-14 | System and method for virtual hardware memory protection |
Country Status (2)
Country | Link |
---|---|
US (4) | US9170956B2 (en) |
CN (2) | CN109472173B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160034398A1 (en) * | 2014-07-29 | 2016-02-04 | Freescale Semiconductor, Inc. | Cache-coherent multiprocessor system and a method for detecting failures in a cache-coherent multiprocessor system |
US20160048423A1 (en) * | 2014-08-14 | 2016-02-18 | Arm Limited | Transmission control checking for interconnect circuitry |
US20180039508A1 (en) * | 2014-02-21 | 2018-02-08 | Infineon Technologies Ag | Safety hypervisor function |
US20190073145A1 (en) * | 2017-09-07 | 2019-03-07 | Arm Ip Ltd | Optimized storage protection |
US20230140975A1 (en) * | 2020-03-25 | 2023-05-11 | Arm Limited | Memory system verification |
US11775463B2 (en) | 2021-03-05 | 2023-10-03 | Samsung Electronics Co., Ltd. | System-on-chip and an interconnect bus included in the system on chip |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9170956B2 (en) | 2013-02-07 | 2015-10-27 | Texas Instruments Incorporated | System and method for virtual hardware memory protection |
US9858229B2 (en) | 2014-09-30 | 2018-01-02 | International Business Machines Corporation | Data access protection for computer systems |
CN104391813B (en) * | 2014-10-23 | 2018-01-02 | 山东维固信息科技股份有限公司 | A kind of embedded data security system SOC |
US9619674B2 (en) * | 2014-12-12 | 2017-04-11 | International Business Machines Corporation | Access and protection of I2C interfaces |
JP6486485B2 (en) * | 2015-09-30 | 2019-03-20 | 日立オートモティブシステムズ株式会社 | In-vehicle control device |
US20170180325A1 (en) * | 2015-12-22 | 2017-06-22 | Intel Corporation | Technologies for enforcing network access control of virtual machines |
US10452287B2 (en) | 2016-06-24 | 2019-10-22 | Futurewei Technologies, Inc. | System and method for shared memory ownership using context |
US11416421B2 (en) * | 2016-07-19 | 2022-08-16 | Cypress Semiconductor Corporation | Context-based protection system |
DE102016222695A1 (en) * | 2016-11-17 | 2018-05-17 | Continental Teves Ag & Co. Ohg | Method for automatically and dynamically reconfiguring a memory protection unit and a microcontroller with a memory protection unit |
JP2020177074A (en) * | 2019-04-16 | 2020-10-29 | 株式会社デンソー | Device for vehicle, and method for controlling device for vehicle |
EP4155957A1 (en) * | 2021-09-22 | 2023-03-29 | Thales Dis France SAS | Method for managing access by a thread to a slave device |
JP2024536673A (en) * | 2022-01-06 | 2024-10-08 | マイクロチップ テクノロジー インコーポレイテッド | Peripheral access control using a bitmask indicating peripheral access settings |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300324A1 (en) * | 2007-01-19 | 2009-12-03 | Nec Corporation | Array type processor and data processing system |
US20120023270A1 (en) * | 2009-04-14 | 2012-01-26 | Kouhei Nadehara | Computer system and method of processing computer system |
Family Cites Families (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5669002A (en) * | 1990-06-28 | 1997-09-16 | Digital Equipment Corp. | Multi-processor resource locking mechanism with a lock register corresponding to each resource stored in common memory |
US5917840A (en) * | 1992-03-13 | 1999-06-29 | Foxboro Company | Protection against communications crosstalk in a factory process control system |
US5918248A (en) * | 1996-12-30 | 1999-06-29 | Northern Telecom Limited | Shared memory control algorithm for mutual exclusion and rollback |
US6889378B2 (en) * | 2000-07-24 | 2005-05-03 | Sony Corporation | Information processing method, inter-task communication method, and computer-executable program for the same |
EP1211588B1 (en) * | 2000-12-04 | 2005-09-21 | Siemens Aktiengesellschaft | Method for using a data processing system dependent on an authorization, corresponding data processing system and corresponding program |
US6643759B2 (en) * | 2001-03-30 | 2003-11-04 | Mips Technologies, Inc. | Mechanism to extend computer memory protection schemes |
EP1811387A4 (en) * | 2004-08-25 | 2016-04-13 | Nec Corp | Information communication device, and program execution environment control method |
US20060149918A1 (en) * | 2004-12-30 | 2006-07-06 | Rudelic John C | Memory with modifiable address map |
GB2422926B (en) * | 2005-02-04 | 2008-10-01 | Advanced Risc Mach Ltd | Data processing apparatus and method for controlling access to memory |
US7721151B2 (en) * | 2005-08-30 | 2010-05-18 | Cisco Technology, Inc. | Selective error recovery of processing complex using privilege-level error discrimination |
US7594042B2 (en) * | 2006-06-30 | 2009-09-22 | Intel Corporation | Effective caching mechanism with comparator coupled to programmable registers to store plurality of thresholds in order to determine when to throttle memory requests |
US8380987B2 (en) * | 2007-01-25 | 2013-02-19 | Microsoft Corporation | Protection agents and privilege modes |
US8453142B2 (en) * | 2007-04-26 | 2013-05-28 | Hewlett-Packard Development Company, L.P. | Virtual machine control |
US8024539B2 (en) * | 2008-01-28 | 2011-09-20 | Mips Technologies, Inc. | Virtual processor based security for on-chip memory, and applications thereof |
JP5352848B2 (en) * | 2008-11-28 | 2013-11-27 | 株式会社日立製作所 | Virtual computer control method and computer apparatus |
JP4951106B2 (en) * | 2010-09-30 | 2012-06-13 | 株式会社東芝 | Information processing device |
EP2461251B1 (en) * | 2010-12-03 | 2017-06-21 | Robert Bosch GmbH | Memory protection unit and a method for controlling an access to a memory device |
CN102571698B (en) * | 2010-12-17 | 2017-03-22 | 中国移动通信集团公司 | Access authority control method, system and device for virtual machine |
US9116845B2 (en) * | 2011-02-23 | 2015-08-25 | Freescale Semiconductor, Inc. | Remote permissions provisioning for storage in a cache and device therefor |
CN102332069B (en) * | 2011-08-05 | 2014-02-26 | 道里云信息技术(北京)有限公司 | Method and system for full life cycle security management of virtual machine |
US9170956B2 (en) | 2013-02-07 | 2015-10-27 | Texas Instruments Incorporated | System and method for virtual hardware memory protection |
-
2013
- 2013-05-17 US US13/896,941 patent/US9170956B2/en active Active
- 2013-08-30 US US14/015,561 patent/US10489332B2/en active Active
- 2013-08-30 US US14/015,690 patent/US20140223052A1/en not_active Abandoned
-
2014
- 2014-01-29 CN CN201811405966.8A patent/CN109472173B/en active Active
- 2014-01-29 CN CN201410092365.1A patent/CN103984909B/en active Active
-
2015
- 2015-08-14 US US14/827,077 patent/US9489332B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300324A1 (en) * | 2007-01-19 | 2009-12-03 | Nec Corporation | Array type processor and data processing system |
US20120023270A1 (en) * | 2009-04-14 | 2012-01-26 | Kouhei Nadehara | Computer system and method of processing computer system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180039508A1 (en) * | 2014-02-21 | 2018-02-08 | Infineon Technologies Ag | Safety hypervisor function |
US10592270B2 (en) * | 2014-02-21 | 2020-03-17 | Infineon Technologies Ag | Safety hypervisor function |
US20160034398A1 (en) * | 2014-07-29 | 2016-02-04 | Freescale Semiconductor, Inc. | Cache-coherent multiprocessor system and a method for detecting failures in a cache-coherent multiprocessor system |
US10540284B2 (en) * | 2014-07-29 | 2020-01-21 | Nxp Usa, Inc. | Cache-coherent multiprocessor system and a method for detecting failures in a cache-coherent multiprocessor system |
US20160048423A1 (en) * | 2014-08-14 | 2016-02-18 | Arm Limited | Transmission control checking for interconnect circuitry |
US9880898B2 (en) * | 2014-08-14 | 2018-01-30 | Arm Limited | Transmission control checking for interconnect circuitry |
US20190073145A1 (en) * | 2017-09-07 | 2019-03-07 | Arm Ip Ltd | Optimized storage protection |
US10936211B2 (en) * | 2017-09-07 | 2021-03-02 | Arm Ip Ltd | Optimized storage protection |
US20230140975A1 (en) * | 2020-03-25 | 2023-05-11 | Arm Limited | Memory system verification |
US11775463B2 (en) | 2021-03-05 | 2023-10-03 | Samsung Electronics Co., Ltd. | System-on-chip and an interconnect bus included in the system on chip |
US12130760B2 (en) | 2021-03-05 | 2024-10-29 | Samsung Electronics Co., Ltd. | System-on-chip and an interconnect bus included in the system on chip |
Also Published As
Publication number | Publication date |
---|---|
CN103984909B (en) | 2018-12-21 |
CN109472173B (en) | 2022-10-21 |
US10489332B2 (en) | 2019-11-26 |
US9489332B2 (en) | 2016-11-08 |
US20140223127A1 (en) | 2014-08-07 |
US20140223047A1 (en) | 2014-08-07 |
US9170956B2 (en) | 2015-10-27 |
US20150356046A1 (en) | 2015-12-10 |
CN109472173A (en) | 2019-03-15 |
CN103984909A (en) | 2014-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10489332B2 (en) | System and method for per-task memory protection for a non-programmable bus master | |
EP1742152B1 (en) | Method and system for a multi-sharing memory access control | |
US7444668B2 (en) | Method and apparatus for determining access permission | |
EP1708071B1 (en) | Method and system for detection and neutralization of buffer overflow attacks | |
US8307416B2 (en) | Data structures for use in firewalls | |
US20030172214A1 (en) | Data processing system with peripheral access protection and method therefor | |
US11714647B2 (en) | Resource allocation in a multi-processor system | |
CN110276214B (en) | Dual-core trusted SOC architecture and method based on slave access protection | |
US11288404B2 (en) | Resource protection | |
CN111213144B (en) | Single-chip system, method for operating a single-chip system and motor vehicle | |
US8635685B2 (en) | Value generator coupled to firewall programmable qualifier data structure logics | |
US20240296220A1 (en) | Method and system for freedom from interference (ffi) | |
US7676608B1 (en) | System for extending Multiple Independent Levels of Security (MILS) partitioning to input/output (I/O) devices | |
CN114616566A (en) | Secure hardware programmable architecture | |
US20240320359A1 (en) | System-on-chip including resource isolation framework and countermeasure circuit, and corresponding method | |
US20240338221A1 (en) | Debug In System On A Chip With Securely Partitioned Memory Space | |
CN118689836A (en) | On-chip system including a resource isolation framework and countermeasure circuitry, and corresponding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: TEXAS INSTRUMENTS INCORPORATED, TEXAS Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHAVALI, BALATRIPURA SODEMMA;GREB, KARL FRIEDRICH;SUVARNA, RAJEEV;SIGNING DATES FROM 20130830 TO 20130911;REEL/FRAME:031336/0445 |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- AFTER EXAMINER'S ANSWER OR BOARD OF APPEALS DECISION |