1728 |
VARIABLE(linux_text_len) |
VARIABLE(linux_text_len) |
1729 |
.long 0 |
.long 0 |
1730 |
|
|
1731 |
|
VARIABLE(linux_data_tmp_addr) |
1732 |
|
.long 0 |
1733 |
|
|
1734 |
|
VARIABLE(linux_data_real_addr) |
1735 |
|
.long 0 |
1736 |
|
|
1737 |
ENTRY(linux_boot) |
ENTRY(linux_boot) |
1738 |
/* don't worry about saving anything, we're committed at this point */ |
/* don't worry about saving anything, we're committed at this point */ |
1739 |
cld /* forward copying */ |
cld /* forward copying */ |
1742 |
movl EXT_C(linux_text_len), %ecx |
movl EXT_C(linux_text_len), %ecx |
1743 |
addl $3, %ecx |
addl $3, %ecx |
1744 |
shrl $2, %ecx |
shrl $2, %ecx |
1745 |
movl $LINUX_STAGING_AREA, %esi |
movl $LINUX_BZIMAGE_ADDR, %esi |
1746 |
movl $LINUX_KERNEL, %edi |
movl $LINUX_ZIMAGE_ADDR, %edi |
1747 |
|
|
1748 |
rep |
rep |
1749 |
movsl |
movsl |
1750 |
|
|
1751 |
ENTRY(big_linux_boot) |
ENTRY(big_linux_boot) |
1752 |
|
movl EXT_C(linux_data_real_addr), %ebx |
1753 |
|
|
1754 |
|
/* copy the real mode part */ |
1755 |
|
movl EXT_C(linux_data_tmp_addr), %esi |
1756 |
|
movl %ebx, %edi |
1757 |
|
movl $LINUX_SETUP_MOVE_SIZE, %ecx |
1758 |
|
cld |
1759 |
|
rep |
1760 |
|
movsb |
1761 |
|
|
1762 |
|
/* change %ebx to the segment address */ |
1763 |
|
shrl $4, %ebx |
1764 |
|
movl %ebx, %eax |
1765 |
|
addl $0x20, %eax |
1766 |
|
movl %eax, linux_setup_seg |
1767 |
|
|
1768 |
/* XXX new stack pointer in safe area for calling functions */ |
/* XXX new stack pointer in safe area for calling functions */ |
1769 |
movl $0x4000, %esp |
movl $0x4000, %esp |
1770 |
call EXT_C(stop_floppy) |
call EXT_C(stop_floppy) |
1776 |
|
|
1777 |
/* final setup for linux boot */ |
/* final setup for linux boot */ |
1778 |
cli |
cli |
1779 |
movw $LINUX_INIT_SEG, %ax |
movw %bx, %ss |
|
movw %ax, %ss |
|
1780 |
movw $LINUX_SETUP_STACK, %sp |
movw $LINUX_SETUP_STACK, %sp |
1781 |
|
|
1782 |
movw %ax, %ds |
movw %bx, %ds |
1783 |
movw %ax, %es |
movw %bx, %es |
1784 |
movw %ax, %fs |
movw %bx, %fs |
1785 |
movw %ax, %gs |
movw %bx, %gs |
1786 |
|
|
1787 |
/* jump to start */ |
/* jump to start */ |
1788 |
/* ljmp */ |
/* ljmp */ |
1789 |
.byte 0xea |
.byte 0xea |
1790 |
.word 0 |
.word 0 |
1791 |
.word LINUX_SETUP_SEG |
linux_setup_seg: |
1792 |
|
.word 0 |
1793 |
.code32 |
.code32 |
1794 |
|
|
1795 |
|
|