HARDWARE APPARATUSES AND METHODS FOR MEMORY CORRUPTION DETECTION
Methods and apparatuses relating to memory corruption detection are described. In one embodiment, a hardware processor includes an execution unit to execute an instruction to request access to a block of a memory through a pointer to the block of the memory, and a memory management unit to allow access to the block of the memory when a memory corruption detection value in the pointer is validated with a memory corruption detection value in the memory for the block, wherein a position of the memory corruption detection value in the pointer is selectable between a first location and a second, different location.
The present application is a continuation application claiming priority from U.S. patent application Ser. No. 17/020,663 filed Sep. 14, 2020, now U.S. Pat. No. 11,645,135, which is a continuation application claiming priority from U.S. patent application Ser. No. 16/224,579 filed Dec. 18, 2018, now U.S. Pat. No. 10,776,190, which is a continuation application claiming priority from U.S. patent application Ser. No. 14/977,354 filed Dec. 21, 2015, now U.S. Pat. No. 10,162,694, each of which is incorporated herein by reference in its entirety.
TECHNICAL FIELDThe disclosure relates generally to electronics, and, more specifically, an embodiment of the disclosure relates to a hardware processor with memory corruption detection hardware.
BACKGROUNDA processor, or set of processors, executes instructions from an instruction set, e.g., the instruction set architecture (ISA). The instruction set is the part of the computer architecture related to programming, and generally includes the native data types, instructions, register architecture, addressing modes, memory architecture, interrupt and exception handling, and external input and output (I/O). It should be noted that the term instruction herein may refer to a macro-instruction, e.g., an instruction that is provided to the processor for execution, or to a micro-instruction, e.g., an instruction that results from a processor's decoder decoding macro-instructions.
The present disclosure is illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:
In the following description, numerous specific details are set forth. However, it is understood that embodiments of the disclosure may be practiced without these specific details. In other instances, well-known circuits, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
References in the specification to “one embodiment,” “an embodiment,” “an example embodiment,” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
A (e.g., hardware) processor (e.g., having one or more cores) may execute instructions to operate on data, for example, to perform arithmetic, logic, or other functions. A hardware processor may access data in a memory (e.g., a data storage device). In one embodiment, a hardware processor is a client requesting access to (e.g., load or store) data and the memory is a server containing the data. In one embodiment, a computer includes a hardware processor requesting access to (e.g., load or store) data and the memory is local to the computer. Memory may be divided into separate lines (e.g., one or more cache lines) of data, for example, that may be managed as a unit for coherence purposes. In certain embodiments, a (e.g., data) pointer (e.g., an address) is a value that refers to (e.g., points) the location of data, for example, a pointer may be an (e.g., linear) address and the data may be stored at that (e.g., linear) address. In certain embodiments, memory may be divided into multiple lines and each line may have its own (e.g., unique) address. For example, a line of memory may include storage for 512 bits, 256 bits, 128 bits, 64 bits, 32 bits, 16 bits, or 8 bits of data.
In certain embodiments, memory corruption (e.g., by an attacker) may be caused by an out-of-bound access (e.g., memory access using the base address of a block of memory and an offset that exceeds the allocated size of the block) or by a dangling pointer (e.g., a pointer which referenced a block of memory (e.g., buffer) that has been de-allocated).
Certain embodiments herein may utilize memory corruption detection (MCD) hardware and/or methods, for example, to prevent an out-of-bound access or an access with a dangling pointer.
Turning now to the figures,
Hardware processor 100 may include one or more register 108, for example, control register or configuration registers, such as, but not limited to, model specific register (MSR) or other registers. In one embodiment, a value stored in a control register is to change (e.g., control) selectable features, for example, features of the hardware processor.
Hardware processor 100 includes a coupling (e.g., connection) to a memory 110. Memory 110 may be a memory local to the hardware processor (e.g., system memory). Memory 110 may be a memory separate from the hardware processor, for example, memory of a server. Note that the figures herein may not depict all data communication connections. One of ordinary skill in the art will appreciate that this is to not obscure certain details in the figures. Note that a double headed arrow in the figures may not require two-way communication, for example, it may indicate one-way communication (e.g., to or from that component or device). Any or all combinations of communications paths may be utilized in certain embodiments herein.
Hardware processor 100 includes a memory management unit 106, for example, to perform and/or control access (e.g., by the execution unit 104) to the (e.g., addressable memory 112 of) memory 110. In one embodiment, hardware processor includes a connection to the memory. Additionally or alternatively, memory management unit 106 may include a connection to the (e.g., addressable memory 112 and/or memory corruption detection table 116 of) memory 110.
Certain embodiments may include memory corruption detection (MCD) features, for example, in a memory management unit. Certain embodiments may utilize a memory corruption detection (MCD) value in each pointer and a corresponding (e.g., matching) MCD value saved in the memory for the memory being pointed to, for example, saved as metadata (e.g., data that describes other data) for each block of data being pointed to by the pointer. A MCD value may be a sequence of bits, for example, a 2, 3, 4, 5, 6, 7, 8. 9, 10, 11, 12, 13, 14, 15, 16 bits, etc. In one embodiment, a memory corruption detection (MCD) hardware processing system or processor (e.g., a memory management unit of the processor or system) is to validate pointers produced by instructions of the applications being executed by the processing system or processor that request access to the memory.
Certain embodiments herein (e.g., of settings of an MMU circuit) utilize one of more of the following attributes for memory corruption detection: MCD enabled (e.g., to turn the MCD feature on or off), MCD position (e.g., to define the bit position(s) of MCD values (metadata) in pointers), MCD protected space, for example, a prefix in the most significant bit positions of the pointer (e.g., to define the linear address range that is to be protected by the architecture), and MCD directory base (e.g., to point to the memory MCD value (e.g., metadata) table (e.g., directory)).
Certain embodiments herein allow the flexible placement of MCD values (e.g., metadata bits) into a pointer, e.g., not limited to the most significant bits. Certain embodiments herein allow for carving out a smaller address space (e.g., reduction in linear address space overhead) and/or for scaling for (e.g., 64 bit) paging modes. Certain embodiments herein allow protection with MCD for only a subset (e.g., part of) memory through a protected space selection (e.g., selecting the address(es) to protect with MCD and not protecting the other addresses with MCD).
In
In certain embodiments, the generated MCD value, or a different value that corresponds or maps to the generated MCD value for the block of data, is stored in one or more bits of a pointer, e.g., a pointer that is returned by the memory allocation routine to the application that requested the memory allocation. In
In certain embodiments, responsive to receiving a memory access instruction (e.g., as determined from an opcode of the instruction or an attempt to access memory), the processing system or processor compares the MCD value retrieved from the MCD table (e.g., for the block of data to be accessed) to the MCD value from (e.g., extracted from) the pointer specified by the memory access instruction. In one embodiment, when the two MCD values match, the access to the block of data is granted. In one embodiment, when the two MCD values mismatch, access to the block of data is denied, e.g., a page fault may be generated. In one embodiment, the MCD table (e.g., MCD table 116 or MCD table 216) is in the linear address space of the memory. In one embodiment, the circuit and/or logic to perform the MCD validation check (e.g., in memory management unit (MMU) 106) is to access the memory but the other portions of the processor (e.g., the execution unit) are to not access the memory unless the MCD validation check passes (e.g., a match is true). In one embodiment, a request for access to a block of memory is a load instruction. In one embodiment, a request for access to a block of memory is a store instruction.
In
In one embodiment, the position of the memory corruption detection value in each pointer is selectable, for example, at manufacture, at set-up, or by an application (e.g., software, such as, but not limited to, an operating system), e.g., during activation of an MCD feature. The position may be set in the hardware processor, e.g., by writing to a control (or configuration) register. In one embodiment, the MCD protected space (e.g., which subset(s) of the memory is protected by the MCD features) is selectable, for example, at manufacture, at set-up, or by an application (e.g., software, such as, but not limited to, an operating system), e.g., during activation of an MCD feature. The protected space (e.g., less than all of the (addressable) memory) may be set in the hardware processor, e.g., by writing to a control (or configuration) register. In one embodiment, MCD hardware and methods, for example, via an ISA interface, allows the definition of one of more of the following, e.g., by software (e.g. OS): (1) the position of the MCD value (e.g., metadata) in the pointer, e.g., which bits out of the linear address in the pointer are used to store the MCD value, (2) the MCD protected space (e.g., range) to define the subset of memory (e.g., addresses) that is to go through memory corruption detection (e.g., and the address lines in memory that will have an MCD value), for example, the MCD protected space may be the linear address bits prefix that defines the protected region or memory range that is to go through memory corruption detection (e.g., and contains MCD value), and (3) a pointer (e.g., linear address pointer) to the base of the memory MCD (e.g., metadata) table(s). In one embodiment, multiple subsets (e.g., regions) of memory may be protected by MCD, for example, by having multiple attributes sets including the information above. In one embodiment, these attributes may be implemented (e.g., set) through a register (e.g., a control and/or configuration register).
In one embodiment, the following pseudocode in Table 1 below may be used to check if a linear address in a pointer is part of an MCD protected space (e.g., such that MCD validation check is to be performed).
In one embodiment, there are multiple regions (e.g., [i] with a different index i for each region) and each region to be protected by MCD may be defined by one or more of: MCD[i].Enabled, MCD[i].Position, MCD[i].ProtectedSpace (e.g., MCD[i].Prefix), and MCD[i]. BaseAddressOfMCDTable. In one embodiment, an (e.g., arbitrary) order for MCD protected space may be as in the following pseudocode in Table 2 for N protected regions.
As noted above, the MCD value being 6 bits wide is merely an example and other sizes may be utilized.
A write (e.g., store instruction) to a register may set one or more of the fields, e.g., a write from software to enable and/or set-up MCD protection. A plurality of sets of MCD configuration and/or control registers may be utilized, for example, MCD CFG MSR [i] and MCD CTRL MSR [i], e.g., where i may be any positive integer. In one embodiment, a different value of i exists for each subset (e.g., region) of memory to be protected by MCD, for example, wherein each subset (e.g., region) may have a different MCD table (e.g., and thus base address) and/or different size, position, protected space, combinations thereof, etc.
The following discusses examples of the number of lines that a pointer of a certain size may uniquely identify, e.g., a 57 bit linear address may allow unique pointers to 128 petabytes (PB).
In one embodiment, a hardware processor includes an execution unit to execute an instruction to request access to a block of a memory through a pointer to the block of the memory, and a memory management unit to allow access to the block of the memory when a memory corruption detection value in the pointer is validated with a memory corruption detection value in the memory for the block, wherein a position of the memory corruption detection value in the pointer is selectable between a first location and a second, different location. The hardware processor may include a control register to set the position to the first location or the second, different location. The hardware processor may include a control register to set a memory corruption detection protected space for a subset of the memory. The pointer may include a memory corruption detection protected space value, and the memory management unit may allow access to the block of the memory without a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is not within the memory corruption detection protected space for the subset of the memory. The pointer may include a memory corruption detection protected space value, and the memory management unit may perform a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is within the memory corruption detection protected space for the subset of the memory. The hardware processor may include a register to store a base address of a memory corruption detection table in the memory comprising the memory corruption detection value for the block. The position of the memory corruption detection value in the pointer may be selectable between the first location, the second, different location, and a third, different location. The pointer may include a linear address of the block of the memory.
In another embodiment, a method includes receiving a request to access a block of a memory through a pointer to the block of the memory, and allowing access to the block of the memory when a memory corruption detection value in the pointer is validated with a memory corruption detection value in the memory for the block, wherein a position of the memory corruption detection value in the pointer is selectable between a first location and a second, different location. The method may include setting the position to the first location or the second, different location. The method may include setting a memory corruption detection protected space for a subset of the memory. The pointer may include a memory corruption detection protected space value, and the method may include allowing access to the block of the memory without a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is not within the memory corruption detection protected space for the subset of the memory. The pointer may include a memory corruption detection protected space value, and the method may include performing a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is within the memory corruption detection protected space for the subset of the memory. The method may include storing a base address of a memory corruption detection table in the memory comprising the memory corruption detection value for the block. The position of the memory corruption detection value in the pointer may be selectable between the first location, the second, different location, and a third, different location. The pointer may include a linear address of the block of the memory.
In yet another embodiment, a system includes a memory, a hardware processor comprising an execution unit to execute an instruction to request access to a block of the memory through a pointer to the block of the memory, and a memory management unit to allow access to the block of the memory when a memory corruption detection value in the pointer is validated with a memory corruption detection value in the memory for the block, wherein a position of the memory corruption detection value in the pointer is selectable between a first location and a second, different location. The system may include a control register to set the position to the first location or the second, different location. The system may include a control register to set a memory corruption detection protected space for a subset of the memory. The pointer may include a memory corruption detection protected space value, and the memory management unit may allow access to the block of the memory without a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is not within the memory corruption detection protected space for the subset of the memory. The pointer may include a memory corruption detection protected space value, and the memory management unit may perform a validation check of the memory corruption detection value in the pointer with the memory corruption detection value in the memory for the block when the memory corruption detection protected space value is within the memory corruption detection protected space for the subset of the memory. The system may include a register to store a base address of a memory corruption detection table in the memory comprising the memory corruption detection value for the block. The position of the memory corruption detection value in the pointer may be selectable between the first location, the second, different location, and a third, different location. The pointer may include a linear address of the block of the memory.
In another embodiment, a hardware processor includes means to execute an instruction to request access to a block of a memory through a pointer to the block of the memory, and means to allow access to the block of the memory when a memory corruption detection value in the pointer is validated with a memory corruption detection value in the memory for the block, wherein a position of the memory corruption detection value in the pointer is selectable between a first location and a second, different location.
In yet another embodiment, an apparatus comprises a data storage device that stores code that when executed by a hardware processor causes the hardware processor to perform any method disclosed herein. An apparatus may be as described in the detailed description. A method may be as described in the detailed description.
An instruction set may include one or more instruction formats. A given instruction format may define various fields (e.g., number of bits, location of bits) to specify, among other things, the operation to be performed (e.g., opcode) and the operand(s) on which that operation is to be performed and/or other data field(s) (e.g., mask). Some instruction formats are further broken down though the definition of instruction templates (or subformats). For example, the instruction templates of a given instruction format may be defined to have different subsets of the instruction format's fields (the included fields are typically in the same order, but at least some have different bit positions because there are less fields included) and/or defined to have a given field interpreted differently. Thus, each instruction of an ISA is expressed using a given instruction format (and, if defined, in a given one of the instruction templates of that instruction format) and includes fields for specifying the operation and the operands. For example, an exemplary ADD instruction has a specific opcode and an instruction format that includes an opcode field to specify that opcode and operand fields to select operands (source1/destination and source2); and an occurrence of this ADD instruction in an instruction stream will have specific contents in the operand fields that select specific operands. A set of SIMD extensions referred to as the Advanced Vector Extensions (AVX) (AVX1 and AVX2) and using the Vector Extensions (VEX) coding scheme has been released and/or published (e.g., see Intel® 64 and IA-32 Architectures Software Developer's Manual, September 2015; and see Intel® Architecture Instruction Set Extensions Programming Reference, August 2015).
Exemplary Core Architectures, Processors, and Computer ArchitecturesProcessor cores may be implemented in different ways, for different purposes, and in different processors. For instance, implementations of such cores may include: 1) a general purpose in-order core intended for general-purpose computing; 2) a high performance general purpose out-of-order core intended for general-purpose computing; 3) a special purpose core intended primarily for graphics and/or scientific (throughput) computing. Implementations of different processors may include: 1) a CPU including one or more general purpose in-order cores intended for general-purpose computing and/or one or more general purpose out-of-order cores intended for general-purpose computing; and 2) a coprocessor including one or more special purpose cores intended primarily for graphics and/or scientific (throughput). Such different processors lead to different computer system architectures, which may include: 1) the coprocessor on a separate chip from the CPU; 2) the coprocessor on a separate die in the same package as a CPU; 3) the coprocessor on the same die as a CPU (in which case, such a coprocessor is sometimes referred to as special purpose logic, such as integrated graphics and/or scientific (throughput) logic, or as special purpose cores); and 4) a system on a chip that may include on the same die the described CPU (sometimes referred to as the application core(s) or application processor(s)), the above described coprocessor, and additional functionality. Exemplary core architectures are described next, followed by descriptions of exemplary processors and computer architectures.
Exemplary Core Architectures In-Order and Out-of-Order Core Block DiagramIn
The front end unit 1930 includes a branch prediction unit 1932 coupled to an instruction cache unit 1934, which is coupled to an instruction translation lookaside buffer (TLB) 1936, which is coupled to an instruction fetch unit 1938, which is coupled to a decode unit 1940. The decode unit 1940 (or decoder or decoder unit) may decode instructions (e.g., macro-instructions), and generate as an output one or more micro-operations, micro-code entry points, micro-instructions, other instructions, or other control signals, which are decoded from, or which otherwise reflect, or are derived from, the original instructions. The decode unit 1940 may be implemented using various different mechanisms. Examples of suitable mechanisms include, but are not limited to, look-up tables, hardware implementations, programmable logic arrays (PLAs), microcode read only memories (ROMs), etc. In one embodiment, the core 1990 includes a microcode ROM or other medium that stores microcode for certain macroinstructions (e.g., in decode unit 1940 or otherwise within the front end unit 1930). The decode unit 1940 is coupled to a rename/allocator unit 1952 in the execution engine unit 1950.
The execution engine unit 1950 includes the rename/allocator unit 1952 coupled to a retirement unit 1954 and a set of one or more scheduler unit(s) 1956. The scheduler unit(s) 1956 represents any number of different schedulers, including reservations stations, central instruction window, etc. The scheduler unit(s) 1956 is coupled to the physical register file(s) unit(s) 1958. Each of the physical register file(s) units 1958 represents one or more physical register files, different ones of which store one or more different data types, such as scalar integer, scalar floating point, packed integer, packed floating point, vector integer, vector floating point, status (e.g., an instruction pointer that is the address of the next instruction to be executed), etc. In one embodiment, the physical register file(s) unit 1958 comprises a vector registers unit, a write mask registers unit, and a scalar registers unit. These register units may provide architectural vector registers, vector mask registers, and general purpose registers. The physical register file(s) unit(s) 1958 is overlapped by the retirement unit 1954 to illustrate various ways in which register renaming and out-of-order execution may be implemented (e.g., using a reorder buffer(s) and a retirement register file(s); using a future file(s), a history buffer(s), and a retirement register file(s); using a register maps and a pool of registers; etc.). The retirement unit 1954 and the physical register file(s) unit(s) 1958 are coupled to the execution cluster(s) 1960. The execution cluster(s) 1960 includes a set of one or more execution units 1962 and a set of one or more memory access units 1964. The execution units 1962 may perform various operations (e.g., shifts, addition, subtraction, multiplication) and on various types of data (e.g., scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some embodiments may include a number of execution units dedicated to specific functions or sets of functions, other embodiments may include only one execution unit or multiple execution units that all perform all functions. The scheduler unit(s) 1956, physical register file(s) unit(s) 1958, and execution cluster(s) 1960 are shown as being possibly plural because certain embodiments create separate pipelines for certain types of data/operations (e.g., a scalar integer pipeline, a scalar floating point/packed integer/packed floating point/vector integer/vector floating point pipeline, and/or a memory access pipeline that each have their own scheduler unit, physical register file(s) unit, and/or execution cluster—and in the case of a separate memory access pipeline, certain embodiments are implemented in which only the execution cluster of this pipeline has the memory access unit(s) 1964). It should also be understood that where separate pipelines are used, one or more of these pipelines may be out-of-order issue/execution and the rest in-order.
The set of memory access units 1964 is coupled to the memory unit 1970, which includes a data TLB unit 1972 coupled to a data cache unit 1974 coupled to a level 2 (L2) cache unit 1976. In one exemplary embodiment, the memory access units 1964 may include a load unit, a store address unit, and a store data unit, each of which is coupled to the data TLB unit 1972 in the memory unit 1970. The instruction cache unit 1934 is further coupled to a level 2 (L2) cache unit 1976 in the memory unit 1970. The L2 cache unit 1976 is coupled to one or more other levels of cache and eventually to a main memory.
By way of example, the exemplary register renaming, out-of-order issue/execution core architecture may implement the pipeline 1900 as follows: 1) the instruction fetch 1938 performs the fetch and length decoding stages 1902 and 1904; 2) the decode unit 1940 performs the decode stage 1906; 3) the rename/allocator unit 1952 performs the allocation stage 1908 and renaming stage 1910; 4) the scheduler unit(s) 1956 performs the schedule stage 1912; 5) the physical register file(s) unit(s) 1958 and the memory unit 1970 perform the register read/memory read stage 1914; the execution cluster 1960 perform the execute stage 1916; 6) the memory unit 1970 and the physical register file(s) unit(s) 1958 perform the write back/memory write stage 1918; 7) various units may be involved in the exception handling stage 1922; and 8) the retirement unit 1954 and the physical register file(s) unit(s) 1958 perform the commit stage 1924.
The core 1990 may support one or more instructions sets (e.g., the x86 instruction set (with some extensions that have been added with newer versions); the MIPS instruction set of MIPS Technologies of Sunnyvale, Calif.; the ARM instruction set (with optional additional extensions such as NEON) of ARM Holdings of Sunnyvale, Calif.), including the instruction(s) described herein. In one embodiment, the core 1990 includes logic to support a packed data instruction set extension (e.g., AVX1, AVX2), thereby allowing the operations used by many multimedia applications to be performed using packed data.
It should be understood that the core may support multithreading (executing two or more parallel sets of operations or threads), and may do so in a variety of ways including time sliced multithreading, simultaneous multithreading (where a single physical core provides a logical core for each of the threads that physical core is simultaneously multithreading), or a combination thereof (e.g., time sliced fetching and decoding and simultaneous multithreading thereafter such as in the Intel® Hyperthreading technology).
While register renaming is described in the context of out-of-order execution, it should be understood that register renaming may be used in an in-order architecture. While the illustrated embodiment of the processor also includes separate instruction and data cache units 1934/1974 and a shared L2 cache unit 1976, alternative embodiments may have a single internal cache for both instructions and data, such as, for example, a Level 1 (L1) internal cache, or multiple levels of internal cache. In some embodiments, the system may include a combination of an internal cache and an external cache that is external to the core and/or the processor. Alternatively, all of the cache may be external to the core and/or the processor.
Specific Exemplary In-Order Core ArchitectureThe local subset of the L2 cache 2004 is part of a global L2 cache that is divided into separate local subsets, one per processor core. Each processor core has a direct access path to its own local subset of the L2 cache 2004. Data read by a processor core is stored in its L2 cache subset 2004 and can be accessed quickly, in parallel with other processor cores accessing their own local L2 cache subsets. Data written by a processor core is stored in its own L2 cache subset 2004 and is flushed from other subsets, if necessary. The ring network ensures coherency for shared data. The ring network is bi-directional to allow agents such as processor cores, L2 caches and other logic blocks to communicate with each other within the chip. Each ring data-path is 1012-bits wide per direction.
Thus, different implementations of the processor 2100 may include: 1) a CPU with the special purpose logic 2108 being integrated graphics and/or scientific (throughput) logic (which may include one or more cores), and the cores 2102A-N being one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, a combination of the two); 2) a coprocessor with the cores 2102A-N being a large number of special purpose cores intended primarily for graphics and/or scientific (throughput); and 3) a coprocessor with the cores 2102A-N being a large number of general purpose in-order cores. Thus, the processor 2100 may be a general-purpose processor, coprocessor or special-purpose processor, such as, for example, a network or communication processor, compression engine, graphics processor, GPGPU (general purpose graphics processing unit), a high-throughput many integrated core (MIC) coprocessor (including 30 or more cores), embedded processor, or the like. The processor may be implemented on one or more chips. The processor 2100 may be a part of and/or may be implemented on one or more substrates using any of a number of process technologies, such as, for example, BiCMOS, CMOS, or NMOS.
The memory hierarchy includes one or more levels of cache within the cores, a set or one or more shared cache units 2106, and external memory (not shown) coupled to the set of integrated memory controller units 2114. The set of shared cache units 2106 may include one or more mid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, a last level cache (LLC), and/or combinations thereof. While in one embodiment a ring based interconnect unit 2112 interconnects the integrated graphics logic 2108, the set of shared cache units 2106, and the system agent unit 2110/integrated memory controller unit(s) 2114, alternative embodiments may use any number of well-known techniques for interconnecting such units. In one embodiment, coherency is maintained between one or more cache units 2106 and cores 2102-A-N.
In some embodiments, one or more of the cores 2102A-N are capable of multithreading. The system agent 2110 includes those components coordinating and operating cores 2102A-N. The system agent unit 2110 may include for example a power control unit (PCU) and a display unit. The PCU may be or include logic and components needed for regulating the power state of the cores 2102A-N and the integrated graphics logic 2108. The display unit is for driving one or more externally connected displays.
The cores 2102A-N may be homogenous or heterogeneous in terms of architecture instruction set; that is, two or more of the cores 2102A-N may be capable of execution the same instruction set, while others may be capable of executing only a subset of that instruction set or a different instruction set.
Exemplary Computer ArchitecturesReferring now to
The optional nature of additional processors 2215 is denoted in
The memory 2240 may be, for example, dynamic random access memory (DRAM), phase change memory (PCM), or a combination of the two. For at least one embodiment, the controller hub 2220 communicates with the processor(s) 2210, 2215 via a multi-drop bus, such as a frontside bus (FSB), point-to-point interface such as QuickPath Interconnect (QPI), or similar connection 2295.
In one embodiment, the coprocessor 2245 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like. In one embodiment, controller hub 2220 may include an integrated graphics accelerator.
There can be a variety of differences between the physical resources 2210, 2215 in terms of a spectrum of metrics of merit including architectural, microarchitectural, thermal, power consumption characteristics, and the like.
In one embodiment, the processor 2210 executes instructions that control data processing operations of a general type. Embedded within the instructions may be coprocessor instructions. The processor 2210 recognizes these coprocessor instructions as being of a type that should be executed by the attached coprocessor 2245. Accordingly, the processor 2210 issues these coprocessor instructions (or control signals representing coprocessor instructions) on a coprocessor bus or other interconnect, to coprocessor 2245. Coprocessor(s) 2245 accept and execute the received coprocessor instructions.
Referring now to
Processors 2370 and 2380 are shown including integrated memory controller (IMC) units 2372 and 2382, respectively. Processor 2370 also includes as part of its bus controller units point-to-point (P-P) interfaces 2376 and 2378; similarly, second processor 2380 includes P-P interfaces 2386 and 2388. Processors 2370, 2380 may exchange information via a point-to-point (P-P) interface 2350 using P-P interface circuits 2378, 2388. As shown in
Processors 2370, 2380 may each exchange information with a chipset 2390 via individual P-P interfaces 2352, 2354 using point to point interface circuits 2376, 2394, 2386, 2398. Chipset 2390 may optionally exchange information with the coprocessor 2338 via a high-performance interface 2339. In one embodiment, the coprocessor 2338 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like.
A shared cache (not shown) may be included in either processor or outside of both processors, yet connected with the processors via P-P interconnect, such that either or both processors' local cache information may be stored in the shared cache if a processor is placed into a low power mode.
Chipset 2390 may be coupled to a first bus 2316 via an interface 2396. In one embodiment, first bus 2316 may be a Peripheral Component Interconnect (PCI) bus, or a bus such as a PCI Express bus or another third generation I/O interconnect bus, although the scope of the present disclosure is not so limited.
As shown in
Referring now to
Referring now to
Embodiments (e.g., of the mechanisms) disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementation approaches. Embodiments of the disclosure may be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code, such as code 2330 illustrated in
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code may also be implemented in assembly or machine language, if desired. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium which represents various logic within the processor, which when read by a machine causes the machine to fabricate logic to perform the techniques described herein. Such representations, known as “IP cores,” may be stored on a tangible, machine readable medium and supplied to various customers or manufacturing facilities to load into the fabrication machines that actually make the logic or processor.
Such machine-readable storage media may include, without limitation, non-transitory, tangible arrangements of articles manufactured or formed by a machine or device, including storage media such as hard disks, any other type of disk including floppy disks, optical disks, compact disk read-only memories (CD-ROMs), compact disk rewritables (CD-RWs), and magneto-optical disks, semiconductor devices such as read-only memories (ROMs), random access memories (RAMs) such as dynamic random access memories (DRAMs), static random access memories (SRAMs), erasable programmable read-only memories (EPROMs), flash memories, electrically erasable programmable read-only memories (EEPROMs), phase change memory (PCM), magnetic or optical cards, or any other type of media suitable for storing electronic instructions.
Accordingly, embodiments of the disclosure also include non-transitory, tangible machine-readable media containing instructions or containing design data, such as Hardware Description Language (HDL), which defines structures, circuits, apparatuses, processors and/or system features described herein. Such embodiments may also be referred to as program products.
Emulation (Including Binary Translation, Code Morphing, Etc.)In some cases, an instruction converter may be used to convert an instruction from a source instruction set to a target instruction set. For example, the instruction converter may translate (e.g., using static binary translation, dynamic binary translation including dynamic compilation), morph, emulate, or otherwise convert an instruction to one or more other instructions to be processed by the core. The instruction converter may be implemented in software, hardware, firmware, or a combination thereof. The instruction converter may be on processor, off processor, or part on and part off processor.
Claims
1. A processor comprising:
- decode circuitry to decode a load instruction, the load instruction to operate on a pointer, the pointer comprising an address to a block of data in memory and a first value; and
- circuitry coupled with the decode circuitry, the circuitry, based on decode of the load instruction by the decode circuitry, to: determine whether the first value matches a second value corresponding to the block of data; and load the block of data from the memory when the first value matches the second value.
2. The processor of claim 1, further comprising a configuration register to store data to indicate a number of bits of the first value.
3. The processor of claim 1, further comprising a configuration register to store data to indicate a number of bits of the first value and to store data to indicate a position of the first value.
4. The processor of claim 1, further comprising a configuration register to have a field to indicate which bits of the pointer are to include the first value.
5. The processor of claim 1, further comprising a configuration register to store data to control whether the circuitry is to determine whether the first value matches the second value.
6. The processor of claim 1, further comprising a first set of one or more configuration registers to store data to control whether the circuitry is to determine whether the first value matches the second value and to store data to indicate a number of bits of the first value.
7. The processor of claim 6, further comprising a second set of one or more configuration registers to store data to indicate a number of bits of a third value to be included in a second pointer along with a second address.
8. The processor of claim 1, wherein the first value does not include a most significant bit of the pointer.
9. The processor of claim 8, wherein the most significant bit of the pointer is to have a value of one for an operating system.
10. The processor of claim 1, wherein the pointer is to have a plurality of most significant canonical bits that are all to have a same value.
11. The processor of claim 1, wherein the first value comprises a most significant bit of the pointer.
12. The processor of claim 1, wherein the processor is a reduced instruction set computing (RISC) processor, and wherein the first value comprises five bits.
13. The processor of claim 12, wherein the first value comprises ten bits.
14. The processor of claim 1, wherein the block of data is a 128-bit block of data.
15. The processor of claim 1, wherein the processor is to indicate if the first value does not match the second value.
16. A computer system comprising:
- a dynamic random access memory (DRAM);
- a processor coupled with the DRAM, the processor comprising:
- decode circuitry to decode a load instruction, the load instruction to operate on a pointer, the pointer comprising an address to a block of data in memory and a first value; and
- circuitry coupled with the decode circuitry, the circuitry, based on decode of the load instruction by the decode circuitry, to: determine whether the first value matches a second value corresponding to the block of data; and load the block of data from the memory when the first value matches the second value.
17. The computer system of claim 16, wherein the computer system further comprises a mass storage device coupled with the processor, and wherein the processor further comprises a configuration register to have a field to indicate which bits of the pointer are to include the first value.
18. The computer system of claim 16, wherein the computer system further comprises a communication device coupled with the processor, and wherein the processor further comprises:
- a first set of one or more configuration registers to store data to control whether the circuitry is to determine whether the first value matches the second value and to store data to indicate a number of bits of the first value; and
- a second set of one or more configuration registers to store data to indicate a number of bits of a third value to be included in a second pointer along with a second address.
19. The computer system of claim 16, wherein the computer system further comprises a communication device coupled with the processor, wherein the first value comprises five bits, and wherein the pointer is to have a plurality of most significant canonical bits that are all to have a same value.
20. A method comprising:
- decoding a load instruction, the load instruction operating on a pointer, the pointer comprising an address to a block of data in memory and a first value;
- determining whether the first value matches a second value corresponding to the block of data; and
- loading the block of data from the memory when the first value matches the second value.
Type: Application
Filed: May 8, 2023
Publication Date: Aug 31, 2023
Inventors: Tomer Stark (Tirat Carmel), Ron Gabor (Herzliya), Joseph Nuzman (Haifa), Raanan Sade (Portland, OR), Bryant E. Bigbee (Scottsdale, AZ)
Application Number: 18/313,905