Processing system and method for processing instructions
By separating the host processor and the policy execution processor in the computer processor, and using the policy execution processor to verify whether the instructions comply with the security policy, the problem of bad actors evading security policies is solved, and the system's security and processing efficiency are improved.
Patent Information
- Application Number
- CN201980011533.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-02-02
- Filing Date
- 2019-02-01
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-02-01
AI Technical Summary
Existing computer processors find it difficult to effectively prevent bad actors from evading security policies by modifying metadata tags and security policies, which leads to threatening system security.
Design a processing system that includes a host processor and a policy execution processor. The host processor executes instructions constrained by metadata tags and security policies, but does not allow access to metadata tags and security policies. The policy execution processor is responsible for verifying the instructions. Whether the security policy is compliant and write the instructions to memory before executing them.
By separating processor tasks, the security and efficiency of computer processors are improved, bad actors are prevented from evading security policies, and the security verification and execution of instructions are achieved.
Smart Images

Figure CN112041837B_ABST
Abstract
Description
[0001] Related Applications
[0002] This application claims the benefit of U.S. Provisional Application No. 62 / 625,634, filed on February 2, 2018. The entire teachings of the above application are incorporated herein by reference. Background Art
[0003] The present invention generally relates to systems and methods for policy execution processing, for example, for implementing security policies. Computer processors including electronic circuits configured to execute one or more computer program instructions are known. In addition, it is known to implement security policies to prevent computer processors from compromising sensitive information. Summary of the invention
[0004] In one aspect, the present invention relates to a processing system, the processing system comprising a host processing domain, the host processing domain comprising a host processor. The host processor may be configured to receive at least one instruction, the instruction comprising (i) operand information related to one or more operands, and (ii) operation information indicating an operation to be performed on the one or more operands. The host processor may also be configured to perform the operation indicated in the operation information on the one or more operands to generate operation output information, and provide the instruction information and the operation output information to the metadata processing domain. The metadata processing domain may include a write chain, the write chain may be configured to receive the operation output information from the host processing domain, and put the operation output information into a queue. The metadata processing domain may also include a volume tag processing unit, the volume tag processing unit is configured to receive the instruction information from the host processing domain, and use the instruction information to obtain one or more input metadata tags associated with at least one instruction. The volume tag processing unit may also determine whether to allow the at least one instruction based on one or more policies enforced and based on one or more input metadata tags associated with the at least one instruction. The volume tag processing unit may, in response to determining that the instruction is allowed, cause the write-chained queue to write the operation output information to the memory in a manner that associates the operation output information with at least one output metadata tag.
[0005] The volume tag processing unit may include a rule cache configured to store one or more rule entries for at least one of the one or more policies enforced by the metadata processing domain.
[0006] Determining that the instruction is allowed may include determining that the rule cache stores a rule entry that matches one or more input metadata tags associated with the at least one instruction. The tag processing unit may be configured to use information stored in the rule entry to provide at least one output metadata tag associated with the operation output information.
[0007] The metadata processing domain may include a policy execution processor. Determining that the instruction is allowed may include (i) determining that a rule cache does not store a rule entry that matches one or more input metadata tags associated with at least one instruction, (ii) in response to determining that the rule cache does not store a rule entry that matches one or more input metadata tags associated with at least one instruction, providing the policy execution processor with the one or more input metadata tags associated with the at least one instruction, and (iii) receiving from the policy execution processor at least one output metadata tag to be associated with operation output information.
[0008] The policy execution processor may be configured to receive one or more input metadata tags associated with at least one instruction from the volume tag processing unit, and execute the policy code for the one or more input metadata tags associated with the at least one instruction to determine whether to allow the at least one instruction. In response to determining that the at least one instruction is allowed, the policy execution processor may also be configured to install a rule entry into the rule cache based on the one or more input metadata tags associated with the at least one instruction and the at least one output metadata tag.
[0009] The policy enforcement processor may be configured to perform secure boot operations. The policy enforcement processor may include a boot ROM storing one or more public keys, and having code that can (i) read an image from an external memory device, authenticate and decrypt the image using the one or more public keys, and enable the host processor to continue its boot process after successful authentication and decryption.
[0010] The boot operation may include holding the host processor in a reset state upon reset. The policy execution processor may (i) begin execution at a reset vector of the policy execution processor, (ii) activate policy software into the policy execution processor's own memory space, (iii) configure one or more memory structure protection configuration buffers to define memory regions accessible to each initiator to protect a region of memory to hold a policy data segment, (iv) initialize the policy data segment, (v) copy a boot loader for the host processor from an external memory device to main storage; and (vii) release the host processor from the reset state.
[0011] The host processor may also be configured to provide update information indicating one or more updates to the state of the host processor to the metadata processing domain as a result of executing at least one instruction. The metadata processing domain may also be configured to, in response to a decision to allow the at least one instruction, use the update information to update a shadow buffer configured to store a shadow copy of the host processing domain to the most recently allowed instruction. The at least one instruction may include a first instruction. The instruction information may include first instruction information, and the one or more input metadata tags include one or more first input metadata tags. The tag processing unit may also be configured to (i) receive second instruction information related to a second instruction executed by the host processor from the host processing domain, (ii) use the second instruction information to obtain one or more second input metadata tags associated with the second instruction, (iii) determine whether to allow the second instruction based on the one or more policies executed and based on the one or more second metadata tags associated with the second instruction, and (iv) in response to a decision not to allow the second instruction, transmit one or more turnaround signals to the host processing domain to restore the state of the host processing domain to the shadow copy of the host processing domain.
[0012] One or more input metadata tags may not be accessible to the host processor.
[0013] The instruction information may include at least one piece of information selected from the group consisting of (i) information indicating an instruction type of at least one instruction, (ii) information indicating a memory address at which the at least one instruction is obtained, (iii) information indicating one or more caches used by at least one instruction, and (iv) information indicating a memory address referenced by at least one instruction.
[0014] In another aspect, the present disclosure relates to a processing system, comprising: an application processing domain, the application processing domain comprising: an application processor, the application processor configured to implement a first instruction set architecture; and receiving an instruction including operand information indicating one or more operands, and operation information indicating an operation to be performed on the one or more operands. The instruction may be formatted according to the first instruction set architecture. The application processing domain may also provide the instruction in the instruction stream to the metadata processing domain. The metadata processing domain may include a tag processing unit, and the tag processing unit may include at least one decoding table. The tag processing unit may be configured to extract the operand information and extract the operation information from the instruction.
[0015] The tag processing unit may include at least one lookup table configured to determine instruction care bit information indicating one or more care bits and operation group information indicating an operation group based on the instruction.
[0016] The tag processing unit may also be configured to determine whether the instruction is formatted according to the first instruction set architecture based on at least one decode table. The determination that the instruction is formatted according to the first instruction set architecture may be further based on instruction attention bit information indicating one or more attention bits and operation group information indicating an operation group. The at least one decode table may include a series of tables including at least a primary table, a secondary table, and a plurality of address lookup tables.
[0017] The tag processing unit may further include a buffer interface configured to store instructions from the application processor when the tag processing unit is stopped and provide the stored instructions for use by the tag processing unit when the instruction flow is stopped. The buffer interface may include a first-in-first-out (FIFO) component.
[0018] The tag processing unit may also include a tag mapping table (TMT) configured to convert one or both of a physical instruction address and a data storage page address into: (i) a corresponding associated tag address; and (ii) directly into one or both of tags. The TMT may be configured to accommodate an immediate value tag specified for a particular size of the memory region. The particular size may be selected from a range of memory region sizes.
[0019] The metadata processing domain may also include a metadata tag chain queue, which is configured to (i) perform a first write to change the volume label address to a predetermined value indicating that a write transaction is in progress, (ii) perform a second write to write new data, and (iii) perform a third write to write a new volume label associated with the new data.
[0020] In another aspect, the present disclosure relates to a method for processing instructions, the method comprising: receiving, by an application processor in a host processing domain, each of the following instructions: the instruction includes (i) operand information related to one or more operands, and (ii) operation information indicating an operation to be performed on the one or more operands. The method may also include: performing the operation indicated in the operation information on the one or more operands to generate operation output information, and providing the instruction information and the operation output information to a metadata processing domain. The method may also include: receiving the operation output information from the host processing domain by write chaining in the metadata processing domain, and placing the operation output information into a queue. The method may also include: by a volume tag processing unit, (i) receiving the instruction information from the host processing domain, (ii) using the instruction information to obtain one or more input metadata tags associated with the at least one instruction, (iii) determining whether to allow the at least one instruction based on one or more policies enforced and based on the one or more input metadata tags associated with the at least one instruction, and (iv) in response to the determination that the instruction is allowed, causing the write-chained queue to write the operation output information to the memory in a manner that causes the operation output information to be associated with at least one output metadata tag.
[0021] The tag processing unit may include a rule cache configured to store one or more rule entries for at least one of the one or more policies enforced by the metadata processing domain. Determining that the instruction is allowed may include determining that the rule cache stores a rule entry that matches the one or more input metadata tags associated with the at least one instruction.
[0022] The method may also include using, by the tag processing unit, information stored in the rule entry to provide the at least one output metadata tag to be associated with the operation output information.
[0023] The metadata processing domain may include a policy execution processor. Determining that the instruction is allowed may include (i) determining that a rule cache does not store a rule entry that matches one or more input metadata tags associated with at least one instruction, (ii) in response to determining that the rule cache does not store a rule entry that matches one or more input metadata tags associated with at least one instruction, providing the one or more input metadata tags associated with the at least one instruction to the policy execution processor, and (iii) receiving from the policy execution processor the at least one output metadata tag to be associated with the operation output information.
[0024] The method may also include, by the policy execution processor, (i) receiving the one or more input metadata tags associated with the at least one instruction from the volume tag processing unit, (ii) executing policy code for the one or more input metadata tags associated with the at least one instruction to determine whether to allow the at least one instruction, and (iii) in response to a determination that the at least one instruction is allowed, installing a rule entry in the rule cache based on the one or more input metadata tags associated with the at least one instruction and the at least one output metadata tag.
[0025] The method may also include: providing, by the host processor to the metadata processing domain, update information indicating one or more updates to the state of the host processor as a result of executing the at least one instruction; and, via the metadata processing domain, in response to a determination that the at least one instruction is allowed, using the update information to update a shadow cache configured to store a shadow copy of the host processing domain to the most recently-allowed instruction.
[0026] The at least one instruction may include a first instruction, the instruction information includes first instruction information, and the one or more input metadata tags include one or more first input metadata tags. The method may also include: by the volume tag processing unit, (i) receiving second instruction information related to a second instruction executed by the host processor from the host processing domain, (ii) using the second instruction information to obtain one or more second input metadata tags associated with the second instruction, (iii) determining whether to allow the second instruction based on the one or more policies executed and based on the one or more second metadata tags associated with the second instruction, and (iv) in response to the decision not to allow the second instruction, transmitting one or more turnaround signals to the host processing domain to restore the state of the host processing domain to the shadow copy of the host processing domain. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The foregoing will be apparent from the following more particular description of example embodiments, as illustrated in the accompanying drawings, in which like reference numerals refer to the same parts throughout the different views. The drawings are not necessarily drawn to scale, emphasis instead being placed upon illustrating the embodiments.
[0028] Figure 1 A block diagram of a secure processing system according to an embodiment is shown.
[0029] Figure 2 A block diagram of a secure processing system according to an embodiment is shown.
[0030] Figure 3A A procedure for processing instructions according to an embodiment is shown.
[0031] Figure 3B A procedure for processing instructions according to an embodiment is shown.
[0032] Figure 4 A block diagram of processor interlocking for policy enforcement is shown according to an embodiment.
[0033] Figure 5 A data flow diagram of tag processing according to an embodiment is shown.
[0034] Figure 6 A block diagram of an instruction set architecture decoding system according to an embodiment is shown.
[0035] Figures 7A to 7E Depicted is a set of example PIPE buffers as described herein.
[0036] Figure 8 Depicted is an example set of bits of interest as described herein.
[0037] Figures 9A to 9D Depicted is a TPU communication interface as described herein.
[0038] Fig.10 Parameters for an example ISA-specific header file as described herein are shown.
[0039] Fig.11 Depicts an example mapping between shadow memory, RF / CSR names, and RF / CSR addresses as described herein.
[0040] Fig. 12A , Fig. 12B and Fig. 12C Example communication information used by MTIQ as described herein is shown. DETAILED DESCRIPTION
[0041] A description of example implementations follows.
[0042] The teachings of all patents, published applications, and references cited herein are incorporated by reference in their entirety.
[0043] Aspects and examples generally relate to computing systems with improved policy enforcement (e.g., security policies). In one example, a host processor and a policy enforcement processor are connected via a processor chain for policy enforcement. The processor chain for policy enforcement determines whether an instruction submitted by the host processor complies with a policy rule list. If the rule list does not include an expected rule, the policy enforcement processor can securely determine and provide the expected rule. In some examples, the host processor can be configured according to any instruction set architecture.
[0044] The examples of the methods and systems discussed herein are not limited to the configuration of the details and components of the constructions set forth in the following description or illustrated in the accompanying drawings. The methods and systems can be implemented in other embodiments and can be practiced or implemented in various ways. The examples of specific implementations provided herein are for illustrative purposes only and are not restrictive. In particular, the actions, components, elements, and features discussed in conjunction with any one or more examples are not intended to be excluded from similar roles in any other examples.
[0045] In addition, the wording and terminology used in this article are for the purpose of description and should not be considered as limiting. Any reference to the examples, embodiments, parts, elements or actions of systems and methods mentioned in the singular herein may also include embodiments including plural ones, and any reference to the plural forms of any embodiments, parts, elements or actions herein may also include embodiments including only singular forms. References in singular or plural forms are not intended to limit the currently disclosed system or method, its parts, actions or elements. "Including", "including", "having", "containing", "involving" and its variations used herein mean including the items listed thereafter and their equivalents and additional items. References to "or" may be interpreted as inclusive, so that any term described using "or" may indicate any term in a single, more than one and all described terms. In addition, if the terminology between this document and the document incorporated herein by reference is inconsistent, the terminology usage in the incorporated reference is a supplement to the terminology usage in this document. For incompatible inconsistencies, the terminology usage in this document is governed.
[0046] Computer processors are designed to receive and execute instructions. Instructions may specifically specify one or more operations to be performed on one or more specified operands. For example, a computer processor may receive an instruction to perform an addition operation on a first operand and a second operand, and output the result of the addition operation to a specific output location (e.g., in a memory). The first operand and the second operand may be identified by corresponding locations (e.g., memory locations) where the first operand and the second operand are stored. When the first operand and the second operand are retrieved at the corresponding locations, the computer processor performs the addition operation and writes the result to the specified output location.
[0047] In some embodiments, the instructions can be more sophisticated. As an example, a store instruction can store a value from a data buffer to a memory location referenced by an address from an address buffer. As another example, a load instruction can load a value from a memory location to a data buffer, where the memory location is referenced by an address from an address buffer. As another example, an arithmetic instruction can operate on one or more input values stored in one or more input buffers and place an output value into an output buffer.
[0048] In some embodiments, metadata tags can be associated with entities involved in an instruction (e.g., instruction type, program counter buffer, memory address from which the instruction is retrieved, one or more buffers used by the instruction, memory locations referenced by the instruction, etc.). For example, metadata tags can be used to decide which actions are acceptable / unacceptable, for example, to prevent security compromises. A computer processor executing instructions may be subject to one or more security policies that specify how instructions with particular metadata tags are handled. For example, a security policy may not allow instructions with certain metadata tags because executing those instructions may compromise system security.
[0049] Thus, metadata tags and security policies can prevent a computer processor from executing potentially malicious instructions that may originate from a bad actor. However, if the computer processor executing the instructions can access and modify the metadata tags and / or security policies, the bad actor can circumvent the security policy by modifying the metadata tags, the security policy, or both via the computer processor. Thus, a bad actor can cause a computer processor to execute otherwise-disallowed instructions by manipulating the metadata tags and / or security policies governing the computer processor.
[0050] To avoid the above problems, an embodiment disclosed herein provides a processing system including two processors. The first processor executes instructions subject to metadata tags and security policies, but in most cases, is not allowed to access the metadata tags or security policies. The second processor accesses the metadata tags and security policies and decides to comply with the security policies but does not execute instructions received by the processing system. Separating the tasks performed by the first processor and the second processor can provide significant advantages for the security and efficiency of computer processors. In addition, the systems and methods disclosed herein can allow the first processor to execute according to one of several supported instruction set architectures (ISAs), which provides a highly flexible system.
[0051] Figure 1 A block diagram of a computer processing system 100 according to an embodiment is shown. The computer processing system 100 includes: a host processor, sometimes also referred to as an application processor (AP) 102; a processor interlock for policy enforcement (PIPE) 104; and a system on chip (SOC) bus 106. The AP 102, the PIPE 104, and the SOC bus 106 are communicatively coupled to each other. In some embodiments, the SOC bus 106 is configured to be communicatively coupled to one or more peripheral devices, one or more memory banks, and a SOC bus configuration system.
[0052] PIPE 104 includes a tag processing unit (TPU) 108, a policy execution processor (PEX) 110, and a metadata tag interlocking queue (MTIQ) 112. TPU 108 is communicatively coupled to PEX 110 and MTIQ 112. PEX 110 is communicatively coupled to TPU 108. MTIQ 112 is communicatively coupled to TPU 108.
[0053] In some embodiments, the AP 102 is generally configured to receive instructions, perform operations specified by the instructions, and write outputs to the MTIQ 112. The AP 102 may also provide instructions to the TPU 108. As discussed in more detail below, the AP 102 may not have access to metadata tags or security policies that govern instructions and, therefore, may not be able to verify the executed instructions. In some embodiments, because the AP 102 cannot verify instructions, the AP 102 may not include a control and status register (CSR) that would enable the AP 102 to independently submit unverified instructions to components external to the AP 102 prior to verification. For example, the AP 102 may be configured to exclude one or more CSRs and / or may disable one or more CSRs by disconnecting the corresponding ports. Instead, output writes from the AP 102 are stored in the MTIQ 112, where the writes are held until the instruction has been verified by the PIPE 104.
[0054] In some embodiments, PIPE 104 is generally configured to receive a decommissioning instruction from AP 102 and analyze the instruction to determine whether the instruction complies with one or more policies (e.g., security policies). PIPE 104 is configured to store a policy and metadata tag associated with the decommissioning instruction to determine whether the instruction complies with the policy. SOC bus 106 is generally configured to route one or more signals between components connected to SOC bus 106, including AP 102 and PIPE 104.
[0055] Tag Processing Unit (TPU)
[0056] In some embodiments, TPU 108 is generally configured to perform one or more of the following functions. The first function is to act as a rule cache to process one or more input metadata tags associated with instructions provided by AP 102. TPU 108 writes output metadata tags to MTIQ 112 upon successful verification of the instruction. The second function is to maintain a shadow copy of the cache archive and CSRs that represents the shadow state of computing system 100 as of the most recently-allowed instruction. If a problem is detected (e.g., an instruction that does not comply with a security policy), computing system 100 can "unwind" to a trusted shadow state.
[0057] In some embodiments, the PEX 110 is generally configured to perform one or more of the following functions. The first function is to perform secure boot operations by booting the required boot loader into the AP 102. The second function is to evaluate the volume label to determine and install the rules into the TPU 108 when the TPU 108 fast cache does not include the required rules. The third function is to maintain a mapping of the memory addresses of the AP 102 to the memory addresses of the metadata tags.
[0058] In some embodiments, the MTIQ 112 is generally configured to receive a data write from the AP 102 and a corresponding output metadata tag from the TPU 108, and output a combination of the data write and the corresponding output metadata tag. In some embodiments, the MTIQ 112 is configured to store the output data received from the AP 102 until an output metadata tag is received from the TPU 108 indicating that the instruction complies with the security policy. Upon receiving the output metadata tag, the MTIQ 112 writes the output tag-and-data pair to the specified output address. Additionally or alternatively, the output data may be written to an application memory address, and the output tag may be written to a metadata storage address corresponding to the application memory address.
[0059] As will be discussed in more detail below, the MTIQ 112 enables a buffered interface to exist between the AP 102 and the PIPE 104. In some conventional systems, the host processor may be prohibited from executing subsequent instructions until the current instruction is verified. In contrast, since the MTIQ 112 holds all outputs from the AP 102 until verification is received from the TPU 108, the AP 102 can continue to execute instructions and write outputs to the MTIQ 112 before the TPU 108 verifies the instruction. Similarly, the PIPE 104 can verify instructions at a rate independent of the rate at which the AP 102 executes instructions.
[0060] Thus, AP 102 and PIPE 104 may not be tied to each other, and thus may process instructions independently, resulting in a significant increase in processing speed. If both AP 102 and PIPE 104 successfully process the instruction, MTIQ 102 may output the verified result of the instruction to the specified destination. Otherwise, if PIPE 104 does not allow output from AP 102, computing system 100 may unwind to the shadow state of the computing system as of the most recently-allowed instruction. Thus, AP 102 and PIPE 104 may process instructions independently of each other without compromising processor security or efficiency.
[0061] Figure 2A detailed block diagram of a computing system 200 according to an embodiment is illustrated. Computing system 200 may represent a more detailed block diagram of computing system 100 according to one implementation. However, alternative implementations of computing system 100 are intended to fall within the scope of the present invention, and computing system 200 is provided for illustration purposes only. Certain components and connections of computing system 200 are identified and described below for illustrative purposes only. For example, certain components and connections of computing system 200 are identified below for use in conjunction with Figure 3A and Figure 3B Provide explanation.
[0062] Computing system 200 includes AP 202, PIPE 204, and SOC bus 206. PIPE 204 includes TPU 208, PEX core 210, and MTIQ 212. TPU 208 includes input first-in-first-out component (referred to herein as "FIFO") 214, rule cache 216, and shadow buffer 217. MTIQ 212 includes operation output FIFO 218 and tag FIFO 220. In some examples, AP 202 can be part of a host processing domain, and PIPE 204 can be part of a metadata processing domain. In some embodiments, the processing domains can include respective memories. The FIFOs described herein can be implemented in hardware, software, or a combination of both, as known in the art.
[0063] The AP 202 is configured to receive instructions 222 from the SOC bus 206, provide operation outputs 224 to the operation output FIFO 218, and provide instructions 226 to the input FIFO 214. The TPU 208 is configured to provide a tag output 228 to the tag FIFO 220, provide an interrupt 230 to the PEX 210, and provide a reset vector 232 from the shadow buffer 217 to the SOC bus 206. In some embodiments, the TPU 208 may be configured to provide a hardware return signal 234 to the AP 202. The PEX 210 is configured to execute policy code based on one or more signals received from the TPU 208. The MTIQ 212 is configured to receive and hold the operation output 224 in a queue until a corresponding tag output 228 is received.
[0064] Figure 3A and 3B An example procedure 300 for processing instructions according to an embodiment is illustrated. Figure 3A An example procedure from act 302 to act 314 is depicted, and Figure 3BThe example procedure continues from act 314 ("acts" are also referred to herein as "actions") to act 326. Example procedure 300 may be performed in conjunction with computing system 100 or computing system 200. For purposes of illustration only, the examples are presented in conjunction with computing system 200.
[0065] At action 302, the process 300 begins, as Figure 3A At act 304, AP 202 receives instruction 222. For example, AP 202 may receive instruction 222 from a component external to computing system 200 via SOC bus 206. At act 306, AP 202 executes the instruction. Executing the instruction may include performing an operation specified by the instruction on operands specified by the instruction.
[0066] At act 308, the AP 202 writes the output 224 of the executed operation to the MTIQ 212. For example, the AP 202 may write the output of the executed instruction to the operation output FIFO 218 in the MTIQ 212, where the output is held in the queue until a corresponding output metadata tag is received from the TPU 208 via the tag FIFO 220 indicating that the executed instruction is consistent with one or more policies (e.g., a security policy).
[0067] At act 310, the AP 202 provides the instruction 226 to the TPU 208. For example, the AP 202 may provide the instruction 226 to the input FIFO 214. At act 312, the TPU 208 analyzes the received instruction and determines whether the rule cache 216 includes an entry that matches the metadata tag associated with the received instruction. For example, the rule cache 216 may include a rule cache configured to store frequently-accessed rule entries. If a matching rule entry is available from the rule cache 216 (312 YES), the process 300 continues at act 314 to Figure 3B .
[0068] Otherwise, if a matching rule entry cannot be obtained from the rule cache 216 (312 No), the process 300 continues to act 316. At act 316, a request may be sent to the PEX 210 to validate the received instruction. This may include providing an interrupt 230 and a metadata tag associated with the received instruction to the PEX 210. The PEX 210 may evaluate the metadata tag to determine whether the instruction should be allowed. In response to determining that the instruction should be allowed, the PEX 210 installs a new entry in the rule cache 216, as well as the metadata tag associated with the received instruction and / or the output metadata tag provided by the PEX 210. The process 300 continues at act 314 to Figure 3B .
[0069] Figure 3B Beginning at act 314 and continuing to act 318. At act 318, a decision is made by the TPU 208 as to whether the rule indicated in the matching rule capture entry is satisfied. For example, act 318 may include applying the rule to one or more metadata tags associated with the received instruction to determine whether the one or more metadata tags comply with the rule. If the rule is satisfied (318 is), the program 300 continues to act 320. However, it should be understood that various aspects of the present disclosure are not limited to performing a separate determination of compliance. In some embodiments, the presence of a matching rule entry in the rule cache may indicate that the received instruction is allowed. Similarly, the output of the PEX 210 may directly indicate whether the received instruction is allowed. Therefore, act 318 may not have the application of a rule.
[0070] At act 320, the TPU 208 generates a shadow copy of the state of the AP 202 and stores the shadow copy in the shadow buffer 217. For example, the TPU 208 may write write-back information received in association with the instruction into the shadow buffer 217.
[0071] The shadow copy of AP 202 represents the state of AP 202 as of the execution of the most recently allowed instruction. In some embodiments, the shadow copy generated at act 320 enables AP 202 to continue to execute instructions and write operation output 224 to operation output FIFO 218 before the instruction is determined by TPU 208 to comply with one or more policies. If it is subsequently determined that the instruction does not comply with any policy, the state of AP 202 can be unpacked to the most recently allowed state stored in shadow buffer 217 so that no unverified data is written to components external to computing system 200.
[0072] At action 322, the TPU 208 writes the output metadata tag 228 associated with the allowed instruction to the MTIQ 212. For example, the TPU 208 may write the output metadata tag to the tag FIFO 220 in the MTIQ 212. The tag FIFO 220 may be coordinated with the operation output FIFO 218 such that the operation output 224 written to the operation output FIFO 218 and the metadata tag 228 written to the tag FIFO 220 occupy the same position in the operation output FIFO 218 and the tag FIFO 220, respectively.
[0073] At action 324, the operation output 224 stored in the operation output FIFO 218 and the metadata tag 228 stored in the tag FIFO 220 are released. For example, the operation output FIFO 218 and the tag FIFO 220 may each release the least-recently-received input and corresponding output metadata tag 228 representing the operation output 224. The pair may be released to the SOC bus 206 to be routed to the address specified in the instruction. Additionally or alternatively, the operation output 224 may be written to an application memory address, and the corresponding metadata output tag 228 may be written to a metadata storage address corresponding to the application memory address.
[0074] At act 326, the process 300 ends. Returning to act 318, if the rule is not satisfied (318 No), the process 300 continues to act 328. At act 328, the state of the AP 202 is unwound to the state stored in the shadow buffer 217, which reflects that the state of the AP 202 is as of the most recently-allowed instruction. The process 300 ends at act 326.
[0075] Now refer to Figure 4 The operation of PIPE 204 is described in more detail. Figure 4 204 , according to some embodiments. PIPE 204 includes TPU 208, PEX 210, and MTIQ 212. TPU 208 includes input FIFO 214, rule cache 216, and shadow buffer 217. MTIQ 212 includes operation output FIFO 218 and tag FIFO 220. TPU 208 also includes tag mapping table (TMT) 236, operation group / attention lookup table (LUT) 238, ISA decoder 240, and special function register (SFR) 242. However, it should be understood that aspects of the present disclosure are not limited to Figure 4 For example, aspects of the present disclosure are not limited to the use of shadow buffers, volume tag mapping tables, operation groups / focus LUTs, etc.
[0076] As described above, in some embodiments, PIPE 204 may be configured to receive input instructions from AP 202 for each instruction that AP 202 completes execution. PIPE 204 retrieves tags associated with the input instructions and checks the retrieved tags against a set of rules stored in rule cache 216. Because PIPE 204 is separate from AP 202, PIPE 204 is able to verify the tag set after AP 202 has retired the instruction. Due to the post-processing nature of PIPE 204, PIPE 204 can advantageously preserve any external effects of executing AP 202 instructions until each instruction has been verified by TPU 208.
[0077] Additionally, as described above, in some embodiments, a buffer interface may be provided between AP 202 and PIPE 204. The buffer interface enables the output of a submitted instruction to be queued from AP 202 into operation output FIFO 218, after which TPU 208 evaluates the submitted instruction to determine whether the instruction should be allowed and what the result tag should be.
[0078] Since AP 202 is allowed to process and submit instructions before PIPE 204 validates the instructions, AP 202 may submit instructions that are subsequently disallowed by PIPE 204. For situations where a policy violation is detected, it may be advantageous to provide a mechanism to unwind the state of AP 202 to the state of the most recently-allowed instruction once TPU 208 detects a policy violation. To accomplish this, TPU 208 may receive write-back information for each received instruction. TPU 208 may use the write-back information to maintain shadow copies of the buffer archive, floating point buffer archive, and / or control / status registers (CSRs) in memory such as shadow buffers 217. The shadow copy represents a trusted "backup" state of AP 202 that may be loaded if a policy violation is detected.
[0079] If an unwinding event is required, the PEX 210 may use the PIPE buffer to initiate a reset or interrupt of the AP 202. If a reset is initiated, the PEX 210 may also provide a reset vector 232 pointing to code that restores the state of the AP 202 from the PIPE shadow state RAM, such as the shadow buffer 217. In some embodiments, the PIPE 204 may also provide a hardware rollback signal 234 to the AP 202 to roll back the hardware of the AP 202 to a previous trusted state. However, it should be understood that although the example embodiments describe an example hardware-based rollback implementation, software-based rollback may also be used instead of or in addition to a hardware-based implementation.
[0080] With the unwind mechanism and MTIQ 212 in place, AP 202 can commit instructions to the buffer archive and CSRs before checking the instructions because no external effects are created and the state can be unwound if necessary. Therefore, in some embodiments, it is advantageous not to provide CSRs to AP 202 that may cause external effects on AP 202, such as general purpose input / output (GPIO) via CSRs. For example, AP 202 can be configured to exclude non-standard Berkley extension "mtohost" and "mfromhost" CSRs, and / or one or more ports to such CSRs can be disconnected.
[0081] As described above, PIPE 204 includes SFR 242. According to some embodiments, 7A to 7E SFR242 is summarized in the figure. The "address" column refers to the lower address bit. The "bit" column indicates the bit occupied by the field. When there is more than one field in a buffer, the row with the address will have an empty "bit" grid, and the previous row will indicate the field of each corresponding bit position with an empty address grid. In one embodiment, all buffers are 32 bits wide and can be accessed as bytes, half words or words. For buffers with an indication of less than 32 bits, the remaining bits are retained and may be ignored by software. However, aspects of the present invention are not limited to buffers of any specific size, or to access buffers with any specific granularity.
[0082] In this example, there are multiple types of buffers in PIPE 204. Status buffers include read-only buffers with status and statistics. Control buffers include write-only and read-only buffers that initiate actions from AP 202 or PIPE 204. Miss status buffers include read-only buffers filled with values that cause rule cache misses. For example, the miss status buffer includes a buffer for indicating the evaluation of the rule cache direction hash function, and includes a bit for notifying software if there is a valid rule at the indicated location. Therefore, the software can quickly decide whether a rule needs to be ejected from the rule cache 216.
[0083] In some embodiments, the write command buffer includes a set of read / write buffers for installing new rules in the rule cache 216. For example, the new rule can be a desired rule that does not yet exist in the rule cache 216. Software can specify which rule cache direction the rule is installed into, so that the missing software is responsible for cache management. The key-based query buffer includes a set of buffers for checking whether a particular input group or key exists in any rule cache direction. This may be advantageous, for example, where a portion of the rule cache is used as a policy-based rule cache.
[0084] In some embodiments, the address-based check buffer includes a set of buffers for checking the address of a specific rule cache direction and obtaining the content therein. For example, this may be particularly advantageous for saving rules before a new insertion, which allows the software to reinstall the rules to a different cache direction, or provide the rules to the software L2 cache. The label mapping table control buffer includes a buffer for writing to TMT 236, as will be discussed in more detail below. In some embodiments, TMT 236 can be fully associative. The operation group table control buffer includes a buffer for writing to the operation group and the attention table, as will be discussed in more detail below. The label RAM access buffer includes a read / write buffer whose memory maps the label buffer maintained by PIPE 204. The shadow RAM access buffer includes a read / write buffer that provides memory-mapped access to the PIPE204 shadow buffer archive group and CSR RAM.
[0085] Figures 7A to 7E The table shown in depicts a set of example PIPE buffers as described herein.
[0086] As described herein, in some embodiments, the TPU 208 may be configured to receive input from the AP 202 for each instruction completed by the AP 202. The input is queued in the input FIFO 214, which holds instructions to be processed by the TPU 208. For example, processing by the TPU 208 may include analyzing a set of related tags of an instruction to determine whether the set of related tags is allowed by the policy enforced by the TPU 208 and the PIPE 204. The FIFO 214 facilitates a buffer interface at the input of the TPU 208. The buffer interface allows the TPU 208 to compensate for events where the TPU 208 must stop (e.g., to resolve a data hazard event) and to compensate for events where the instruction stream 226 stops (e.g., due to a branch event within the AP).
[0087] Figure 5 The data flow diagram 500 of the TPU 208 according to an embodiment is illustrated. For illustration purposes only, the data flow diagram 500 is nominally divided into seven stages for explanation purposes. At the first stage 502, the instruction type, execution result, instruction and / or data address, and / or write-back value flow into the input FIFO 214. For example, the instruction type, execution result, instruction and / or address, and / or write-back value can be received from the AP 202.
[0088] At the second stage 504, the input FIFO 214 is popped and four events may occur. In the first event (which will be referred to below), Figure 6), one or more bits identifying the instruction type (e.g., operation code) are sent to an operation group / attention LUT 238, which converts the instruction operation code into a group ("OPGRP") and a set of input mask bits ("CARES"). For example, the operation group / attention LUT 238 can group addition and multiplication operation codes into arithmetic operation groups. Grouping similar operation codes can simplify processing in subsequent levels because similar or identical rules may apply to shared arithmetic groups. The set of mask bits or CARES indicates to subsequent logic that specific instructions, data, or operand tags should be partially or completely masked before one or more policies are evaluated. For example, a jump operation code can set the CARES bit group so that only one operand tag (corresponding to the operand buffer that holds the destination address of the jump) is used for policy evaluation for a given instruction. The tags of the remaining potential operands will be masked or otherwise excluded from policy evaluation.
[0089] In a second event that can be executed in parallel with the first event, the physical instruction address and the physical data address are converted by TMT236, as will be referred to below. Figure 6 For example, TMT 236 may maintain a mapping of physical instruction and data memory addresses to tag addresses and / or values. TMT 236 may output a fixed tag value (e.g., for one or more instructions or words, or a full page of instructions or data words), or a physical address at which such a tag value is located.
[0090] In the third event, the instruction is provided to the pipeline buffer 244. The pipeline buffer 244 is configured to ensure that the instruction is output to the subsequent stage at the appropriate time relative to other events in the second stage 504.
[0091] In the fourth event, the write-back value, type, and address are passed to the write-back pipeline buffer 246. As described above, the write-back information may indicate the state of the AP 202. The write-back information is stored in the shadow buffer 217 at the last stage of the data flow diagram 500 to generate a shadow copy of the AP 202, and if an unwind operation is required, the shadow copy is read from the shadow buffer 217 to unwind the state of the AP 202.
[0092] The write-back pipeline buffers 246 can ensure that the write-back information is passed through each stage of the data flow graph 500 while other operations are being performed on the information received at the first stage 502. Subsequent stages may also include corresponding write-back pipeline buffers that ensure that the write-back information is stored in the shadow buffer 217 (which may be at the last stage of the data flow graph 500) at the appropriate time (e.g., when determining that an instruction is received in the input FIFO 214, in accordance with the installed policy). For the purpose of brevity, the subsequent write-back pipeline buffers 246 are not specifically discussed in detail because their function is similar to the pipeline buffers 246 of the second stage 504. Alternatively or additionally, the write-back information can be synchronized with the TPU processing pipeline via other mechanisms, such as using a first-in-first-out (FIFO) buffer.
[0093] At the third stage 506, four additional events may occur. The first event occurs when the TMT 236 returns the tag value and / or tag address of the instruction and the corresponding attention bits of the current instruction are returned from the operation group / attention LUT 238. If the TMT 236 returns the tag address, thereafter, a read of the instruction metadata tag value may be initiated and the returned value is written to the instruction tag FIFO 250 (ITAG FIFO). If the TMT 236 returns the tag value, the tag value may be written directly to the ITAG FIFO as the instruction metadata tag value.
[0094] The second event occurs when the TMT 236 returns the tag value and / or tag address of the memory data and the corresponding attention bit of the current memory data is returned from the operation group / attention LUT 238. If the TMT 236 returns the tag address, a read of the data metadata tag can be initiated thereafter, and the returned value is written to the data tag FIFO 250 (DTAG FIFO). If the TMT 236 returns the tag value, the tag value provided by the TMT 236 can be directly written to the DTAG FIFO as the data metadata tag value.
[0095] In the third event, the ISA decoder 240 receives the attention bit information and the operation group information from the operation group / attention LUT 238, and receives the instruction from the pipeline buffer 244. A simplified ISA decoding operation is performed on the instruction. The simplified ISA decoding operation (hereinafter referred to as Figure 6 ) includes determining which operands and destinations the instruction uses, the operand and destination types and addresses, and whether memory is used or written to by the instruction.
[0096] In some embodiments, in the ISA decoder 240, operands and destination addresses provided by the simplified ISA decode operation in the second stage 504 can be compressed. The operands and destination addresses can be passed through an ISA-specific address mapping block to map the addresses to a compressed single address space. When the addresses of the AP 202 register files and CSRs are sparsely populated and / or aliased, it may be advantageous to compress the address space so that the address space can be reduced to a contiguous address space. The mapping can be used to write addresses to both the operand tag RAM and the shadow state RAM. Fig.11 An example address mapping for a RISC-V AP is shown.
[0097] In the fourth event, the write-back information is pipelined by a set of pipeline buffers.
[0098] At the fourth stage 508, two events may occur. In the first event, the first set of transparent FIFOs 250 receives metadata tags for instructions and / or data. The first set of transparent FIFOs 250 may be coupled to one or more logic gates 252 configured to receive tag mapping information from one of the TMT 236 and the tag lookup block 248 and provide the tag mapping information to the first set of transparent FIFOs 250. For example, the one or more logic gates 252 may include a logic OR gate coupled to the TMT 236 and the tag lookup table 250 and configured to output the information provided by the active one of the TMT 236 and the tag lookup table 250. Once written to the first set of transparent FIFOs 250, the first set of transparent FIFOs 250 outputs the tag mapping information to subsequent stages.
[0099] In the second event, the output of ISA decoder 240 (which includes operand groups and care bit information from operand group / care LUT 238) is stored in the second pass-through FIFO 254, which outputs the decoded information to subsequent stages once written.
[0100] At the fifth stage 510, the header of the second transparent FIFO 254 (S4 FIFO) is analyzed to determine whether the instruction tag and / or metadata tag are necessary for the current instruction by analyzing the corresponding care bits. The second transparent FIFO 254 is configured to provide care mask information for the current instruction tag and metadata tag, and is configured to provide an address for obtaining a register source (RS) tag (e.g., RS1 / 2 / 3) from a register file (RF) tag memory, wherein the register file (RF) tag memory corresponds to the care bit. Once all necessary inputs are available, the first set of transparent FIFOs 250 and the second transparent FIFO 254 are popped. The previous destination address is tracked, and a stop can be implemented to resolve data hazards (i.e., data dependency events).
[0101] When all availability of instruction tags and / or data tags are indicated as required by the output of the S4 FIFO 254, a care bit mask may be applied to the instruction tags and / or data tags, and the result tags or tags stored in the instruction tag register (ITAG REG) and the data tag register (DTAG REG), respectively. Additionally or alternatively, based on the care bits from the S4 FIFO, the operand tags may be looked up via the address provided by the S4 FIFO 254 to the operand TAG register file or RAM. The program counter tag (PCTAG REG) register may provide an output of the program counter tag value to subsequent states. Furthermore, the contents of the S4 FIFO 254 may be recorded by the pipeline register to synchronize with the output of the instruction tag register.
[0102] In the sixth stage 512, three events may occur. In the first event, attention masks may be applied to RS1 / 2 / 3, memory, PC and CI tags, and any other instruction bits not masked by the ISA decode logic. Tags, operation groups, LSBs, and instruction bits may be concatenated to form a rule key (MVEC). The rule key may be hashed (e.g., via an orthogonal randomized hash function) to produce the address of the rule cache direction RAMs. In the second event, the rule may be used to read the rule cache 216.
[0103] At the seventh stage 514, four events may occur. In the first event, the output of each rule cache direction is compared with the rule key MVEC. If no match is found, the interrupt signal IRQ is asserted to the PEX 210 to provide the required rules. For example, the PEX 210 can act as an L2 rule cache, or run a complete miss handler program sequence. The TPU 208 waits for the SFR.WR_RESUME signal to resume operation.
[0104] In the second event, the specified result PC tag is compared to the current PC tag. If a change is being made, a signal is sent to the previous stage to invalidate the current instruction, and the fourth stage 508 unwinds the FIFO pointer to the instruction after the specified point. In the third event, any specifically specified destination tag is written to the register archive tag memory and / or MTIQ 212. For example, the destination tag may be written to tag FIFO 220. In the fourth event, the write-back value of the instruction is written from a pipeline buffer (e.g., a pipeline buffer similar to pipeline buffer 246) to shadow buffer 217 based on the previously translated address. Data flow diagram 500 terminates after seventh stage 514 is completed.
[0105] A simplified ISA decode operation, which may be performed in conjunction with TMT 236, operating output / attention LUT 238, will now be described in greater detail. Figure 6 A block diagram 600 of a configurable instruction decode table according to an embodiment is illustrated. The block diagram 600 includes a primary table 602, a secondary table 604, a primary logic 606, a secondary logic 608, a multiplexer 610, a demultiplexer 612, and a plurality of address lookup tables 614.
[0106] The main logic 606 includes a first input configured to receive an instruction, a second input for receiving an instruction mask, and an output configured to provide an operation code to the main table 602. The secondary logic 608 includes, for each secondary table of the plurality of secondary tables 604, a first input configured to receive an instruction, a second input for receiving a sub-instruction mask, and an output configured to provide the sub-instruction to a corresponding secondary table in the plurality of secondary tables 604.
[0107] The primary table 602 includes an input for receiving an operation code from the primary logic 606, a first output for providing an input selection signal to the multiplexer 610, and a second output for providing the extracted instruction information to the multiplexer 610. The secondary tables 604 each include an input for receiving a sub-instruction from a corresponding one of the secondary logics 608, and an output for providing the extracted sub-instruction information to the multiplexer 610.
[0108] Multiplexer 610 includes a plurality of inputs coupled to primary table 602 and secondary table 604, an input select connection coupled to primary table 602, and an output coupled to demultiplexer 612. Demultiplexer 612 has an input coupled to multiplexer 610, and a plurality of outputs coupled to a plurality of address lookup tables 614 and an output 616. Each of the plurality of address lookup tables 614 includes an input coupled to demultiplexer 612 and an output coupled to output 616.
[0109] The primary table 602 and the secondary table 604 may be configured according to a particular ISA and may facilitate extracting desired information from a received instruction that has been executed by the AP 202. As described above, the AP 202 may execute instructions according to one of a plurality of supported ISAs. As used herein, "supported ISAs" may include ISAs for which a corresponding table (e.g., the primary table 602 or the secondary table 604) exists to facilitate extracting desired specific ISA information from a received instruction.
[0110] The primary table 602 and the secondary table 604 (collectively referred to as "configurable tables") may be configured according to a specific ISA to facilitate interpretation of specific instructions received by the PIPE 204. In this manner, the PIPE 204 may be used to perform metadata processing for any suitable and desired ISA of the AP 202 that may be used in such embodiments. In other words, support for metadata processing and policy enforcement is provided for any instruction set corresponding to the ISA of the AP 202 using such configurable tables. The configurable tables may be configured according to a specific ISA to facilitate interpretation of specific instructions received by the PIPE 204 having a specific instruction format for the ISA of the AP 202.
[0111] For example, a configurable table may be used to extract specific bits from a received instruction that forms an operation code ("op code"). Because the specific bits that form an op code typically vary from ISA to ISA, a configurable table may be configured according to a particular ISA and used to extract specific bits from instructions that form an op code.
[0112] In a similar manner, a configurable table may be used to examine and extract the appropriate bits of the instruction for different operands, as well as any other information to be extracted from the instruction. For example, such a configurable table may be characterized as making the PIPE 204 customizable for use with any ISA of the AP 202 by customizing the table and the values of specific PIPE input parameters, depending on the ISA and its specific instruction format or layout.
[0113] PIPE 204 may receive as input instruction size information (“INSTR WIDTH”), a number of sub-operand masks (“NLTMSUB MASKS”), a number of location masks (“NUM LOC MASKS”), a maximum number of operands per instruction (“NUM_OPS”), a maximum number of write-back destinations per instruction (“NUM DESTS”), a mask of bits that create a major operation code (“INSTR MASK”), a sub-operand mask array (“SUB_MASK”), and an operand and destination location mask array (“LOC MASK”).
[0114] In order to construct the operation code, the main logic 606 can be implemented as a logic AND gate. The main logic 606 receives the instruction and the instruction mask of the bit that creates the main operation code as input. The main logic 606 removes any bit shielded by the instruction mask, connects the remaining bits to form the operation code, and outputs the operation code. The main table 602 maps the operation code when receiving the operation code and outputs the operand confirmation check ("op_valid"), the operand type ("op_type"), the operand address location ("op_addr_loc"), the destination confirmation check ("dest_valid"), the destination type ("dest_type"), the destination address location ("dest_addrloc"), the instruction mask ("instr_mask"), the memory confirmation check ("mem_valid"), the memory write ("mem_wr") and the delay signal ("defer") provided to the input selection terminal of the multiplexer 610.
[0115] In parallel, secondary logic 608 may optionally be used to create sub-instructions to address secondary table 604. Secondary table 604, similar to primary table 602, receives input information, maps the input information to output information, and provides the output information to multiplexer 610.
[0116] The multiplexer 610 is configured to output information corresponding to at least one of the primary table 602 and the secondary table 604 to the multiplexer 610. In one embodiment, the selected table is determined by an input selection signal received by the multiplexer 610. For example, the delayed signal output by the primary table 602 can be used to select an input corresponding to one of the tables 602, 604 to provide to the output of the multiplexer 610. The multiplexer 610 outputs the selected information to the demultiplexer 612, which outputs each of the above outputs to a plurality of address lookup tables 614 or outputs 616.
[0117] In some embodiments, the multiplexer 610 is configured to provide operand address locations and destination address locations to multiple address lookup tables 614. The operand address locations and destination address locations indicate which of several possible instruction locations includes the necessary operand or destination address. The operand address locations and destination address locations are used to select a specific location mask result as the corresponding operand or destination address.
[0118] For example, each address lookup table in multiple address lookup tables 614 can include a multiplexer and input selection terminal with multiple inputs. Each input of the multiplexer can be coupled to different operand addresses. The input selection terminal can be configured to receive operand address location signals such as for selecting the desired operand address. The multiplexer outputs the desired operand address to output 616. Similar principles can be applied to the destination address location information such as provided to multiple address lookup tables 614.
[0119] As described above, in some embodiments, the minor table 604 may be omitted. For example, in the case where the AP 202 is configured according to an ISA that does not include sub-instructions, the minor table 604 may be omitted. Thus, in the absence of sub-instructions, the minor table 604 may be unnecessary. It should be understood that the number and content of the configurable tables may be customized according to the specific ISA of the AP 202.
[0120] TMT 236 will now be described in more detail (see, e.g., Figure 7C and Fig.7D ). As described above, TMT 236 converts physical instructions and data storage addresses into corresponding tag addresses, or directly into tags. In some embodiments, TMT 263 can be a fully associative array with a parameterized number of entries. Each entry can contain: a mask applied to the input address (MapMask), an address that can be compared to the masked input (MapAddr), a bit to indicate whether the entry is valid (MapValid), a bit to indicate whether the value field is a tag or address (MapImm), and an output value (MapValue).
[0121] TMT 236 can be configured to receive several inputs. For example, TMT 236 can receive an instruction entity address ("InstrPA"), a data entity address ("DataPA"), and several SFR values ("SFR_TMT_Entry", "SFR_TMT_Type", "SFR_TMT_Addr", "SFR_TMT_Mask", "SFR_TMT_Value", and "SFR_TMT_Write"). The SFR value SFR_TMT_Type can include valid bits for instruction tag lookup, data tag lookup, a tag value for indicating when TagMapValue is an immediate tag value rather than an offset, a shift setting to be applied to the mask address input, and a field indicating the tag size in the region. TMT 236 can also receive "SFR_TMT_Write" as input by writing the SFR value "SFR_TMT_Value".
[0122] The TMT 236 may be configured to provide a number of outputs. For example, the TMT 236 may provide an instruction tag address or tag value ("CI_TMT_Value"). A bit ("CI_TMT_Valid") may be asserted to indicate that the instruction tag address is provided to look up the instruction tag from memory. A bit ("CI_TMT_Imm") may be asserted to indicate that the instruction tag value is written directly to the ITag FIFO of the first group FIFO 248.
[0123] The TMT 236 may also provide a data tag address or tag value ("Mem_TMT_Value"). A bit ("Mem_TMT_Valid") may be asserted to indicate that the data tag address is provided to look up the data tag from memory. A bit ("Mem_TMT_Imm") may be asserted to indicate that the data tag value is written directly to the DTag FIFO of the first group FIFO 248.
[0124] If a data tag address is not found, the TMT 236 may instead provide a data tag address miss signal ("TMT_d_miss"). Similarly, if an instruction tag address is not found, the TMT 236 may provide an instruction tag address miss signal ("TMT_i_miss").
[0125] When CI_TMT_Valid or Mem_TMT_Valid is asserted (i.e., when CI_TMT_Value or Mem_TMT_Value is used as an address), the inversion of the mask field may indicate how many input bits have been ORed with the output value to create the tag address. Alternatively, when an immediate value tag such as CI_TMT_Imm or Mem_TMT_Imm is asserted (i.e., when an instruction tag or data tag is written directly), the CI_TMT_Value and Mem_TMT_Value fields may be used as tags as is. The resulting logic may take the following form:
[0126] Value[n]=TMT_Valid[n]&(InputPA&
[0127] TMT_Mask[n])==TMT_Addr[n];
[0128] Value[n]=TMT-Imm? TMT_Value[n]:
[0129] TMT_Value[n]|
[0130] ((InputPA&~TMT_Mask[n])>>M
[0131] TMT_Type.shift[n]),
[0132] Where n ranges from 1 to the number of specifically designated TMT 236 entries. The Value[n] of the highest numbered entry with the Valid[n] bit set may be selected. If the Valid[n] bit is not set, the PIPE 204 may issue an interrupt to the PEX 210 due to a tag translation table miss and may assert "TMT_IMiss" and / or "TMT_DMiss" in the PipeStatus register depending on whether a miss occurred with respect to an instruction tag or a data tag.
[0133] In an embodiment where the highest numbered entry is selected, and all of the foregoing comparisons are performed in parallel, several advantages can be achieved. For example, an address mapping scheme that replaces immediate values can be used to specifically assign immediate value tags to memory regions of any size that include one or more sub-regions. This provides a mechanism for sparsely marking pages in memory.
[0134] In another advantage, immediate value tags may be specified for regions of any size, and additional immediate tags may be specified for one or more sub-regions. This may be useful, for example, for peripheral device tags, where sub-regions of peripheral devices have additional constraints. In yet another advantage, address mappings may be specified globally, where some regions of memory use immediate tags as a means to speed up the performance of PIPE 204 and reduce memory access power.
[0135] In some embodiments, TMT 236 includes a single set of mapping entries, but uses the single set of mapping entries on two sets of inputs and outputs. The first set can be used for the current instruction physical address to generate the current instruction tag physical address. The second set can be used for the data physical address to generate the data tag physical address.
[0136] The operation group / care LUT 238 will now be described in more detail. In some embodiments, the operation group / care LUT 238 may be a simple 1K entry RAM with a 10-bit output for the operation group ("OPGRP") and 33 care bits, one for each of the rule cache 216 input fields, and 22 care bits for the rule cache instruction inputs. Figure 8 Example bits of interest are listed in the table depicted in .
[0137] Figure 8 Each of the care bits shown in the table of FIG. 254 may be used to mask the corresponding input to the rule cache 216. For CItag and Mtag, unless the care bit is set, no memory fetch occurs and the output of TMT 236 may not be written to the corresponding ITag FIFO or DTag FIFO of the first set of FIFOs 248. The logic servicing the read side of the second FIFO 254 checks the CItag and Mtag care bits to determine whether the PIPE 204 needs to wait for the ITag and / or DTag FIFOs.
[0138] In addition to saving power, this also improves performance characteristics by avoiding unnecessary memory system accesses. The remaining concern bits can mask other inputs to the rule cache 216. It is also possible to perform an OpTag RAM lookup only when the corresponding concern bit is asserted. When the concern bit is not asserted, the corresponding input field of the bit can be masked by being set to "1'b1" (i.e., not masked to zero). Masking to 1 can be advantageous because it provides a method of distinguishing between masked fields and uninitialized / default fields.
[0139] In an implementation where AP 202 is a RISC-V core, for example, the RISC-V specific configurations of OPtag RAM (including dual-port for Integer, dual-port and single-port for FP, and single-port for CSR) are a subset of the general configuration possibilities supported by PIPE 204. PIPE 204 utilizes interface parameters "*RF*" to implement the appropriate number of OPtag RAMs, widths, ports, and address bits to support various different ISAs.
[0140] As described above, the PEX core 210 may implement policy software that manages insertions and ejections from the rule cache 216. The TPU 208 may provide data indicating the lines of the rule cache 216 that are marked as locked, marked as invalid, and stamped with install count values. The TPU 208 may use this information to populate the "WrWayDest" field with the first invalid path entry or the least recently installed (LRI) entry that is not locked. The PEX core 210 may then decide to use the value as is, or change the value to a different path number through a different algorithm that utilizes the provided lock, invalid, and install count information.
[0141] To communicate with AP 202, SOC bus 206, and PEX core 210, TPU 208 may utilize Fig. 9A , Fig. 9B , Fig. 9C and Fig.9D The communication interfaces are described in the table depicted in .
[0142] In some embodiments, the TPU 208 utilizes an ISA-specific header file to specify ISA-specific parameters about the AP 202 , and the TPU 208 may benefit from being aware of the ISA-specific parameters about the AP 202 . Fig.10 The table shown in uses the example RISC-V RV32G implementation of AP 202 to enumerate the parameters and their corresponding values that are specifically specified in the ISA-specific header file. Fig.11 The table depicted in shows an example mapping between shadow memory, AP RF / CSR names, and AP RF / CSR addresses.
[0143] Metadata Tag Interlocking Queue (MTIQ)
[0144] The MTIQ 212 will now be described in detail. As described above, the MTIQ 212 is generally configured to receive an operation output from the AP 202, and is configured to wait for a corresponding metadata tag from the TPU 208, and then output a pair of the operation output and the corresponding metadata tag. In some embodiments, the MTIQ 212 may be configured according to several assumptions set forth in the following description.
[0145] First, if an L1 data cache exists, it is a direct write cache that writes each value in the order of the AP 202 instructions seen at the PIPE 204 input queue in the FIFO 214 .
[0146] Second, the output of the operation from the AP 202 or L1 data cache corresponds to each instruction. In other words, the sequence of store-byte instructions generates a sequence of bytes written to the MTIQ 212 layer. The byte sequence is not queued by the AP 202 or L1 data cache until the word is written, but is written by the MTIQ 212.
[0147] Third, in implementations where there is an L1 data cache, since the cache is written directly, no writes occur when a cache line is victimized.
[0148] Fourth, since PIPE 204 corresponds to memory writes, PIPE 204 processes instructions in the same order as AP 202 .
[0149] Fifth, both cacheable and non-cacheable writes flow to the MTIQ 212 in the same order as the instructions that created the write.
[0150] In some implementations, the depth of the operation output FIFO 218 is equal to the depth of the input FIFO 214. However, in other implementations, the operation output FIFO 218 may have a smaller depth to take advantage of the lower probability of back-to-back memory writes.
[0151] When the TPU 208 writes the tag to the tag FIFO 220, the MTIQ 212 pops the data waiting at the top of the queue and writes both the operation output and the metadata tag to the main storage in an atomic manner. In some embodiments, the operation output and the metadata tag should remain paired together. However, in some embodiments, writing the tag before or after the operation output may be insufficient. For example, the data managed by the tag can change from non-secret to secret as indicated by the tag. If the tag is written first, the address is marked as secret before the secret data is written, thereby ensuring that the secret data is not written without the protection tag. Therefore, it is advantageous to write the tag first in this case.
[0152] However, consider an example where an address with secret data is made non-secret. It may be advantageous to change the data before changing the tag to a less restrictive tag, thereby indicating that writing the tag after the data may be advantageous. Therefore, writing the tag a second time may be advantageous in this case.
[0153] Since the MTIQ 212 cannot know which situation may occur in advance, applying a static "data first, tag second" or "tag first, data second" scheme may not be effective. Therefore, in one embodiment, three writes are performed. The first write changes the tag address to a predetermined constant value that always indicates that a write transaction is in progress. The second write writes the new data. The third write writes a new tag associated with the new data. If this sequence is interrupted after the first write, the policy software can see the predetermined constant value of the tag indicating an interruption of the data word in question and can take appropriate action.
[0154] As described above, the TPU 208 can utilize immediate tags from the TMT 236 for store commands. When using immediate tags, there is no tag address to send tag updates. Therefore, memory tag writes can be sent to a special address instead. For example, the special address can include all 1's. The MTIQ 212 can decode the special address to indicate that pending data writes are allowed, and the MTIQ 212 can write the data without any tag writes.
[0155] In some embodiments, the MTIQ 212 introduces a time window in which a memory consistency violation may occur. The time window may be opened when a store word instruction causes data to be written to the operation output FIFO 218 to wait for a tag. However, before the MTIQ 212 writes the word to main storage, the load instruction reads the same address as the pending word store.
[0156] In other words, the load instruction is attempting to read "stale" information. Therefore, the load instruction will read the previous stale data from memory instead of the "fresh" value still parked in the MTIQ 212. To prevent this, in some embodiments, read requests flow through the MTIQ 212, and the MTIQ 212 pauses reads that match addresses parked in the operation output FIFO 218.
[0157] MTIQ 212 can be used in Fig. 12A , Fig. 12B and Fig. 12C The communication information listed in the table shown in and AP202, PIPE 204 and AXI structure.
[0158] As described above, PEX 210 may be configured to perform secure boot operations. PEX 210 may include a boot ROM containing code that can read an image from flash memory, authenticate and decrypt the image in conjunction with one of a plurality of public keys also stored in the boot ROM, write the application to main memory, and then enable AP 202 to continue the boot process.
[0159] For example, the secure boot process may begin in the PEX 210. Upon reset, the AP 202 may remain in reset until the PEX 210 releases the AP 202 reset via the PIPE SFR. The PEX 210 may begin execution at its reset vector, which is typically in ROM on the chip. The PEX 210 may boot the policy software into the PEX 210's own memory space, configure the memory structure protection configuration registers to define the memory regions that each initiator may access, protect the memory regions so that the memory regions themselves hold policy data, initialize the policy data segment, copy the boot loader for the AP 202 from flash memory to main storage at an address selected by the PEX core 210, optionally install a set of rules into the PIPE 204, and finally release the AP 202 from reset. At this point, the AP 202 may begin executing the boot loader from main storage to load the OS and applications from flash memory. Thus, starting with the first instruction executed by the PE 202, the PIPE 204 may check each executed instruction against the policy rules.
[0160] The PEX 210 may be implemented according to one of several types of CPU cores. For example, the PEX 210 may be implemented as a RISC-V RV32I core. Similarly, the AP 202 may also be implemented as a RISC-V RV32I core. The choice of implementation of the PEX core 210 and the AP 202 may vary according to design preference without adversely affecting the operation of the computing system 200.
[0161] Having thus described several aspects of at least one embodiment, it will be appreciated that various variations, modifications, and improvements will readily occur to those skilled in the art. Such variations, modifications, and improvements are intended to fall within the scope of the present disclosure. Therefore, the foregoing description and drawings are merely exemplary, and the scope of the present disclosure should be determined according to the appropriate structure of the appended claims and their equivalents.
[0162] It is obvious that one or more embodiments described herein can be implemented in many different forms of software and / or hardware. The software code and / or dedicated hardware (e.g., application specific integrated circuit (ASIC) and / or field programmable gate array (FPGA)) used to implement the embodiments described herein do not limit the embodiments of the present disclosure. Therefore, to the extent that the operation and behavior of each embodiment are described without reference to specific software code and / or dedicated hardware, it should be understood that those skilled in the art will be able to design software and / or hardware to implement the embodiments based on the description herein.
[0163] In addition, some of the example embodiments described herein may be implemented as logic that performs one or more functions. The logic may be hardware-based, software-based, or based on a combination of hardware and software. Some or all of the logic may be stored on one or more tangible, non-transitory computer-readable storage media, and may include computer-executable instructions that may be executed by a controller or processor. Computer-executable instructions may include instructions that implement one or more embodiments of the present disclosure. Tangible, non-transitory computer-readable storage media may be volatile or non-volatile, and may include, for example, flash memory, volatile storage, removable disks, and non-removable disks.
[0164] While example embodiments have been particularly shown and described, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the embodiments as encompassed by the following claims.
Claims
1. A processing system, include: (a) a host processing domain, the host processing domain comprising a host processor, the host processor being configured to: receiving at least one instruction, the instruction comprising: (i) operand information associated with one or more operands, and (ii) operation information indicating an operation to be performed on the one or more operands; performing the operation indicated in the operation information on the one or more operands to generate operation output information; and Providing instruction information and the operation output information to the metadata processing domain; and (b) the metadata processing domain, the metadata processing domain comprising: (i) write chaining, the write chaining being configured as follows: receiving the operation output information from the host processing domain; and Put the operation output information into a queue; (ii) a label processing unit, wherein the label processing unit is configured to: receiving the instruction information from the host processing domain; obtaining one or more input metadata tags associated with at least one of the instructions using the instruction information; determining whether to allow at least one of the instructions based on the one or more policies being enforced and based on the one or more input metadata tags associated with at least one of the instructions; and In response to determining that the instruction is permitted, causing the write-chained queue to write the operation output information to a memory in a manner that associates the operation output information with at least one output metadata tag; The host processor is further configured to: provide update information indicating one or more updates to the state of the host processor to the metadata processing domain, the update information being a result of executing at least one of the instructions; and the metadata processing domain is further configured to: in response to determining that at least one of the instructions is allowed, update a shadow cache configured to store a shadow copy of the host processing domain to the most recent-allowed instruction using the update information, Wherein, at least one of the instructions includes a first instruction, the instruction information includes first instruction information, and the one or more input metadata tags include one or more first input metadata tags, and the volume tag processing unit is further configured to: receiving, from the host processing domain, second instruction information related to a second instruction executed by the host processor; obtaining one or more second input metadata tags associated with the second instruction using the second instruction information; determining whether to allow the second instruction based on the one or more policies enforced and based on the one or more second input metadata tags associated with the second instruction; and In response to determining that the second instruction is not allowed, one or more turnaround signals are transmitted to the host processing domain to restore the state of the host processing domain to the shadow copy of the host processing domain.
2. The processing system according to claim 1, in, The volume tag processing unit includes a rule cache configured to store one or more rule entries for at least one of the one or more policies enforced by the metadata processing domain.
3. The processing system according to claim 2, in, Determining that the instruction is allowed includes: It is determined that the rules cache stores rule entries that match the one or more input metadata tags associated with at least one of the instructions.
4. The processing system according to claim 3, in, The tag processing unit is configured to use the information stored in the rule entry to provide the at least one output metadata tag to be associated with the operation output information.
5. The processing system according to claim 2, in, The metadata processing domain includes a policy execution processor, and determining that the instruction is allowed includes: determining that the rules cache does not store a rule entry matching the one or more input metadata tags associated with at least one of the instructions; In response to determining that the rule cache does not store a rule entry that matches the one or more input metadata tags associated with at least one of the instructions, providing the one or more input metadata tags associated with at least one of the instructions to the policy execution processor; and The at least one output metadata tag to be associated with the operation output information is received from the policy enforcement processor.
6. The processing system according to claim 5, in, The policy enforcement processor is configured to: receiving, from said volume tag processing unit, said one or more input metadata tags associated with at least one of said instructions; executing policy code with respect to said one or more input metadata tags associated with at least one said instruction to determine whether at least one said instruction is permitted; as well as In response to determining that at least one of the instructions is allowed, a rule entry is installed in the rules cache based on the one or more input metadata tags and the at least one output metadata tag associated with the at least one of the instructions.
7. The processing system according to claim 5, in, The policy execution processor is configured to perform secure boot operations, the policy execution processor including a boot ROM storing one or more public keys, and storing code capable of (i) reading an image from an external memory device, authenticating and decrypting the image using the one or more public keys, and enabling the host processor to continue the boot procedure of the host processor after successful authentication and decryption.
8. The processing system according to claim 7, in, The secure boot operation includes: Upon reset, the host processor remains in a reset state; The policy enforcement processor: (i) starting execution at a reset vector of the policy execution processor; (ii) activating the policy software into the policy software's own memory space; (iii) configuring one or more memory structure protection configuration buffers to define memory regions that each initiator can access to protect regions of memory while retaining policy data segments; (iv) initializing the policy data segment; (v) copying a boot loader for the host processor from the external memory device to main storage; and (vii) releasing the host processor from the reset state.
9. The processing system according to claim 1, in, The one or more input metadata tags are inaccessible to the host processor.
10. The processing system according to claim 1, in, The instruction information includes at least one information selected from the following: information indicating an instruction type of at least one of the instructions; information indicating a memory address at which at least one of the instructions is fetched; information indicating one or more buffers used by at least one of the instructions; as well as Information indicating a memory address referenced by at least one of the instructions.
11. A processing system, include: (a) an application processing domain, the application processing domain comprising an application processor, the application processor being configured to: Implementing a first instruction set architecture; receiving an instruction including operand information and operation information, the operand information indicating one or more operands, the operation information indicating an operation to be performed on the one or more operands, the instruction being formatted according to the first instruction set architecture; as well as providing the instructions in the instruction stream to the metadata processing domain; as well as (b) the metadata processing domain comprises a tag processing unit, the tag processing unit comprises at least one decoding table, and the tag processing unit is configured to extract the operand information and the operation information from the instruction, The metadata processing domain further includes a metadata tag chain queue, which is configured to store output data received from the application processor until an output metadata tag indicating that the instruction complies with a security policy is received from the volume tag processing unit.
12. The processing system according to claim 11, in, The tag processing unit includes at least one lookup table, and the lookup table is configured to: determine instruction attention bit information indicating one or more attention bits and determine operation group information indicating an operation group based on the instruction.
13. The processing system according to claim 12, in, The tag processing unit is further configured to determine, based on the at least one decoding table, that the instruction is formatted according to the first instruction set architecture.
14. The processing system of claim 13, in, It is also determined based on the instruction care bit information indicating the one or more care bits and the operation group information indicating an operation group that the instruction is formatted according to the first instruction set architecture.
15. The processing system according to claim 13, in, The at least one decoding table includes a series of tables including at least a primary table, a secondary table and a plurality of address lookup tables.
16. The processing system according to claim 11, in, The tag processing unit also includes a buffer interface configured to store instructions from the application processor when the tag processing unit is stopped and to provide the stored instructions for use by the tag processing unit when the instruction flow is stopped.
17. The processing system according to claim 16, in, The buffer interface includes a first-in-first-out component.
18. The processing system according to claim 11, in, The tag processing unit also includes a tag mapping table configured to convert one or both of a physical instruction address and a data storage page address into one or both of: (i) a corresponding associated tag address; and (ii) directly into a tag.
19. The processing system according to claim 18, in, The volume label mapping table is configured to accommodate immediate value volume labels specified for a particular size of a memory region, the particular size being selected from a range of memory region sizes.
20. The processing system according to claim 11, in, The metadata tag chain queue is configured as: (i) performing a first write to change the volume label address to a predetermined constant value indicating that a write transaction is in progress; (ii) performing a second write to write new data; as well as (iii) Perform a third write to write a new tag associated with the new data.
21. A method of processing an instruction, include: (a) In the host processing domain, the host processor: receiving each of the instructions including: (i) operand information related to one or more operands, and (ii) operation information indicating an operation to be performed on the one or more operands; performing the operation indicated in the operation information on the one or more operands to generate operation output information; as well as Providing instruction information and the operation output information to the metadata processing domain; as well as (b) In the metadata processing domain: By writing chain: receiving the operation output information from the host processing domain; and Put the operation output information into a queue; as well as By label processing unit: receiving the instruction information from the host processing domain; obtaining one or more input metadata tags associated with at least one of the instructions using the instruction information; determining whether to allow at least one of the instructions based on the one or more policies enforced and based on the one or more input metadata tags associated with at least one of the instructions; as well as In response to determining that the instruction is allowed, causing the write-chained queue to write the operation output information to a memory in a manner that associates the operation output information with at least one output metadata tag; providing, by the host processor, update information indicative of one or more updates to a state of the host processor to the metadata processing domain, the update information being a result of executing at least one of the instructions; and, by the metadata processing domain, in response to determining that at least one of the instructions is allowed, using the update information to update a shadow cache configured to store a shadow copy of the host processing domain to the most recent-allowed instruction, Wherein, at least one of the instructions includes a first instruction, the instruction information includes first instruction information, and the one or more input metadata tags include one or more first input metadata tags, and the method further includes, by the volume tag processing unit: receiving, from the host processing domain, second instruction information related to a second instruction executed by the host processor; using the second instruction information to obtain one or more second input metadata tags associated with the second instruction; determining whether to allow the second instruction based on the one or more policies enforced and based on the one or more second input metadata tags associated with the second instruction; and In response to determining that the second instruction is not allowed, one or more turnaround signals are transmitted to the host processing domain to restore the state of the host processing domain to the shadow copy of the host processing domain.
22. The method according to claim 21, in, The tag processing unit includes a rule cache configured to store one or more rule entries of at least one of the one or more policies enforced by the metadata processing domain, and determining that the instruction is allowed includes: It is determined that the rules cache stores rule entries that match the one or more input metadata tags associated with at least one of the instructions.
23. The method according to claim 22, further comprising: include: The at least one output metadata tag to be associated with the operation output information is provided by the tag processing unit using information stored in the rule entry.
24. The method according to claim 22, in, The metadata processing domain includes a policy execution processor, and determining that the instruction is allowed includes: determining that the rules cache does not store a rule entry matching the one or more input metadata tags associated with at least one of the instructions; In response to determining that the rule cache does not store a rule entry that matches the one or more input metadata tags associated with at least one of the instructions, providing the one or more input metadata tags associated with at least one of the instructions to the policy execution processor; and The at least one output metadata tag to be associated with the operation output information is received from the policy enforcement processor.
25. The method of claim 24, further comprising, by the policy execution processor: receiving, from said volume tag processing unit, said one or more input metadata tags associated with at least one of said instructions; executing policy code with respect to the one or more input metadata tags associated with at least one of the instructions to determine whether at least one of the instructions is allowed; and In response to determining that at least one of the instructions is allowed, a rule entry is installed in the rules cache based on the one or more input metadata tags and the at least one output metadata tag associated with the at least one of the instructions.
Citation Information
Patent Citations
A method and apparatus for supporting address translation in a virtual machine environment
CN101107593A
Method for customizing service document based on metadata and apparatus
CN101359290A
Processor
CN101546255A
Download management of discardable files
CN102257497A
Optimizations for an unbounded transactional memory (utm) system
CN102460376A
