摘要 |
A method and apparatus for providing application layer access to hardware peripheral memory mapped registers is provided together with a processor adapted to implement such a method. A fixed memory address space for a hardware peripheral's memory mapped registers is identified, and a object is constructed having elements which occupy this fixed memory address space. This allows a application to be provided with access to the hardware peripheral's memory mapped registers directly through the object. A new class is defined having base address and length parameters and in some cases also having a type parameter. This is used in constructing the object. When a object has an object descriptor which is effectively an object header and a pointer to where the object data is located, constructing the object may be done by creating an object descriptor, and then creating an object handle for the object which points to the object descriptor. Alternatively, a level of indirection may be removed, and the object handle created to point directly to the object created so as to exist in memory mapped register space. The application, class, and object may be Java or Java-like. |