mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
- 16-bit start up codes clean up
This commit is contained in:
@@ -13,8 +13,6 @@
|
|||||||
#include <asm/processor-flags.h>
|
#include <asm/processor-flags.h>
|
||||||
|
|
||||||
#define BOOT_SEG 0xffff0000 /* linear segment of boot code */
|
#define BOOT_SEG 0xffff0000 /* linear segment of boot code */
|
||||||
#define a32 .byte 0x67;
|
|
||||||
#define o32 .byte 0x66;
|
|
||||||
|
|
||||||
.section .start16, "ax"
|
.section .start16, "ax"
|
||||||
.code16
|
.code16
|
||||||
@@ -33,8 +31,8 @@ start16:
|
|||||||
wbinvd
|
wbinvd
|
||||||
|
|
||||||
/* load the temporary Global Descriptor Table */
|
/* load the temporary Global Descriptor Table */
|
||||||
o32 cs lidt idt_ptr
|
data32 cs lidt idt_ptr
|
||||||
o32 cs lgdt gdt_ptr
|
data32 cs lgdt gdt_ptr
|
||||||
|
|
||||||
/* Now, we enter protected mode */
|
/* Now, we enter protected mode */
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
@@ -46,10 +44,8 @@ o32 cs lgdt gdt_ptr
|
|||||||
ff:
|
ff:
|
||||||
|
|
||||||
/* Finally restore BIST and jump to the 32-bit initialization code */
|
/* Finally restore BIST and jump to the 32-bit initialization code */
|
||||||
movw $code32start, %ax
|
|
||||||
movw %ax, %bp
|
|
||||||
movl %ecx, %eax
|
movl %ecx, %eax
|
||||||
o32 cs ljmp *(%bp)
|
data32 cs ljmp *code32start
|
||||||
|
|
||||||
/* 48-bit far pointer */
|
/* 48-bit far pointer */
|
||||||
code32start:
|
code32start:
|
||||||
|
Reference in New Issue
Block a user