Skip to content

Commit 2d05b1c

Browse files
authored
Merge pull request #875 from 0xAX/boot-1/update-coreboot
boot1: update reset vector file reference
2 parents f5edfff + badb4c2 commit 2d05b1c

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

Booting/linux-bootstrap-1.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,18 @@ In real mode, the base address is normally formed by shifting the 16-bit segment
7676
'0xfffffff0'
7777
```
7878

79-
We got `0xFFFFFFF0`, which is 16 bytes below 4GB. This is the very first address where the CPU starts the execution after reset. This address has special name - [reset vector](https://en.wikipedia.org/wiki/Reset_vector). It is the memory location at which the CPU expects to find the first instruction to execute after reset. Usually it contains a [jump](https://en.wikipedia.org/wiki/JMP_%28x86_instruction%29) (`jmp`) instruction which points to the [BIOS](https://en.wikipedia.org/wiki/BIOS) or [UEFI](https://en.wikipedia.org/wiki/UEFI) entry point.
79+
We got `0xFFFFFFF0`, which is 16 bytes below 4GB. This is the very first address where the CPU starts the execution after reset. This address has special name - [reset vector](https://en.wikipedia.org/wiki/Reset_vector). It is the memory location at which the CPU expects to find the first instruction to execute after reset. Usually it contains a [jump](https://en.wikipedia.org/wiki/JMP_%28x86_instruction%29) (`jmp`) instruction which points to the [BIOS](https://en.wikipedia.org/wiki/BIOS) or [UEFI](https://en.wikipedia.org/wiki/UEFI) entry point. For example, if we take a look at the [source code](https://github.com/coreboot/coreboot/blob/main/src/cpu/x86/reset16.S) of the [coreboot](https://www.coreboot.org/), we will see it there:
8080

81-
For example, if we take a look at the [source code](https://github.com/coreboot/coreboot/blob/main/src/cpu/x86/reset16.S) of the [coreboot](https://www.coreboot.org/), we will see it there:
82-
83-
<!-- https://raw.githubusercontent.com/coreboot/coreboot/refs/heads/main/src/cpu/x86/reset16.S#L3-L8 -->
81+
<!-- https://raw.githubusercontent.com/coreboot/coreboot/refs/heads/main/src/cpu/x86/entry16.S#L155-L159 -->
8482
```assembly
85-
.section ".reset", "ax", %progbits
86-
.code16
87-
.globl _start
83+
/* This is the first instruction the CPU runs when coming out of reset. */
84+
.section ".reset", "ax", %progbits
85+
.globl _start
8886
_start:
89-
.byte 0xe9
90-
.int _start16bit - ( . + 2 )
87+
jmp _start16bit
9188
```
9289

93-
That `.byte 0xE9` is the [opcode](http://ref.x86asm.net/coder32.html#xE9) for a near jump instruction. The line below is destination of the jump. To prove that this code is located at the `0xFFFFFFF0` address, we may take a look at the [linker script](https://github.com/coreboot/coreboot/blob/master/src/arch/x86/bootblock.ld):
90+
To prove that this code is located at the `0xFFFFFFF0` address, we may take a look at the [linker script](https://github.com/coreboot/coreboot/blob/master/src/arch/x86/bootblock.ld):
9491

9592
<!-- https://raw.githubusercontent.com/coreboot/coreboot/refs/heads/master/src/arch/x86/bootblock.ld#L72-L78 -->
9693
```linker-script

0 commit comments

Comments
 (0)