1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-12-23 07:08:11 +00:00
Commit Graph

994 Commits

Author SHA1 Message Date
fuzhli
148226b922 correct the CS:IP presentation for reset vector in 80386
I think the author may need introduce the Intel processor's segment
register change from 16-bit processor to 32-bit processor. In 16-bit
processor, the CS register's value is the (segment offset)/16; while in the
32-bit processor, the CS register is still a 16-bit register, but its
value is just a index of the GDT.

In 32-bit mode, I think we can use 0xf000:0xfff0 to present the reset
vector because the CS's value is 0xf000 and IP's value is 0xfff0.

To keep with the 16-bit processor's presentation, we can also use the
0x0ffff000:0xfff0, because the CS segment offset is 0xffff000 and we can
calculate the segment's selector by (0xffff0000)/16.

In http://en.wikipedia.org/wiki/Reset_vector , it said that "The reset vector for the 80386 and later x86 processors is physical linear address FFFFFFF0h. The value of the selector portion of the CS register at reset is F000h, the value of the base portion of the CS register is FFFF0000h, and the value of the IP register at reset is FFF0h to form the segmented address FFFFF000h:FFF0h in real mode.", so it should be 0xffff000:0xfff0.

I also check the <<Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3A: System Programming Guide, Part 1>>, in section 9.1.4 "First Instruction Excuted",  it said that "The first time the CS register is loaded with a new value after a hardware reset, the processor will follow the normal rule for address translation in real-address mode (that is, [CS base address = CS segment selector * 16]).". So in real mode, the CS base is 0xffff0000, the CS segment selector should be treated as (CS base)/16, which is 0x0ffff000.
2015-01-05 16:37:18 +08:00
0xAX
8622765cec Merge pull request #23 from akash0x53/linux-bootstrap-1-fix
Added new step :)
2015-01-05 13:08:29 +06:00
Akash Shende
76fe48f632 Added new step :) 2015-01-05 12:33:17 +05:30
0xAX
1090ca41c2 @akash0x53 added to contributors.md 2015-01-05 12:56:31 +06:00
0xAX
45eb43ed39 Merge pull request #22 from akash0x53/linux-bootstrap-1-fix
Tiny fix
2015-01-05 12:55:40 +06:00
Akash Shende
a06b040968 Tiny fix 2015-01-05 12:22:35 +05:30
0xAX
8e980ba39c contributors.md updated 2015-01-05 12:22:37 +06:00
0xAX
bf773eaf4e Merge pull request #21 from jkramarz/master
Few small fixes
2015-01-05 12:21:31 +06:00
Jakub Kramarz
94e2102d13 "Divide" spelling fix. 2015-01-05 07:11:55 +01:00
Jakub Kramarz
9141e0dbf7 Captialized all BIOS occurrences. 2015-01-05 07:11:00 +01:00
Jakub Kramarz
3fb6fc3cd9 Removed doubled colon 2015-01-05 07:09:34 +01:00
0xAX
823d25fe64 @RubanDeventhiran, @nathansoz and @Chris Costes added to contributors.md 2015-01-05 12:02:19 +06:00
0xAX
d2fac8dc39 errors fixed in linux-bootstrap-1.md 2015-01-05 12:00:13 +06:00
0xAX
826a6c4171 Merge pull request #18 from RubanDeventhiran/patch-1
Update linux-bootstrap-1.md
2015-01-05 11:49:27 +06:00
0xAX
92cfb30dd9 Merge pull request #17 from nathansoz/patch-1
Some english corrections
2015-01-05 11:49:06 +06:00
RubanDeventhiran
63e475b214 Update linux-bootstrap-1.md
Spelling mistake for the word "address" in line #61
2015-01-05 10:03:10 +05:30
nathansoz
6f376c15a6 Some english corrections
Corrections that help the article have more idiomatic english.
2015-01-04 19:52:38 -08:00
0xAX
924245b38b Merge pull request #15 from ccostes/patch-1
Change 640kb to 64kb
2015-01-05 02:49:52 +06:00
Chris Costes
c48f8c1578 Change 640kb to 64kb 2015-01-04 15:47:15 -05:00
0xAX
22f3ee003a small fixes at linux-bootstarp-1.md 2015-01-05 00:12:43 +06:00
0xAX
fde987c2d7 README.md updated 2015-01-05 00:04:23 +06:00
0xAX
70b1ec50c6 CONTRIBUTING.md added 2015-01-05 00:03:20 +06:00
0xAX
102439ba1c @ckrooss added to contributors.md 2015-01-04 23:35:21 +06:00
0xAX
b9f1115479 Merge pull request #9 from ckrooss/master
Changed magic-byte and swapped exponent
2015-01-04 23:34:37 +06:00
ckrooss
19a737ba8c Update linux-bootstrap-1.md 2015-01-04 18:33:44 +01:00
ckrooss
875082b625 Update linux-bootstrap-1.md 2015-01-04 18:18:04 +01:00
0xAX
0736576545 Updated bootloader example 2015-01-04 23:05:22 +06:00
0xAX
a254376407 contributors.md added 2015-01-04 22:59:09 +06:00
0xAX
d519c08ffb bootstrap-1 updated 2015-01-04 22:55:43 +06:00
0xAX
8166b453ec Merge pull request #7 from mmakowski/master
Basic English improvements
2015-01-04 22:52:51 +06:00
Maciek Makowski
2062cad7c9 fixed sample bootloader code 2015-01-04 13:57:42 +00:00
Maciek Makowski
9d738291d7 fixed spurious delete 2015-01-04 10:04:41 +00:00
Maciek Makowski
fdc986fcb1 basic English improvements: punctuation, grammar, clarification in a couple of places 2015-01-04 10:00:48 +00:00
0xAX
2317be3b4a Update linux-bootstrap-1.md 2015-01-04 11:52:27 +06:00
0xAX
64e22f2631 KB -> kb 2015-01-04 11:49:11 +06:00
0xAX
628ca07c2d Merge pull request #6 from ecksun/patch-2
Consistent naming for 'real mode' wrt casing
2015-01-04 11:36:00 +06:00
0xAX
95da517692 Merge pull request #5 from ecksun/patch-1
Update linux-bootstrap-1.md
2015-01-04 11:35:40 +06:00
0xAX
882bf0c1cc Merge pull request #1 from ThomasMarcelis/master
Updated first 2 paragraphs
2015-01-04 11:33:49 +06:00
Linus Wallgren
439ae2b561 Consistent naming for 'real mode' wrt casing 2015-01-04 01:08:58 +01:00
ecksun
569a896775 Update linux-bootstrap-1.md
Fixed small typo (megabite -> megabyte)
2015-01-04 01:03:43 +01:00
Thomas Marcelis
b5b76e3c21 Updated first 2 paragraphs 2015-01-03 21:31:14 +01:00
0xAX
da8712281e title fixed 2015-01-04 01:02:38 +06:00
0xAX
d263d90ded linux-bootstrap-1.md added 2015-01-04 00:59:23 +06:00
0xAX
35a0c6f590 Initial commit 2015-01-04 00:44:57 +06:00