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

CM3DS Maintenance Pull Request: Bug fixes (1/4) #6167

Merged
merged 2 commits into from Feb 27, 2018

Conversation

Projects
None yet
7 participants
@hug-dev
Contributor

hug-dev commented Feb 22, 2018

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:

  • CM3DS Maintenance Pull Request: Bug fixes (1/4) #6167
  • CM3DS Maintenance Pull Request: Memory changes (2/4) #6168
  • CM3DS Maintenance Pull Request: TRNG support (3/4) #6169
  • CM3DS Maintenance Pull Request: Driver updates (4/4) #6170

minosgalanakis and others added some commits Nov 27, 2017

CM3DS: fix a minor bug in the ethernet LWIP driver
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 <minos.galanakis@arm.com>
CM3DS: fix non aligned access in Ethernet driver
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 <hugues.devalon@arm.com>

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Feb 26, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 26, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 26, 2018

Build : SUCCESS

Build number : 1259
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6167/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@jamesbeyond

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

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 26, 2018

/morph uvisor-test

@hug-dev

This comment has been minimized.

Contributor

hug-dev commented Feb 26, 2018

@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.

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Feb 27, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 27, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: CI labels Feb 27, 2018

@cmonr cmonr merged commit 21483cd into ARMmbed:master Feb 27, 2018

17 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs/ Local docs testing has passed
Details
travis-ci/events/ Local events testing has passed
Details
travis-ci/littlefs/ Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL/ Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM/ Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC/ Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON/ Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP/ Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS/ Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM/ Local mbed2-STM testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment