|
@@ -80,9 +80,22 @@ int call_bootsector ( unsigned int segment, unsigned int offset,
|
80
|
80
|
"movw %%ss, %%ax\n\t"
|
81
|
81
|
"movw %%ax, %%cs:saved_ss\n\t"
|
82
|
82
|
"movw %%sp, %%cs:saved_sp\n\t"
|
83
|
|
- /* Jump to boot sector */
|
|
83
|
+ /* Prepare jump to boot sector */
|
84
|
84
|
"pushw %%bx\n\t"
|
85
|
85
|
"pushw %%di\n\t"
|
|
86
|
+ /* Clear all registers */
|
|
87
|
+ "xorl %%eax, %%eax\n\t"
|
|
88
|
+ "xorl %%ebx, %%ebx\n\t"
|
|
89
|
+ "xorl %%ecx, %%ecx\n\t"
|
|
90
|
+ "xorl %%edx, %%edx\n\t"
|
|
91
|
+ "xorl %%esi, %%esi\n\t"
|
|
92
|
+ "xorl %%edi, %%edi\n\t"
|
|
93
|
+ "xorl %%ebp, %%ebp\n\t"
|
|
94
|
+ "movw %%ax, %%ds\n\t"
|
|
95
|
+ "movw %%ax, %%es\n\t"
|
|
96
|
+ "movw %%ax, %%fs\n\t"
|
|
97
|
+ "movw %%ax, %%gs\n\t"
|
|
98
|
+ /* Jump to boot sector */
|
86
|
99
|
"sti\n\t"
|
87
|
100
|
"lret\n\t"
|
88
|
101
|
/* Preserved variables */
|