1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-12-22 14:48:08 +00:00

fix calculation of 8086 available memory range

Thanks to @rodggerbr
This commit is contained in:
Alexander Kuleshov 2020-05-31 13:15:38 +06:00
parent f87effa3dc
commit 09642cab4e

View File

@ -164,7 +164,7 @@ just as explained above. We have only 16-bit general purpose registers, which ha
'0x10ffef' '0x10ffef'
``` ```
where `0x10ffef` is equal to `1MB + 64KB - 16b`. An [8086](https://en.wikipedia.org/wiki/Intel_8086) processor (which was the first processor with real mode), in contrast, has a 20-bit address line. Since `2^20 = 1048576` is 1MB, this means that the actual available memory is 1MB. where `0x10ffef` is equal to `(1MB + 64KB - 16B) - 1`. An [8086](https://en.wikipedia.org/wiki/Intel_8086) processor (which was the first processor with real mode), in contrast, has a 20-bit address line. Since `2^20 = 1048576` is 1MB and `2^20 - 1` is the maximum address that could be used, this means that the actual available memory is 1MB.
In general, real mode's memory map is as follows: In general, real mode's memory map is as follows: