* Sets limits on the data segments %ds and %es.
*
* Parameters:
- * %cx : segment type (FLAT_DS for 4GB or REAL_DS for 64kB)
+ * %dx : segment type (FLAT_DS for 4GB or REAL_DS for 64kB)
****************************************************************************
*/
movl %eax, %cr0
/* Set flat segment limits */
- movw %cx, %ds
- movw %cx, %es
+ movw %dx, %ds
+ movw %dx, %es
/* Switch back to real mode */
movl %cr0, %eax
install_prealloc:
/* Save registers */
pushl %esi
+ pushw %dx
/* Install .text16 and .data16 */
movl $_payload_offset, %esi
call install_basemem
* prior to reading the E820 memory map and relocating
* properly.
*/
- movw $FLAT_DS, %cx
+ movw $FLAT_DS, %dx
call set_real_mode_limits
movl $HIGHMEM_LOADPOINT, %edi
call install_highmem
addw $4, %sp
/* Move code to new location, set up new protected-mode GDT */
- movw $FLAT_DS, %cx
+ movw $FLAT_DS, %dx
call set_real_mode_limits
pushl %edi
es rep addr32 movsb
lcall *init_librm_vector
/* Restore real-mode segment limits */
- movw $REAL_DS, %cx
+ movw $REAL_DS, %dx
call set_real_mode_limits
/* Restore registers and interrupt status */
popw %ds
popfw
#endif
+ popw %dx
popl %esi
ret
.size install_prealloc, . - install_prealloc