mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-28 14:49:58 +00:00
hw_x86_64: Zero-fill BSS segment in x86_64 crt0.s
Make sure all content of the BSS segment is initialized to zero.
This commit is contained in:
parent
69a58c4bd5
commit
ace61c54d6
@ -29,6 +29,16 @@
|
|||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* zero-fill BSS segment
|
||||||
|
*/
|
||||||
|
leal _bss_start, %edi
|
||||||
|
leal _bss_end, %ecx
|
||||||
|
sub %edi, %ecx
|
||||||
|
shr $2, %ecx
|
||||||
|
xor %eax, %eax
|
||||||
|
rep stosl
|
||||||
|
|
||||||
/* Enable PAE (prerequisite for IA-32e mode) and OSFXSR */
|
/* Enable PAE (prerequisite for IA-32e mode) and OSFXSR */
|
||||||
movl %cr4, %eax
|
movl %cr4, %eax
|
||||||
btsl $5, %eax
|
btsl $5, %eax
|
||||||
|
Loading…
x
Reference in New Issue
Block a user