Re: A question about decompressing kernel on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hao Lee,
Really appreciate your help.
:-)
Regards,
Larry



------------------ Original ------------------
From:  "haolee.swjtu"<haolee.swjtu@xxxxxxxxx>;
Date:  Mon, Feb 26, 2018 00:17 AM
To:  "ÂäºÛ"<losemyheaven@xxxxxxxxxxx>;
Cc:  "kernelnewbies"<kernelnewbies@xxxxxxxxxxxxxxxxx>;
Subject:  Re: A question about decompressing kernel on boot


leaq (_bss-8)(%rip), %rsi
leaq (_bss-8)(%rbx), %rdi
movq $_bss /* - $startup_32 */, %rcx
shrq $3, %rcx
std
rep movsq
cld

The movsq instruction copys 8 bytes each time and for the first time it will copy [_bss-8, _bss) to the new location. If we don't minus 8, the data in [_bss, _bss+8) will also be copied on the first execution of movsq. Obviously, we don't want to copy the bss section.

Regards,
Hao Lee
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux