描述
In 2018.1-2018.3 PetaLinux, warm-restart BSP fails to wake up Ethernet.
Wakeup on LAN (WOL) requires an RX BD scratch area that is accessible to the DMA, and it should be set up with a tie off descriptor.
OCM is used for this purpose, but it is not possible in the isolation design because OCM is secure.
As a result, wakeup on LAN does not work with the below design configurations because non-secure GEM cannot access secure OCM:
- Isolation is enabled.
- OCM is TZ secure and OCM_XMPU protection is enabled.
- GEM is TZ non-secure.
解决方案
The following are possible work-arounds:
- Disable OCM_XMPU protection (make OCM non-secure).
- Make GEM TZ secure with the below configurations using Vivado design suite:
- Add a Secure GEM master in the APU secure subsystem.
- Add a GEM peripheral (non-secure) and OCM (secure) in the PMU Subsystem
- Make GEM TZ secure and add a GEM master in the OCM XMPU region during suspend when Ethernet is set as the wakeup source in the PMUFW (See the Attached patch 0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch)
Steps to make WOL work using 0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch:
a) Create an isolation design with the below configuration:
- Enable isolation
- Add OCM TZ secure to the APU Secure subsystem
- Add GEM peripheral (secure/non-secure) and OCM (Size: 256KB) TZ secure to the PMU subsystem
- Generate HDF with the above configurations
b) Copy the attached patch to the pmu-firmware directory.
If this directory does not exist, create one in the meta-user layer:
$ cp 0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch <plnx-proj-root>/project-spec/meta-user/recipes-bsp/pmu-firmware/files
c) Add the patch to the pmu-firmware_%.bbappend recipe and build the images.
SRC_URI_append = " \
file://0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
# Note: for 2018.3 release onwards you don't belwo variables.
EXTERNALXSCTSRC = ""
EXTERNALXSCTSRC_BUILD = ""
d) Use the PMUFW and FSBL generated in step c to boot Linux
e) Perform the steps described on the Wake on LAN page.
Note:
- Changing the XMPU/XPPU configurations runtime can cause improper behavior if any other subsystem is running while suspending one subsystem with Ethernet as the wakeup source.
- 0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch does not take care of ongoing transactions and it is tested and verified only while the APU subsystem is running.
- 0001-pmufw-Changes-for-wakeup-on-LAN-for-isolation-design.patch is not part of the embeddedsw git repo.