1. Field of Invention
The invention relates to a device and a method for accessing a memory, and more particularly to a device and a method applied to a situation when the memory capacity exceeds the memory space supported by the operation system.
2. Related Art
The memory used in typical computers is the DRAM (Dynamic Random Access Memory), which has the capacity that is getting larger and larger with the advance of the technology. The increasing capacity of the DRAM is an inevitable trend and the price of the DRAM is also accepted by the ordinary consumers. Thus, the computer of the consumer may be equipped with the DRAM having a huge memory capacity.
However, unless a special OS (Operation System), such as “Windows XP Server” is used, the typical OS, such as “Windows XP Home edition” or “Windows XP Professional”, available in the market, can support the addressing space of the memory capacity of at most 4 GB. For example, when the computer is equipped with the memory having the capacity of 8 GB and the OS is the “Windows XP Professional” that can only support the maximum addressing space of 4 GB, the memory capacity of only 4 GB can be used and the other 4 GB cannot be accessed. So, the memory capacity is wasted.
Consequently, it is an important subject of the invention to provide a device and a method for accessing an originally wasted memory space in the OS when the memory capacity in the system is getting larger and larger.
In view of the foregoing, the invention is to provide a device and a method for accessing a redundant area of a memory.
To achieve the above, a memory accessing device of the invention includes a memory module, a CPU and a north bridge chipset. The memory module has an ordinary area and a redundant area. The CPU outputs redundant address data. The north bridge chipset includes a memory module controller, a data register and a pointer, which records the redundant address data. When a writing procedure is performed, the data register records to-be-stored data, and the memory module controller stores the to-be-stored data to a first physical address of the redundant area according to the pointer and the data register. The first physical address is determined according to the redundant address data. In addition, when a reading procedure is performed, the data register records a to-be-read amount, and the memory module controller reads to-be-read data from a second physical address of the redundant area according to the pointer and the data register. The second physical address is determined according to the redundant address data, and a data amount of the to-be-read data is determined according to the to-be-read amount.
In addition, the invention discloses a method for reading a memory, which is in conjunction with a CPU (Central Processing Unit), a north bridge chipset and a memory module. The north bridge chipset has a memory module controller, a data register and a pointer, and the memory module has an ordinary area and a redundant area. The method for reading a memory comprises the steps of: enabling the CPU to output redundant address data to the pointer; recording a to-be-read amount into the data register; and enabling the memory module controller to read to-be-read data from a physical address of the redundant area according to the pointer and the data register. Wherein, the physical address is determined according to the redundant address data, and a data amount of the to-be-read data is determined according to the to-be-read amount.
The invention further discloses a method for writing a memory, which is in conjunction with a CPU (Central Processing Unit), a north bridge chipset and a memory module. The north bridge chipset has a memory module controller, a data register and a pointer, and the memory module has an ordinary area and a redundant area. The method for writing a memory comprises the steps of: enabling the CPU to output redundant address data to the pointer; recording to-be-stored data into the data register; and enabling the memory module controller to store the to-be-stored data into a physical address of the redundant area according to the pointer and the data register. Wherein, the physical address is determined according to the redundant address data.
As mentioned above, the device and method for accessing the memory according to the invention access the redundant area of the memory module, which cannot be supported by the operation system, by respectively inputting the redundant address data and the to-be-stored data or the data amount of the to-be-read data outputted from the CPU to the data register and the pointer added in the north bridge chipset, and then by enabling the memory module controller to point to a physical address of the redundant area of the memory module.
The invention will become more fully understood from the detailed description given herein below illustration only, and thus is not limitative of the present invention, and wherein:
The present invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements.
With reference to
The capacity of the memory module 11 is larger than the memory capacity supported by the computer operation system. In this embodiment, the computer operation system may be “Windows XP Professional” and the capacity of the memory module 11 is larger than 4 GB (GigaBytes). The memory module 11 has an ordinary area 111 and a redundant area 112. In this embodiment, the capacity of the memory module 11 is 7 GB, the addresses of the ordinary area 111 range from 0 to 3 G and the addresses of the redundant area 112 range from 4 G to 8 G
The CPU 12 outputs redundant address data D1 for generating the 4.2 G address in this embodiment.
The north bridge chipset 13 includes a memory module controller 131, a data register 132 and a pointer 133. In this embodiment, when a writing procedure is performed, the pointer 133 records the redundant address data D1 of the 4.2 G address. The data register 132 records to-be-stored data D2, and the memory module controller 131 stores the to-be-stored data D2 to a first physical address (4.2 G) of the redundant area 112 according to the pointer 133 and the data register 132. In this embodiment, the first physical address is determined according to the redundant address data D1.
As shown in
In the above-mentioned embodiment, the data register 132 and the pointer 133 may be disposed in a MMIO (Memory Mapping Input Output) register MI of the north bridge chipset 13.
As shown in
With reference to
First, step P1 enables the CPU 12 to output redundant address data D1 to the pointer 133. In this embodiment, the redundant address data D1 is, for example, 4.2 G.
Next, step P2 records to-be-stored data D2 into the data register 132.
Finally, step P3 enables the memory module controller 131 to store the to-be-stored data D2 into a physical address (4.2 G) of the redundant area 112 according to the pointer 133 and the data register 132. In this embodiment, the physical address is determined according to the redundant address data D1.
With reference to
First, step P4 enables the CPU 12 to output redundant address data D1 to the pointer 133. In this embodiment, the redundant address data D1 is, for example, 4.2 G.
Next, step P5 records a to-be-read amount D3 into the data register 132. For example, the to-be-read amount D3 is 64 bits, which represents that the data amount of the data to be read from the 4.2 G address is 64 bits.
Finally, the memory module controller 131 reads to-be-read data D4 with the data amount of 64 bits from the physical address (4.2 G) of the redundant area 112 according to the pointer 133 and the data register 132 (step P5), and transfers the to-be-read data D4 to the CPU 12. In this embodiment, the physical address is determined according to the redundant address data D1, and the data amount of the to-be-read data D4 is determined according to the to-be-read amount D3.
In addition, in the above-mentioned reading and writing methods, if the CPU 12 outputs ordinary address data D5 between 0 to 3 G, such as 2.5 G, to the memory module controller 131, the memory module controller 131 points to the physical address (2.5 G) of the ordinary area 111 of the memory module 11 according to the ordinary address data D5 (2.5 G), and then performs the reading or writing procedure.
In addition, except that the redundant area 112 is used to store the required data for the PCI, the redundant area 112 may serve as a buffer for the hard disk, a DMA (Direct Memory Access) buffer or a buffer for any data access.
To make the invention more comprehensive, another example is described hereinafter.
As shown in
When the writing procedure is performed and when an operation system wants to store the to-be-stored data D2 into the 3.6 G address, the CPU 12 outputs the redundant address data D1 of, for example, the 4.2 G address to the pointer 133 of the 3.6 G address, and outputs the to-be-stored data D2 to the data register 132 of, for example, the 3.5 G address. Next, the memory module controller 131 stores the to-be-stored data D2 to the physical address (4.2 G) of the redundant area 112 according to the pointer 133 and the data register 132.
In summary, the memory accessing device and method of the invention add one set of a data register and a pointer to point the address and the data to the redundant area of the memory module such that the CPU can access the data stored in the memory larger than 4 GB when the operation system cannot support the memory space such as the memory space (i.e., the redundant area of the invention) larger than 4 GB in the Windows XP Professional operation system, for example. In addition, if the system has multiple sets of data registers and pointers, the operation may be performed in a more multiplex manner. Therefore, it is unnecessary to worry about the waste of the memory space due to the incapability of supporting the memory space in the operation system if the system has a huge memory capacity.
Although the invention has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiments, as well as alternative embodiments, will be apparent to persons skilled in the art. It is, therefore, contemplated that the appended claims will cover all modifications that fall within the true scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
094110641 | Apr 2005 | TW | national |