Memory address checking in a proccesor that support both a segmented and a unsegmented address space
First Claim
1. An apparatus for a processor, the apparatus comprising:
- circuitry configured to perform one or more canonical checks for a data reference and a segment limit check on an effective address of the data reference, wherein a canonical check is a check to ensure, for an address of the data reference, that each address bit that is not included in an implemented address space of the processor is equal to a most significant address bit that is included in the implemented address space; and
a first circuit coupled to the circuitry and coupled to receive an indication of an operating mode of the processor and an indication of the segment corresponding to the data reference, wherein the first circuit is configured to select, responsive to the operating mode of the processor and the segment, one or more of;
a first result of the segment limit check and a second result of the one or more canonical checks for generating an exception indication for the data reference.
1 Assignment
0 Petitions
Accused Products
Abstract
A processor supports several operating modes. In at least one of the operating modes, a segmented address space is used. In at least one other operating mode, an unsegmented address space is used. In the unsegmented address space, a canonical check applies to addresses. In the segmented address space, a segment limit check applies. In some cases, both a segment limit check and a canonical check applies dependent on the segment used (e.g. either user or table segments). An exception circuit selects one or more of the canonical check result(s) and the segment limit check result to generate an exception indication. The selection is dependent on the operating mode and the segment of the data reference. The processor may also perform selective truncation of addresses based on the operating mode and the segment.
-
Citations
33 Claims
-
1. An apparatus for a processor, the apparatus comprising:
-
circuitry configured to perform one or more canonical checks for a data reference and a segment limit check on an effective address of the data reference, wherein a canonical check is a check to ensure, for an address of the data reference, that each address bit that is not included in an implemented address space of the processor is equal to a most significant address bit that is included in the implemented address space; and
a first circuit coupled to the circuitry and coupled to receive an indication of an operating mode of the processor and an indication of the segment corresponding to the data reference, wherein the first circuit is configured to select, responsive to the operating mode of the processor and the segment, one or more of;
a first result of the segment limit check and a second result of the one or more canonical checks for generating an exception indication for the data reference.
-
-
2. An apparatus for a processor, the apparatus comprising:
-
circuitry configured to perform one or more canonical checks for a data reference and a segment limit check on an effective address of the data reference; and
a first circuit coupled to the circuitry and coupled to receive an indication of an operating mode of the processor and an indication of the segment corresponding to the data reference, wherein the first circuit is configured to select, responsive to the operating mode of the processor and the segment, one or more of;
a first result of the segment limit check and a second result of the one or more canonical checks for generating an exception indication for the data reference, wherein the one or more canonical checks include a first canonical check on the effective address and a second canonical check on a linear address of the data reference, and wherein the second result is the result of the first canonical check, and a third result is the result of the second canonical check, and wherein the first circuit is further configured to select the third result for generating the exception indication responsive to the operating mode and the segment.- View Dependent Claims (3, 4, 5, 6, 7, 8, 9)
-
-
10. An apparatus for a processor comprising:
-
a circuit configured to output an address of a data reference, the circuit coupled to receive a control input and configured to output the address either truncated to a predetermined number of bits or not truncated dependent on the control input; and
a control circuit configured to generate the control input responsive to a segment of the data reference and an operating mode of the processor, wherein the control circuit is configured to generate the control input to truncate if the operating mode specifies a segmented address space in which a linear address size in at least some segments is greater than 32 bits and the segment is a user segment. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A method comprising:
-
setting an indication in a register to a first state which prevents truncation of data reference addresses even if truncation would be performed according to an operating mode of a processor, wherein the processor includes the register;
performing a plurality of data references to determine a size of memory included in a system; and
setting the indication to a second state which allows truncation of data reference addresses according to the operating mode of the processor. - View Dependent Claims (18, 19)
storing a first base address in a segment base address portion of a segment register;
performing a first plurality of the plurality of data references relative to the first segment base address;
storing a second base address in the segment base address portion of the segment register; and
performing a second plurality of the plurality of data references relative to the second segment base address.
-
-
19. The method as recited in claim 18 wherein each of the first base address and the second base address include at least one non-zero bit in a bit location subject to the truncation.
-
20. A computer readable medium comprising a plurality of instructions which, when executed, implement a method comprising:
-
setting an indication in a register to a first state which prevents truncation of data reference addresses even if truncation would be performed according to an operating mode of a processor, wherein the processor includes the register;
performing a plurality of data references to determine a size of memory included in a system; and
setting the indication to a second state which allows truncation of data reference addresses according to the operating mode of the processor. - View Dependent Claims (21, 22)
storing a first base address in a segment base address portion of a segment register;
performing a first plurality of the plurality of data references relative to the first segment base address;
storing a second base address in the segment base address portion of the segment register; and
performing a second plurality of the plurality of data references relative to the second segment base address.
-
-
22. The computer readable medium as recited in claim 21, wherein each of the first base address and the second base address include at least one non-zero bit in a bit location subject to the truncation.
-
23. A computer system comprising:
-
a memory; and
at least one processor coupled to the memory, wherein the processor is configured to perform one or more canonical checks for a data reference to the memory and a segment limit check on an effective address of the data reference, wherein a canonical check is a check to ensure, for an address of the data reference, that each address bit that is not included in an implemented address space is equal to a most significant address bit that is included in the implemented address space, and wherein the processor is configured to select, responsive to an operating mode and the segment corresponding to the data reference, one or more of;
a first result of the segment limit check and a second result of the one or more canonical checks for generating an exception for the data reference.- View Dependent Claims (24, 25, 26, 27, 28, 29, 30)
-
-
31. A computer system comprising:
-
a memory; and
at least one processor coupled to the memory, wherein the processor configured to generate an address of a data reference to the memory, wherein the processor is configured to truncate the address to a predetermined number of bits or not truncate the address dependent on a segment of the data reference and an operating mode, wherein the processor is configured to truncate the address if the operating mode specifies a segmented address space in which a linear address size in at least some segments is greater than 32 bits and the segment is a user segment. - View Dependent Claims (32, 33)
-
Specification