-
Notifications
You must be signed in to change notification settings - Fork 3k
CM3DS Maintenance Pull Request: Bug fixes (1/4) #6167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This patch fixes a memory bug. `eth_arch_enetif_init` method call would attempt to write to un-initialized area of memory. Change-Id: I9881de71d58fa14db609fe3e24617a210b896471 Signed-off-by: Galanakis, Minos <[email protected]>
This patch changes the way data is put in the TX_DATA_PORT register when sending packet over Ethernet. When this driver is compiled with release compilation profile (space optimization compiler options) with Arm compiler version 5, the line: SMSC9220->TX_DATA_PORT = *pktptr; generates the assembly instruction to get the pktptr pointed value: LDM r2!, {r3} with pktptr = r2 However, the code does not prevent the pktptr value from being unaligned (to a 32 bits boundary) in that zone and the LDM instruction causes a HardFault if this is the case. When the compiler option is not activated (debug and develop compilation profiles), the compiler generates LDR instruction instead which does not cause a HardFault. The ARM v7-M states page B3-601: "Unaligned load-store multiples and word or halfword exclusive accesses always fault." To face that problem, we check if the data pointer is aligned or not. If it is, we apply the same algorithm than before. If not, a local variable is created and we copy in it, byte per byte, the contents at the unaligned pointer. However, it will impact performances adding 8 instructions (one LD and one ST for each copied byte). Change-Id: I11f6e82ce5521960d2ecf499f718f76fec29c0b0 Signed-off-by: Hugues de Valon <[email protected]>
/morph build |
Build : SUCCESSBuild number : 1259 Triggering tests/morph test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed to CM3DS bugs fixes looks good.
But I just wonder the other platforms are using the same MPS2 board will not be fixed? Especially the ETH driver in targets\TARGET_ARM_SSG\TARGET_MPS2\SDK\ETH_MPS2.c
/morph uvisor-test |
@jamesbeyond This PR now focuses only to CM3DS but when we do maintenance release on the other targets we support, we will make sure to include this fix as well. |
Exporter Build : FAILUREBuild number : 923 |
Test : SUCCESSBuild number : 1056 |
/morph export-build |
Exporter Build : FAILUREBuild number : 936 |
/morph export-build |
Exporter Build : SUCCESSBuild number : 945 |
This pull request contains bug fixes for the CM3DS target.
It is the pull request 1 among the 4 concerning CM3DS Maintenance. Please check #6119 for the full scope.
Other pull requests regarding this target: