Computer system, method, and program product for performing a data access from low-level code
AssigneeSun Microsystems, Inc.
InventorJohn Alderson
Life of this patent
Estimating the term…
Abstract
A computer system includes a register that is configured to contain a zero value. In response to a predetermined occurrence on the computer system, such as a hardware interrupt, the computer system launches a trap routine. This routine generates output data that needs to be stored within the memory space of the computer system. In order to write out this data from within the trap routine, a desired target address is specified as a negative offset from the zero value stored in the register. This avoids the need to have to locate another (unused) register in which to store the write address.
Claims47
A method for operating a computer system having a memory divided into pages and with an address space starting at zero, the computer system also having a register configured to contain a zero value, said method comprising the steps of:
- allocating a region of memory at the top of said address space;
- locking the allocation of a page or pages corresponding to said region in a translation lookaside buffer;
- and
- performing a data access from within low-level code running on the computer system to an address in the allocated region of memory, wherein said address is specified as a negative offset from the zero value stored in said register.
The method of any preceding claim, wherein if X is the negative offset, then the specified address corresponds to M+X, where M is the total size of the address space.
The method of any preceding claim, wherein said low-level code comprises a trap routine.
The method of any preceding claim, wherein said allocated region is used to save initial values from at least two registers, thereby allowing the at least two registers to be used to define a circular buffer.
The method of any preceding claim, wherein in a system having multiple CPUs, the allocated region for each CPU is used for storing information particular to that CPU.
The method of any preceding claim, wherein said computer system is a RISC-based system.
A computer system having a memory divided into pages and with an address space starting at zero, the computer system also having a register configured to contain a zero value, said computer system further comprising:
- a region of memory at the top of said address space;
- a translation lookaside buffer that supports a lock on an allocation of a page or pages corresponding to said region;
- and
- low-level code running on the computer system that is operable to perform a data access to an address in the allocated region of memory, wherein said address is specified as a negative offset from the zero value stored in said register.
A computer program product comprising a medium containing machine readable program instructions for loading into a computer system having a memory divided into pages and with an address space starting at zero, the computer system also having a register configured-to contain a zero value, wherein said program instructions cause said computer to perform the steps of:
- allocating a region of memory at the top of said address space;
- locking the allocation of a page or pages corresponding to said region in a translation lookaside buffer;
- and
- performing a data access from within low-level code running on the computer system to an address in the allocated region of memory, wherein said address is specified as a negative offset from the zero value stored in said register.
A computer system having a memory divided into pages and with an address space starting at zero, the computer system also having a register configured to contain a zero value, said computer further comprising:
- means for allocating a region of memory at the top of said address space;
- means for locking the allocation of a page or pages corresponding to said region in a translation lookaside buffer;
- and
- means for performing a data access from within low-level code running on the computer system to an address in the allocated region of memory, wherein said address is specified as a negative offset from the zero value stored in said register.
A computer system having a memory divided into pages, substantially as described herein and with reference to the accompanying drawings.
A method of operating a computer system substantially as described herein and with reference to the accompanying drawings.
A computer program substantially as described herein and with reference to the accompanying drawings.
Dependencies are inferred from the claim text.