f9micro / f9-kernel

An efficient and secure microkernel built for ARM Cortex-M cores, inspired by L4
Other
683 stars 145 forks source link

"Smallest shift of flexible pages" conflicts with the alignment of data section in link file. #53

Open georgekang opened 11 years ago

georgekang commented 11 years ago

Memory fault would happen when the alignment of fpage is larger than data section.
In default setting, the fpage is 2^8-byte aligned and data section is at 0x20000400. Data section is not only 2^7-byte aligned but also 2^8-byte aligned. However, data section is only set as 2^7-byte aligned in link file. If data section is only 2^7-byte aligned(e.g. 0x2000480) and fpage is 2^8-byte aligned, memory fault would happen when accessing first 128 bytes of data section.

jserv commented 11 years ago

@southernbear Did you encounter alignment related issues as @georgekang described? In branch user-test, there are already some address spaces manipulation fixes.