1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-18 04:27:08 +00:00

Compare commits

...

182 Commits

Author SHA1 Message Date
Tushar Khandelwal f90f028646 Revert "arm-bsp/tc0: Enable verified u-boot"
This reverts commit 29cee51f84.
2021-04-22 23:27:47 +01:00
Tushar Khandelwal 1cba8aee6d Revert "arm-bsp/u-boot: update SHA for tc0"
This reverts commit 70a9c4991e.
2021-04-22 23:24:10 +01:00
Tushar Khandelwal 5262d3d174 Revert "arm-bsp/images: Add tc0-kernel-image"
This reverts commit da57312334.
2021-04-22 23:23:34 +01:00
Tushar Khandelwal 664d2a5f6a Revert "arm-bsp: Enable SPM build option in yocto framework"
This reverts commit 86f9419b9d.
2021-04-22 23:23:13 +01:00
Tushar Khandelwal ebee7ce68d Revert "tc0/spm: boot SP according to boot order specified in manifest"
This reverts commit 56514201ad.
2021-04-22 23:22:02 +01:00
Tushar Khandelwal cc645908ef Merge branch 'upstream' into totalcompute 2021-04-22 22:36:21 +01:00
Ben Horgan 36314f2d87 arm-bsp/tc0: Add secure partitions secure-storage and crypo-sp
These are added along with the existing optee secure partition.

Change-Id: I50ce8adfa264d442cf52863f4f8572e623504ca3
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
2021-04-22 22:25:47 +01:00
Ben Horgan cddb08a7a2 arm-trusted-services: Add recipes for arm trusted services
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I14ac7649ae5899578167efca45d5c19d6248cb8f
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 5d47d3f9db arm-bsp/linux: Add linux-trusted-services driver, FF-A ABI changes for TC0
This adds below patches:
     - buf driver for trusted service test applications
     - Fix in FFA-ABI aligning with latest SPMC (hafnium)

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I6b36a73a910f6e10748d78b2ad74603dde42c8a9
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 9d1724c3d4 arm-bsp/tc0: Update hafnium revision and add patches
- Remove PSCI patches as those changes are upstreamed
- Adds Theodul, GICR changes
- Reverts FFA Set and verify allocator fix
- Adds fix to fetch proper vCPU for UP SP

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I26a7b31558e5bc4ce2fea61b76a3a92615f3e641
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 29f0e5982c arm-bsp/tc0: Add patches in optee-os for FF-A ABI changes
Adds below patches:
     - To use FFA_SECONDARY_EP_REGISTER
     - To align with latest FFA_ABIs in SPMC (hafnium)

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I4ae386e2dd846e747cbc426270fc0c489ccdfe1f
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 853f3e0565 arm-bsp/tc0: Update TF-A revision, add trusted-services support
- Update TF-A revision
- Add patch for trusted services support
- Add patch for GICR changes to support latest tc0 model

Change-Id: I3ba1fd9c1f89721fc6349db4e0270c8b42e9fcf0
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 806bbb07ed arm-bsp/tc0: Update SCP firmware revision and add patches
Add below patches:
    - add clock and dvfs support for all cores
    - fix in CFGM base address calculation

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I2e70736070dd59f6209012dc875f3ea08d811046
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 9bb19dd0d6 arm-bsp/tc0: add Theodul DSU support
- Adds patches required to support Theodul DSU in optee-os, hafnium
- Updates SHA of TF-A, SCP with revision that has Theodul DSU support

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I62f0990b7de919839be9ab0e3234914624c8afde
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-22 22:25:47 +01:00
Arunachalam Ganapathy 88c201ca9d arm-bsp/linux: add asymmetric AArch32 EL0 support for TC0
This adds patches for asymmetric AArch32 EL0 configuration support for
android11-5.4-lts kernel. And enables CONFIG_ASYMMETRIC_AARCH32 and
disables CONFIG_KVM in TC0 defconfig.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Iab94b5c48b60aca4a71267ba1be1cb1836002d10
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-22 22:25:47 +01:00
Ross Burton 3be0996065 CI: delete-sstate needs to delete contents
Change-Id: I278d470540e20db8d789a1428e927356e3a5d8b1
2021-02-08 20:16:16 +00:00
Ross Burton 101abf89c6 CI: add task to delete all sstate
Change-Id: If89c6c27cafe6ae7e93b5db5d37b9e8ecdaee131
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-08 18:55:21 +00:00
Adrian Herrera 549f362d2f gem5/gem5-aarch64-native: use oe-run-native
Persist gem5 binary in native sysroot. This allows executing the binary
with the standard oe-run-native script. We can also remove the wrapper
creation and the ".real" versioning, since paths are setup by oe-run-native.

Change-Id: I9fd46725c78e1a09a7142a9d343b140bb5a77088
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Adrian Herrera cb4c230b56 gem5/gem5-m5ops: initial recipe
m5ops provide pseudo-instructions to trigger gem5 functionality.
m5 utility provides a CLI for m5ops.
libm5.a provides a C library for m5ops.

Change-Id: Ib06dcb539648407522e31aeb1ed392fb5232675e
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Adrian Herrera 460210f4a8 gem5/gem5-m5term-native: initial recipe
m5term enables users to connect to the simulated console. Useful in
development environments.

Change-Id: I6096be9fbf44da280272656f3e15d1ba19593e50
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Ross Burton 568d4d7f9c gem5/gem5-aarch64-native: backport a patch to reduce warnings
With Python 3.9 the build produces a huge number of warnings, resulting in a
do_compile log that is 17M long.

Backport a patch from pybind11 upstream to silence this warning.

Change-Id: Ie4c71f8e5dd6c07c8be0a563778029a9859e1726
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Jon Mason 1350f983ae gem5/gem5-aarch64-native: update to v20.1.0.3
Update to the latest tagged version of gem5. Previously included
patches are now part of that release.
Upstream patch backported to enable boot with SMMUv3 model.

Change-Id: I7d7ad6f9681eb1f06743d214abbe901e9f8aa74e
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Ross Burton 15512adf39 gem5/gem5-aarch64-native: don't build gem5 three times
The recipe currently builds gem5 binaries in optimised, fast, and
debug mode.  There is no need to build three at once (and triples the
build time), so simply build the optimised variant by default (as recommended
by upstream) whilst letting the variant be altered by setting
GEM5_BUILD_VARIANT.

Change-Id: I23baeee438d1ff08d1e2a54282141b55500f2ac1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Anders Dellien 63c9974493 arm-bsp/fvp-base*: move to linux yocto kernel 5.10
Move both FVP platforms to linux yocto kernel 5.10

Change-Id: Idc0b35d201a188d69c2e475f2f864f5bb0f06341
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 15:58:22 -05:00
Peter Hoyes a6de147dc0 arm-autonomy: Use busybox instead of GNU tar
Switch out the tar used by xenguest-manager and xenguest-mkimage.
xenguest-mkimage requires the --exclude flag so enable the Busybox
CONFIG_FEATURE_TAR_LONG_OPTIONS option.

Issue-Id: SCM-2034
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iceed017ef8ebd058e6c06156989aaa2a4bff9103
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Peter Hoyes ea931f83e3 arm-autonomy: Use correct PACKAGE_ARCH in recipes-extended
xen-devicetree should be $MACHINE_ARCH.
xenguest-* should be allarch

Issue-Id: SCM-2039
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id5666e1dc02a174e74bb8e843cb588287717d136
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne d692df24cd arm-autonomy/xen-devictree: Update dom0_mem default inline with best practices
Updated default value for XEN_DEVICETREE_DOM0_MEM from "1024M" to
"1024M,max:1024" to match best practice for dom0_mem command line
argument. Documentation also updated to refer to new default value

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ifa7e78bf22b024cb7fe4b782f628860ff44860ad
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne e0c74f3b3b arm-autonomy/xen-devicetree: Check for empty/invalid variable values
Added check to xen-devicetree to validate values of required variables:
XEN_DEVICETREE_DOM0_ADDR
XEN_DEVICETREE_DOM0_SIZE
XEN_DEVICETREE_DOM0_MEM

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I31bfcdb9d064f6e91beb1500d0a18f2a30a42028
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne 82b31654b0 arm-autonomy/xen-devicetree: Allow hex or decimal Dom0 Size
Check whether XEN_DEVICETREE_DOM0_SIZE begins '0x' and cast from hex
or decimal accordingly, rather than assuming hex.

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I3a1c7c7ae6711b3d645cdb66bcd9c2c27196b054
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne 57192fd8a5 arm-autonomy/xen-devicetree: Lower log level for incorrect kernel size
Reduced the level at which messages relating to overriding the user provided
value for XEN_DEVICETREE_DOM0_SIZE when it is too small are logged at from
'warn' to 'note'

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I1436dac2c347d40c897291220fe30a95a57f2fa1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Diego Sueiro 67f57f35da gem5/gem5-native: Fix INSANE_SKIP mechanism for native-last QA check
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ic1c92e145694abd30fdd99fd073eeacce917c55e
2021-02-01 16:48:44 +00:00
Nathan Dunne 0978f5a74c arm-autonomy/xenguest-manager: Make stop by default a blocking action
Added -w parameter to xl shutdown to force it not to return until
the action is completed, and modified logging to reflect this

Stop operation can be configured to return immediately using
--nowait parameter, or to force destroy the guest if the graceful
shutdown fails using --kill. Both are now documented in usage().

Issue-Id: SCM-1861
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I664acc8a6a1eb17619fa2fd9b372ea661e537923
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 11:06:29 -05:00
Peter Hoyes 232b411b47 arm-autonomy: Use 5.10 kernel for autonomy-guest
Issue-Id: SCM-2054
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I8bcb464f0fd960cd01cce328c51be538cc705e84
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 09:26:11 -05:00
Peter Hoyes 98f3779210 arm-autonomy/n1sdp: Use 5.4 kernel for autonomy n1sdp builds
meta-arm-bsp has been updated to use 5.10 kernel but further validation
required before upgrading the autonomy n1sdp kernel.

Issue-Id: SCM-2053
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3848a03d7d01dc3a1c27530ec395e1db083a9e35
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 09:26:11 -05:00
Peter Hoyes 7ae8a30b6b arm-autonomy/linux-arm-autonomy: Add explicit dependency on bridge.cfg
xenguest-network depends on CONFIG_BRIDGE_NETFILTER, but the default
value changed to 'n' in Linux 5.6
(http://git.yoctoproject.org/cgit.cgi/linux-yocto/commit/?id=98bda63e20daab95bdc084ce00459a4f622a0505).
Include bridge.cfg to define CONFIG_BRIDGE_NETFILTER manually for Xen
host builds.

Issue-Id: SCM-2057
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id920d14f87a95214ee722007de923fd27b61afb3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne 933df12da8 arm-autonomy/arm-autonomy-host-image-minimal: Use REQUIRED_DISTRO_FEATURES
Make use of REQUIRED_DISTRO_FEATURES rather than anonymous python for
determining that both arm-autonomy-host and xen are present in
DISTRO_FEATURES

Issue-Id: SCM-1862
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Id21086ac4f4c45a89fa8fa8a2da28f04919f6b26
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne bc4cd77370 arm-autonomy/documentation: Remove references to meta-kernel
Since meta-arm-bsp doesn't depend on meta-kernel anymore
it has been removed from the appropriate documentation.

Issue-Id: SCM-2005
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: If3548b84c4cffc5cc105a1fc07a656dc814699f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne 5b823a1eb4 arm-autonomy/xenguest: Add guestcount support
Add guestcount parameter to ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS,
to create multiple guests with the same config. Symlinks are created
in the host rootfs pointing to the original xenguest file

Parameters for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS are now
retrieved using python regex rather than split, so that they can
appear in any order

Issue-Id: SCM-1863
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ifa5f5ab3b284815427c94979b3f1a5eed592ec3c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Adrian Herrera a8f32f990a gem5: centralise v20 sources
Both simulator and bootloader now fetch from a single include file
defining the sources. This is in preparation for m5term recipe.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Change-Id: Ia4f6b6d99401ddb0c726d913ceff4ced90f41f6b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Adrian Herrera 51e014fd47 gem5: use GEM5_RUN_PROFILE in DTB generation
Allows to generate DTBs from profiles other than baremetal.py, which is
the default established by the layer.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Change-Id: Ic990bd6751e473756d0739f421dce4b8f98248d7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy f8e79562f9 arm-bsp/tc0: Enable spmd and SEL2 SPMC with optee as SEL1 SP
- Set SPD to spmd with SEL2 SPMC. Set optee as SP
- Assign SP layout and spmc manifest file that corresponds to optee
- Move TF-A version from 2.3 to 2.4

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I3da3bf7f95ba42716b731f92e2cdfb928b1ab77f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 980f559e87 arm-bsp/linux: add ffa transport in optee driver for TC0
This patch adds FF-A transport driver for optee driver. This is based
on prototype version released by Arm and its port for android11-5.4-lts
kernel.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I991895881c069767854ae8a0722cdc282b221dd9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 44a3c5cf80 arm-bsp/linux: enable ffa driver for TC0
Enables ffa driver. Sets CONFIG_ARM_FFA_TRANSPORT=y

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I71ffeb6b3bc5b28c34bfab09cdcc66227203c74c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 603a7657e2 arm-bsp/linux: add ffa driver to TC0
This patch contains initial version of ffa driver adopted for
android11-5.4-lts kernel.

This is based on prototype ffa driver released by Arm.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Idb198cc77368a95257f1b5bff37b17bd13144109
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 7453f06afc arm-bsp/tc0: Enable optee core with SPMC at SEL2
Sets config flag CFG_CORE_SEL2_SPMC. Copies optee manifest file and
sp_layout files to deploy directory.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: If2104e2d588cbc9fbd9db3d8c4ba9fb74732901b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy b595d1ea47 arm-bsp/tc0: Add tc0 platform support patches for optee
These patches in optee-os adds support for
      - tc0 platform
      - SEL2 SPMC support in optee core
      - support for tc0 SEL2 SPMC config

The patch in optee-client adds support for
    - allocating page aligned shmem buffers

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I1cfe134bdcedc45adf446f46af0d2881815b98f6
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy a3481e5016 arm-bsp/tc0: Add support for optee
This patch adds optee-os, optee-client, optee-test support in tc0 bsp.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I65f795b7ec2b4def4778b286b2f744b06b177157
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 9fdf9297ac arm-bsp/tc0: Add hafnium support
Enables hafnium support for tc0.
Adds pending patches for SEL1 SP support.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: If5c12b7e7b7a301ae9a48a88223be3e51f38d3aa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 9e00b6b884 arm/trusted-firmware-a: Add support for spmd build option
This patch adds generic dispatcher 'spmd' option for SPD along with
SPMD_SPM_AT_SEL2 build option.

 Config: SPD=spmd and SPMD_SPM_AT_SEL2=1. Indicates the SPMC component
 runs at the S-EL2
   - Add hafnium dependency
   - Set CTX_INCLUDE_EL2_REGS=1 and ARM_ARCH_MINOR=4
   - Set BL32 to hafnium image
   - Set SP_LAYOUT_FILE and ARM_SPMC_MANIFEST build parameters

 Config: SPD=spmd and SPMD_SPM_AT_SEL2=0. Indicates the SPMC component
 runs at the S-EL1 execution state.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Icd3970e5132e75de67ef7f41dbfc8f9e1cdde7f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy ee8a242e7a arm: Add hafnium support
Initial recipe for hafnium[1]. This enables build for reference Secure
Partition Manager (SPM) for systems that implement the Armv8.4-A
Secure-EL2 extension.

Link: [1] https://www.trustedfirmware.org/projects/hafnium/

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ib256d8ca03c94131e308d962d786d5d6a656c256
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Ross Burton 43a25b2e96 arm/opencsd: upgrade to 1.0.0
Change-Id: I7c88e60bbeb6d9149d6d6178067bcd149405c111
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:30:40 -05:00
Khasim Mohammed e25c325197 arm-bsp/n1sdp: port and migrate to linux yocto kernel 5.10
This commit includes :
    - rebased and fixed kernel 5.4 PCIe quirk patches to apply on 5.10
    - pci probe in n1sdp driver is modified to use 5.10 structure
    - USB_CON_GPIO config is added to remove build time warning
    - Updated n1sdp conf to use 5.10 yocto kernel
    - Fix defconfig to not use obsolete symbols (RB)

Change-Id: I9e3d3945057ac09768a4a4e4d7a3033138925955
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:53 -05:00
Jon Mason 761bcbb365 arm/machine: add zephyr machine conf for microbit
Zephyr supports QEMU based machine for Cortex M0 (qemu-cortex-m0).  This
is actually using the BBC Microbit v1 machine in QEMU.  Use this more
accurate name for the machine conf.  This enables us to verify m0
tunings.

NOTE: qemu-cortex-m0's zephyr config has SRAM too small to run
zephyr-kernel-test-all, but can run zephyr-philosophers and
zephyr-kernel-test-sleep (and possibly others).

Change-Id: Ia997a162c10cf1a6b8fea244cb1960f4d4c66adc
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Anders Dellien d9fe9a3eac arm-bsp/fvp-base*: move to u-boot 2020.10
Move both FVP platforms to u-boot 2020.10

Change-Id: If94bb5a343e2709574f84283f39d8d227b32d84d
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton e627b698e7 kas: add a test for the external toolchain support
meta-arm-toolchain supports using an external binary arm
toolchain[1] instead of the gcc-cross built by oe-core.

Add a test case to exercise this build in the CI.  Currently this
is only for the Aarch32 target as our CI runs on aarch64 and there
is no binary or aarch64 target on aarch64 host.

This depends on the image used by the CI having the relevant
compilers installed into /usr/local.

[1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a

Change-Id: I9f7ea66786e98a40cbd490386497e2d3aaa47e80
Signed-off-by: Ross Burton <ross.burton@arm.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton 84683227ed kas: rename armgcc fragment to avoid conflicting with musl
The armgcc fragment was labelled 'libc', which means it would be
impossible to armgcc+musl.

Change-Id: I96f1d6e1a77bcd05fe373315f575c57c36417852
Signed-off-by: Ross Burton <ross.burton@arm.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Usama Arif 312a25202b arm-bsp/images: artifacts image for tc0
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building tc0-artifacts-image
which depends on trusted-firmware-a will build all the required binaries.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I57760a339da1601bd66e3dd752a7b2814e84bbb8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Diego Sueiro 1f548fce10 arm-autonomy/linux-arm-autonomy: apply runstate fix to kernels older than 5.10
The patch introduced in 82ffc86 is a backport from the 5.10 version. Hence,
just apply it for kernels older than 5.10.

Change-Id: I6f442f540913b5e24bea533a436b4a3104d098e9
Issue-Id: SCM-2033
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton 75c9cc3bf8 CI: don't retry jobs
We can't retry jobs blindly because if a build fails with warnings we want
to fail the job.  With retries enabled the job fails, but is immediately
retried and builds quickly from sstate without any warnings.

Thus, all and any warnings are hidden.

Disabling retries. We may get occasional failures from Docker, we'll have
to see how bad they are.

Change-Id: Ib726f14a264c029fdf372fc1b8a02aca52bf5e4c
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-01-12 18:05:41 +00:00
Ross Burton 9e2ff72858 arm-toolchain/external-arm-toolchains: add upstream checking information
Change-Id: I08168f5369eafb590d7cdbc972320c852d4252b3
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Ross Burton 68a113c0a0 kas: add testing of gcc-arm
Add a build to verify that setting GCCVERSION to arm-10.2 works.

Change-Id: I086fa786b11560a8e94ee646859c59288bacba5d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Nathan Dunne f14be5995f arm-autonomy/xenguest-manager: Document VOLATILE_LOG_DIR in recipe
Added a comment to the xenguest-manager recipe to inform the user that
the default state is a volatile log dir, and how to persist logs across
reboots.

Issue-Id: SCM-1860
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ie0c92b05d11543a1524cbb7a53cd845bc63ecd3d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg eb3a6b74b7 external-arm-toolchain: Misc. fixup for GCC 10.2 support
Arm GCC 10.2 prebuilt toolchain comes with ldd and tzselect scripts
which uses "/usr/bin/bash", so replace this with "/bin/sh" as the
default shell.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg a56011bf30 arm-toolchain: Drop support for GCC 8.x toolchain
As OE core has moved to GCC 10.2 toolchain, so remove support for
legacy Arm 8.x toolchain.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg 0a1d96948f arm-toolchain: Add support for GCC 10.2-2020.11
Add support for GNU-A toolchain version: 10.2-2020.11.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Ross Burton 6dbf49d633 arm/trusted-firmware-a: remove git-specific recipe
This recipe isn't used by any machines and isn't tested, so remove it.

Machines that use a git snapshot should extend the closest versioned recipe
instead.

Change-Id: Ia0970f2d0491204c23d171c065e85c9f65f9472f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Ross Burton e454387d9f arm/trusted-firmware-a: remove unused 2.1 recipe
No machines in meta-arm are using this old release.

Change-Id: I8b56b1cc3eb603ee423acc52950d1e7661502d0e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Ross Burton b566fbce82 arm/edk2-firmware: remove unused 202008 version
Now that SGI575 has upgraded, this can be removed.

Change-Id: Ib8bdd9430b66a4b83524b21ad2a300a048c218eb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Jon Mason 756e695b48 arm-bsp/linux: remove unused kmeta variables
gem5 is no longer in meta-arm-bsp, and kmeta entry should be removed.

sgi575 has no usage of the meta-arm-bsp kmeta and would be better suited
to use the generic one.

corstone700 is defining kmeta, but that variable is only used in the
generic kmeta src_uri, and not the meta-arm-bsp that it is using.

Change-Id: I01e80c433a9a02bad1f6337b0df27cbf6a96231f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-21 09:55:52 -05:00
Jon Mason 1f6d3f6ef2 arm-bsp: fix sgi575 kernel compile warning
SGI575 throws a config warning when compiling the 5.7 kernel.

WARNING: linux-yocto-5.7.19+gitAUTOINC+b9e6fd082d_6b9830fecd-r0 do_kernel_configcheck: [kernel config]: specified values did not make it into the kernel's final configuration:

    [NOTE]: 'CONFIG_USB_CONN_GPIO' last val (m) and .config val (y) do not match
    [INFO]: CONFIG_USB_CONN_GPIO : y ## .config: 5334 :configs///defconfig (m)
    [INFO]: raw config text:

        config USB_CONN_GPIO
        	tristate "USB GPIO Based Connection Detection Driver"
        	select USB_ROLE_SWITCH
        	depends on GPIOLIB && USB_SUPPORT
        	help
        	  The driver supports USB role switch between host and device via GPIO
        	  based USB cable detection, used typically if an input GPIO is used
        	  to detect USB ID pin, and another input GPIO may be also used to detect
        	  Vbus pin at the same time, it also can be used to enable/disable
        	  device if an input GPIO is only used to detect Vbus pin.

        	  To compile the driver as a module, choose M here: the module will
        	  be called usb-conn-gpio.ko

        Config 'USB_CONN_GPIO' has the following Direct dependencies (USB_CONN_GPIO=y):
                GPIOLIB(=y) && USB_SUPPORT(=y)
        Parent dependencies are:
             USB_SUPPORT [y] GPIOLIB [y]

    [INFO]: selection details for 'CONFIG_USB_CONN_GPIO':
        Symbols currently y-selecting this symbol:
          - PHY_TEGRA_XUSB

It is using the defconfig from upstream Linux.  So, change that
defconfig to correct the warning by changing USB_CONN_GPIO from 'm' to
'y'.

Change-Id: Ia5080f7f22d0f1aef065b58d8c3b0222625c8f58
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 16:03:19 -05:00
Ross Burton 9ed331bbd7 arm-bsp/edk2-firmware: upgrade SGI575 to 202011
Change-Id: Id002f1f460d9a0d66c913d3f3c7bb460ae7d5904
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton a780470d96 arm/edk2-firmware: upgrade platforms to fix VariablePolicyLib errors
Upgrade to a newer edk2-platforms revision to incorporate the fixes
for the VariablePolicyLib changes in edk2 itself.

Change-Id: I928a59baee9cea4958963ac86f0093521036740b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 800249ac61 arm/edk2-firmware: no need to depend on the C library
Firmware is baremetal so doesn't need the C library to build.

Change-Id: Ie376783cb45fb6d455bc5d9c687e77703ff2cd72
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 5a44edaa0e arm/trusted-firmware-m: upgrade to 1.1
Change-Id: Id0c37b291b32072ebe61abcd908ed9a2ebf79365
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton cff5aafc67 arm/trusted-firmware-m: set PACKAGE_ARCH
As this is machine-specific, set PACKAGE_ARCH to MACHINE.

Change-Id: I4569bce706de8dea4ba98770960c0d40348a3fa2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 60ef8543f4 arm/trusted-firmware-m: improve CMake calls
Use cmake more idiomatically, and enable verbose builds.

Change-Id: I908af71f4662fab1dde9de86fc7a56ca3701e0c5
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 235b7539d8 arm/trusted-firmware-m: remove more unneeded build dependencies
TF-M uses the binary Arm toolchains currently, so we can inhibit
all of the default dependencies.

Change-Id: I38a7bda9570d9d63d3d81f0886c437f29929a0f5
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton d9a0f4fe59 arm-bsp/trusted-firmware-m: move TFM_PLATFORM to machine configuration
Now this can be easily set in the machine, do so.

Change-Id: I964c78c8e1e8f845cc2c95193c4a795e12089d1a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 6a85fdbd77 arm/trusted-firmware-m: don't use COMPATIBLE_MACHINE directly
COMPATIBLE_MACHINE is a wrapper around raising SkipRecipe, and as this
recipe basically just needs TFM_PLATFORM set we can raise that if the
variable is not set.  This allows BSPs to set TFM_PLATFORM in their
machine configuration instead of needing to bbappend.

Change-Id: I8544ff14ac4689bfbea1f0ac68364b673abde6f1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 7fdd34516c arm-bsp/musca: remove trusted-firmware-m statements
Musca doesn't build 'images' in the traditional sense yet, just
trusted-firmware-m or Zephyr, so remove EXTRA_IMAGEDEPENDS.

Remove the preferred version for TF-M as we only ship one currently.

Change-Id: I2fbd1230f6ba7a49aa093ca90fc38e676ba14633
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Nathan Dunne 9b7905b994 arm-autonomy/xenguest-manager: Clean up code duplication
Reduced duplicated code in xenguest-manager to functions for better
maintainability. Also reduced instances of calling self with a different
argument, which is better for performance and log readability.

Issue-Id: SCM-1635
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ic37b6b0a8a5f38145a298cc6aab908e3e58ae313
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Usama Arif caaa21d84f arm-bsp/documentation: Update the command for building all components
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building trusted-firmware-a will
build all the required binaries.

Change-Id: Ia8675b048db4a127d32394f536632ce88fe20826
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Usama Arif 65618b753f arm-bsp/tc0: Enable verified u-boot
This involes creating the fitImage which contains
both the kernel and ramdisk. The fitImage is also
signed.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I2fc50740aac3e347be02438cf54ef5741183a670
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Usama Arif 511c1ca429 arm-bsp: update tc0 platform with latest u-boot
Use 2020.10 u-boot as it has tc0 platform merged in upstream.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: Ia7da8b96a4509cee25b096f6637c036fef910b48
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Diego Sueiro 16d10f9c58 arm-autonomy/wic: Revert Introduce empty plugin to create unformatted empty partitions
This reverts commit bc07e6c62a.

Wic empty plugin upstreamed to oe-core as: 77d174fc80663403ef76c5b808aafc1117d3545c.

Change-Id: I94e6fb8583cf6e26cf141087fe5adb187ea85ef1
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Nathan Dunne 7a3e9d5087 arm-autonomy/xenguest-manager: improved logging
Introduced logging functions to unite logging to the console and to
the logfile with different filterable log levels. Also introduced
logrotate to ensure the size of the log does not become excessive.

The Log levels introduced are:
ERROR INFO VERBOSE

By default, both the terminal and the logfile will receive ERROR logs.
More verbose logs can be written to the logfile in two ways:
- passing the parameter "-v" or "-vv" to write info and verbose respectively
- modifying the value of "XENGUEST_MANAGER_LOG_LEVEL" in the host conf file,
  or updating the entry it creates in the config file
  /etc/xenguest/xenguest-manager.conf

The order of precedence is as listed above

Issue-Id: SCM-1516
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I47f74802ed31a5bff12305eab707e009af7e5398
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Ross Burton 35adaace0e ci: fail any build that emits warnings
Using a custom logging.yml we can instruct BitBake's logger to write all
warnings and errors into a separate log file.

Then after the build has finished we can see if the log file is empty and if
not show it and abort the build.

Change-Id: Ida835b5c822941fb513dfb1758b4ec195e0050fc
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 15:35:25 +00:00
Ross Burton e40b99e131 ci: make bootstrap just another kas overlay
Simplify the gitlab-ci by having the bootstrap build as just another Kas
overlay file, so there's no duplication of build script.

Change-Id: I7341750d2ae7f3c146bfe323f61fa98c0f3121c0
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 15:35:25 +00:00
Ross Burton fecf206b7d arm-bsp/linux: explicitly refuse to build for Musca
The Musca boards can't run Linux, so explictly refuse to build a kernel
on those platforms.

Change-Id: Ic38e9fb5a7af5b27b83a74615ece5d49c60d927b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:50:35 +00:00
Ross Burton 9b5f0a0cc4 arm/trusted-firmware-a: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: Ie53e82fffe5392d8e6f8d530d9f4ed732f03b50f
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton 88a5524a61 arm/trusted-firmware-m: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: I8e028b9457719a462f2028daca028714b80fad63
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton eea9ce959a arm/edk2-firmware: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: I1226290c223d18b776efffeccd48d291755d01a1
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton 98014d1c1c arm/optee-test: add comment
Upstream has potentially fixed the musl issues, so leave a comment to remind
whoever does the upgrade.

Change-Id: I24d9b23e492b29b6690c0843c3f2c950791f93e5
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton a230baa675 arm/optee: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: Ibc43aecd3cb4def85e2f1549d16f5bcb27cfb703
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Brett Warren da32f5c1c8 arm/trusted-firmware-a: -Wtautological triggers removed
When compiling under clang, certain lines triggered
-Wtautological errors. Cosmetic modifications were made
via patches to mitigate this.

Change-Id: I3d17dd5102267e03a8b7d157e66e0788b542bdd8
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:51 -05:00
Brett Warren 293d1e0e8d arm-bsp/trusted-firmware-a: enable explicit linking to runtime builtin
When compiling under clang for aarch32, linking fails because
the compiler-rt builtins aren't implicitly linked. Recipes and
patches have been modified and added to explicitly pass the runtime
builtin when linking files.

Change-Id: I4299b7d078d77c1fdd5576ceec1491f91e73c35d
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:51 -05:00
Ross Burton e59fc3233b arm-bsp/u-boot: update FVP patch metadata
Change-Id: If8edc606afa57e33ddd05ae16d6bf53b798257bc
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton c90cf8ce5a arm-bsp/scp-firmware: update a patch that is now upstream
Change-Id: Ibfa8f7d3c0f38fcde514170211264ec02efff953
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton 5b98ef9d65 arm/op-tee: remove old 3.8.0
Change-Id: I8da09673c02f3a046e4291f7eb01cdb66117450f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton 35c0bcceea arm-bsp/musca: don't include qemu.inc
The oe-core qemu.inc is common configuration for the qemu machines
inside oe-core.  Including this to get qemuboot working has some
unintended consequences, such as a kernel being selected and
MACHINE_FEATURES being altered.

Change this to inherit qemuboot and set the correct filesystem type
directly.

Change-Id: Id17e2cc67f029653517ba802c7f8f5503eea3c31
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Henry Wang fabf4a3c0f arm-autonomy/container: Add a recipe to include container image
This commit implements a generic recipe to pack and import
container image to the xenguest image.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
Issue-Id: SCM-1738
Change-Id: I239b360f9a7dd1cdc050d46a40e210406ca21aae
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason b578b45092 arm-bsp: update SCP for TC0
Update TC0 SCP from using a local version (non-standard) to use the
generic 2.7 recipe.

Change-Id: I68aca8fe7f1f7a574a2324dff348f80cd4989581
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason e05be1a396 arm-bsp: update SCP for SGI575
Update SGI575 SCP from using a non-standard, post 2.6 release version of
SCP to using the generic v2.7 recipe.

Change-Id: I31945afbb16ce65b4f87130c6b85f12c89b8713c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason be19ce6b94 arm-bsp: have sgi575 use EDK2 sources
Move sgi575 off its own unique version of EDK2 and onto using the
version used in the EDK2 recipe.

NOTE: SGI575 not compiling cleanly with EDK2 202011

Change-Id: I7ab9a6673cc91758121b618e6691c25ae67e9a21
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason 7cd87c3ee3 arm: new recipes for EDK2
Rework the EDK2 recipes to allow for multiple versions, and create a
recipe for the latest version.  This will allow for BSPs using the older
version to continue to function while waiting to be upgraded.  Also,
rework the n1sdp recipe to use the 201911 recipe, but overwrite
everything with its unique git trees.

Change-Id: I96869191bcf896ea17304d2ccf93da58605c72a1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Kamil Dziezyk a49c59daf6 arm-autonomy/xenguest-manager: remove double arguments checking
This patch brings following changes to xenguest_volume_init() function:
 (*) removes doubled arguments validation,
 (*) adds missing check_private() call,
 (*) inherits diskdevice and volumename values,
     as first and second function arguments.

Issue-Id: SCM-1520
Change-Id: Id01a326c2db5db1fcaae9237f887e97ea208d6ff
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-11 10:13:17 -05:00
Ross Burton 7577cecab6 layers: consolidate layer priority to match oe-core
Without exceptional justification there is no good reason for layers to
have a priority other than 5, to match oe-core.  If a layer has a
priority higher than oe-core's then recipes in that layer take immediate
preference over those in oe-core and there's no simple way to resolve
this as that is exactly what is meant to happen.

As a concrete example, meta-arm-bsp contains older releases of U-Boot
for platforms that have not yet moved to the latest release in oe-core.
As the priority of meta-arm-bsp is higher, simply adding this layer to a
qemuarm build will immediately downgrade u-boot.

As there is no exceptional justification for the differing priorities,
unify on 5.

Change-Id: I1975753b4a9799cc00310a7c8a6a11c2aef41f65
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-11 10:13:17 -05:00
Ross Burton 3c9486fb31 arm/qemuarm64-secureboot: don't use -dev kernel
According to the comment linux-yocto-dev was being used to get a 5.5
kernel as 5.4 was panicking on boot.  Now linux-yocto defaults to 5.8
so just use the standard kernel instead.

Change-Id: Id382c69f16f2ff4b2cbc63be94a645e56616549d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 2a530c3419 kas: remove redundant env settings
These are left over from an experiment and are no longer needed.

Change-Id: I27677b58e4c196371a394f47b185f71917848528
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 0d83df0bd2 gitlab-ci: force git updates
Explicitly force kas to update in case the repositories are reused.

Change-Id: Ieedf518c7586bb1a4eff274dc1a33b52a3c49d9f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Diego Sueiro 966e15826a arm-autonomy/init: Revert Change execution order between modutils.sh and checkroot.sh
This reverts commit a996166e85.

The fix was merged in oe-core as: 39f16d7dc42dcfe4a3fcceb8e476ac3c1e0ba3a2

Change-Id: Iab8f7d7b49fe62f04a5c77c1b48ec7c4fcf5c617
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Diego Sueiro 719a003508 arm-autonomy/modutils-initscripts: Revert fix modules.dep update
This reverts commit 9872afc6c7.

The fix was merged in oe-core as: 572f3045faa0a937947fbd56bcfef7bad55e9da6

Change-Id: Ib9531c1d18ac743c063afe66de18015472cdbb3d
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 79360345fb arm-bsp/trusted-firmware-a: move N1SDP to TF-A 2.4
Change-Id: I85a7b9421a6d5267c778c164b8f0e0bdd24b8407
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Khasim Syed Mohammed d683a5bc92 arm-bsp/scp-firmware: Update N1SDP SCP firmware to 2.7.0
SCP firmware recipes are updated to build SCP firmware version 2.7.0 for N1SDP

Change-Id: Ic42fac178cf4ac9e87127e9b6258c9bd15101906
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Kamil Dziezyk 780fba3481 arm-autonomy/xen-tools: update vif hostname fix patch status
Fix for hostname setting in vif-nat script was merged in xen upstream repo,
(sha: 5499e0fc8082024bf7e2d0facd5c976e82105070),
hence correct patch status for 4.14 is 'Backport'.

Issue-Id: SCM-1523
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: I35f04bfa0f0fff81a1ef20d500b9323e5f13b9ed
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Ross Burton afa281b7a9 arm/opencsd: upgrade to 1.14.4
Notable changes include resolving a build race.

Clean up the recipe so that arguments are not passed twice in do_compile(),
and always pass the install path arguments to clean up the tasks.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Change-Id: I7e32a40092403fd0c0c53d157ae4581f7903356c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton f54bb78861 arm/scp-firmware: inhibit default DEPENDS
This is baremetal firmware so doesn't use the C runtime library and uses
the binary compiler for 32-bit Arm instead of the standard one, so
inhibit the default dependencies entirely.

Change-Id: Idd52bb09fea49640f1fc38e1c5a47ca8eecca107
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton de5d5e611a arm/trusted-firmware-a: no need to DEPENDS on a C runtime
This recipe is for baremetal firmware, so remove libc from DEPENDS.

Change-Id: I89d0dde3f48599b9221cb1e153344dbc05e8cebe
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton 2ab2f5e179 arm/trusted-firmware-m: no need to DEPENDS on a C runtime
This recipe is for baremetal firmware, so remove libc from DEPENDS.

Change-Id: Id37f82a4dad6207237117b65d242617467b83ed2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton 9d8bb0bea2 arm/trusted-firmware-m: clean up DEPENDS
TFM_DEPENDS isn't used anywhere so remove it.

Change-Id: I7707ada458a001a081aac1f417dc78d6ca37a307
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk 4b1d39b87d arm-autonomy/juno-firmware: add compressed kernel support
This patch adds support for lzma compressed kernel,
by setting KERNEL_ALT_IMAGETYPE to 'Image.lzma' and
adding additional decompression step during u-boot boot stage.

U-boot automatic Image decompression cannot be used here,
because if xen binary is the target of 'booti' command,
Image is not being decompressed neither by u-boot nor by xen.

Lzma compression is supported in u-boot with 'lzmadec' command,
and does not require setting additional dependencies inside kernel recipe.

Change-Id: I51b9aea962f8905f88b60ac28e71017c7d500189
Issue-Id: SCM-1769
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk 4ba96e72fd arm-autonomy/autonomy-host: add user defined partition to wic image
With this patch user can define additional partition entry,
via AUTONOMY_HOST_EXTRA_PARTITION variable.

Issue-Id: SCM-1514
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ic103a40de44ea6cd88caa60f06033a9c678b265f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk cd9cdaad2a arm-autonomy/juno-image-customization: add host wks file
This patch also appends 'wic wic.gz wic.bmap' images,
to IMAGE_FSTYPES.

WKS file contains two partition entries:
 * first is rootfs partition
 * second is empty partition (4 GiB by default)

Issue-Id: SCM-1520
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ic0c79ee5eb4b08ad8f9c133b267feda1c85519a3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk e3b06f63b1 arm-autonomy/xenguest-tools: add multiple disk devices support
With this patch user can set DISK_DEVICE for guest image.
If guest disk configuration contains DISK_DEVICE setting,
xenguest-manager uses that disk for this guest, insted of default one,
that is set with XENGUEST_VOLUME_DEVICE in xenguest-manager.conf file.
DISK_DEVICE is not set by deafult.

Change-Id: If400850f60097d38339e76a3d18fc0e2b927f3a0
Issue-Id: SCM-1513
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:23 -05:00
Jon Mason 03f2d78e45 arm: update Android common kernel
Update ACK to ASB-2020-07-05_5.4-stable and remove the 4.19 recipe

Change-Id: Iecc56effff11ecd9619553381815445b64aa645e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-02 13:39:34 -05:00
Ross Burton e64c553fa0 Add experimental CI using Kas+GitLab
Add kas scripts that generic to test builds, and a GitLab CI runner.

Change-Id: I9026fd1af4155288c4adb523d00b1562ea8515e9
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-30 15:44:59 +00:00
Jon Mason 7f5a3b06ee arm/scp-firmware: Add SCP v2.7.0
Add the latest version of SCP.  Not adding an inc file between them,
since the older one should be removed ASAP.

Change-Id: I0a1e58ffdb6d0d405b199e498587fe410076fc08
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton a8a44f6916 arm/scp-firmware: remove redundant python3native inherit
Change-Id: I9df71eb6bb99bb4af48b77f50a1056027c8227a4
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton fda2117467 arm-bsp/scp-firmware: explicitly select scp-firmware 2.6
Explicitly select scp-firmware 2.6 in all the machines that use it.

Change-Id: I83d3214fff05e7cbbf182f1215e67da42ceb68f1
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton 095d9e314d arm-bsp/scp-firmware: add version to wildcard bbappend
To prepare for a new version of scp-firmware, add a version to this
bbappend.

Change-Id: Ib6d79f2992783f2d582ca5804bc081912f9bb674
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Satish Kumar 148103bf84 arm-bsp/boot-firmware: update boot-firmware recipe to latest hash
The recipe now points to the folowing commit.
commit hash : af7eeb1bb8c5a85a5e5a76d48acc6fe864d715a9

Change-Id: I73313597ddee117d92351d6daa1f7bae0b5edb82
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton f8fc3b463d arm-bsp/boot-firmware: add firmware recipe for corstone700
Previously corstone700 used the scp-firmware recipe to build
boot-firmware, which is based on scp-firmware but doesn't share the
build system.

As the differences are not insignificant, extract a dedicated
boot-firmware recipe.  Also set PV appropriately as boot-firmware now
has dated tags.

Change-Id: I3b60172e145be571aa465afb81473b9d79e9e425
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Nathan Dunne e18ee052f7 arm-autonomy/xenguest-manager: Fixed subshell false positive
Removed private check from check_size and is_integer to prevent
false positive error on execution in a subshell

Issue-Id: SCM-1623
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I57564bf610e21244c963a77c0669da5d4526eeff
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Khasim Mohammed 22948879f8 arm-bsp/n1sdp-board-firmware: include RAM firmware for secondary device
While testing multi-chip mode it was observed that n1sdp running
as secondary device needs scp and mcp RAM firmware as well.

This issue wasn't captured earlier as QSPI flash had RAM firmware installed
and it doesn't get erased automatically therefore the device was able to
load it on every reboot.

Change-Id: Ied9d24429c7025206e35f50c8e5b6f090a590015
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Khasim Syed Mohammed 99da50c473 arm-bsp/n1sdp: add overview section to n1sdp documentation
Update the n1sdp documentation in meta-arm-bsp to include overview section
and link to Arm community portal for further details on hardware platform.

Change-Id: Ic7c212db18a8c1f24255615061eee862af3aafd1
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton b0188cd0cc arm-bsp/fvp-base*: move to trusted-firmware-a 2.4
Move both FVP platforms to TF-A 2.4.

Change-Id: I2bf668c798983847197bfef80ef14ab3c87ecad5
Tested-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton fb045c9019 arm-bsp: remove foundation-armv8 machine
The Foundation FVP machine is no longer relevant now that meta-arm has
Base FVP machines and the Base FVPs are freely available.

Change-Id: Ia7043d98e2bcd8433c8c3d2661cd28484f691276
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton df93a23ad4 arm-bsp/external-system: remove coreutils-native DEPENDS
This recipe doesn't appear to actually need coreutils-native at all, and
using it exposes a bug in pseudo where cp crashes.

Change-Id: I2fbf9ee75165194866e4a14758ed06148340dc2b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:16 +00:00
Ross Burton 87d12f6fa4 arm-bsp/trusted-firmware-a: adapt for patched recipe
The base trusted-firmware-a recipe is now patched, but these BSPs
chose to use an intermediate SHA instead of the release.  This SHA
already contains the patch, so we need to remove it from SRC_URI.

Change-Id: I69fab93cefd2e8b38474e308c6f2910454ba3a81
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:16 +00:00
Abdellatif El Khlifi 42b114e5e0 arm-bsp/trusted-firmware-a: fix the Corstone-500 system timer issue
This commit applies the TF-A fix allowing to use the right FPGA system
timer clock frequency for Corstone-500.

Change-Id: Iaa09d33eb76d9b2b74cb3400897c8cc0e3c694db
Signed-off-by: lakshmi Kailasanathan <lakshmi.Kailasanathan@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 39ae13d44e arm-bsp/u-boot: enabling the generic timer for Corstone-500
This commit updates the ARMv7 generic timer driver by configuring
and enabling the timer.

Change-Id: I1fc1df83f40e28869d8dd41ff7b202f6fa177a1f
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 390aa6e354 arm-bsp: use forcevariable override to set Corstone-500 kernel
Corstone-500 is built against poky-tiny distro.
poky-tiny sets PREFERRED_PROVIDER_virtual/kernel to linux-yocto-tiny.
Since distro config is evaluated after the machine config, we need to
use the strongest override possible (forcevariable) so the
PREFERRED_PROVIDER_virtual/kernel specified in the machine config will
apply.

Change-Id: Iafa9209bf39cf63e83faa6eefa2a442513992290
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 8e2fa5edc8 arm-bsp: branding CA5DS to Corstone-500
This commit changes the name of CA5DS platform to Corstone-500

Change-Id: I7fc687aea8ce6bba6d7021963ad4cb38f30858d5
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Kamil Dziezyk 342d2ec158 arm-autonomy/firmware-image-juno: update offset addresses for NOR flash images
This patch brings following improvements:
 * Remove images-r[012].txt and uEnv.txt source files
   and move all customization to add-xen-support.patch.
 * Move juno*-xen.dtb and xen binaries under dedicated
   'XEN' directory to be compatible with 8.3 format.
 * Increase XEN_DEVICETREE_DOM0_SIZE to 36 MiB.

Change-Id: I3d3ff963f97c738dcf2d90ba825729232d63ad06
Issue-Id: SCM-1567
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-23 16:11:22 +00:00
Nathan Dunne ce8369461e arm-autonomy/xenguest-manager: Private xenguest-manager functions
Ensure that init scripts sourced on guest start cannot execute functions
from the parent script. This is done using a check for the BASH_SUBSHELL
variable to see the depth of execution.

An error will be thrown if any init script attempts to execute a
function from xenguest-manager

Issue-Id: SCM-1623
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I87fee51d03a64d99728a7eca1ca789ec7293096b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-23 09:25:31 -05:00
Nathan Dunne 3bbddbe213 arm-autonomy/n1sdp-image-customization: boot partition size variables
Added variables BOOT_PART_SIZE and BOOT_PART_SIZE_UNIT to allow the
boot partition to be configured in conf files.

Issue-Id: SCM-1686
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iaa76d4abdcccc693b3c38708ca452295ff8ee66e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-23 09:06:03 -05:00
Kamil Dziezyk 02994f94df arm-autonomy/xenguest-mkimage: improve xenguest image checks
This patch brings following improvements:
 * Adding the same partition content e.g rootfs.tar.gz,
   for multiple partitions is now not possible.
 * Guest partition can contain only supported values of:
   - format types: vfat|ext2|ext3|ext4|swap|(empty)
   - image types: *.img.gz|*.img.bz2|*.img
                  *.tar.gz|*.tar.bz2|*.tar.xz|*.tar

Change-Id: I0201e7ef51830ac43fc59656fc496fcc1d13b8d4
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk aa35796c80 arm-autonomy/xenguest-manager: keep user defined partition order
If xenguest image does not define some partitions,
e.g second partition definition is skipped but 1st and 3rd are present,
xenguest-manager will create second partition(with small 2MB size),
to keep user defined partition order.

Change-Id: I8ff19fd9f25eb47ac37f80bec849387f6802aba3
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 5331993f8c arm-autonomy/xenguest-mkimage: check if partition fits disk size
Check if partition defined with '--disk-add-part=*' will fit
in disk size defined with '--disk-size=*'.

Change-Id: Ide87fe541d050497b4f2e5b5b47c1bcac8f5d37a
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 9b075d12de arm-autonomy/xenguest-tools: set guest disk and partition sizes in MB or GB
This patch brings following improvements:
 * Allow user to set guest disk and partition sizes in MB or GB.
 * Documentation update about this improvement.

Change-Id: I0a1a2945022efcd9d32bb39404b4a85721e28e19
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 91225be953 arm-autonomy/xenguest-mkimage: fix DISK_DEVICE setting
Previously '--disk-device' was set according to DISK_SIZE value,
set with '--disk-size' option, which was not quite accurate,
because disk device is more likely to be '/dev/sda2' rather than '1'.
This patch also fixes typo in help message.

Change-Id: I19aa72f3adb32cd786bb570023b6b40cfc5633bf
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 7c34d0affc arm-autonomy/xen-devicetree: check if kernel Image size is correct
This patch brings following improvements:
 * Adds a check for kernel size defined by XEN_DEVICETREE_DOM0_SIZE variable,
   whether it is greater or equal to actual kernel size.
   If not, bitbake warns user and adjusts value of XEN_DEVICETREE_DOM0_SIZE.
 * Adds 'virtual/kernel:do_deploy' as a mandatory xen-devicetree dependency via
   XEN_DEVICETREE_DEPEND variable.

Issue-Id: SCM-1567
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: I4f250172f1fa599b7a3673ba0887cd49372b7556
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Ross Burton d8dbaa20b2 arm/trusted-firmare-a: add version 2.4
Change-Id: Ia31b459a497bb5029d18a202b8add5edc7fd6872
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton e52410e281 arm/trusted-firmware-a: consolidate SRC_URI and S
All the recipes use the same value for SRC_URI and S, so consolidate them
into the include file.

Change-Id: Ieda6b0104e163ce46190e9fc5756a264f7198f25
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 60f5176196 arm-bsp/fvp-common: explicitly select trusted-firmware-a 2.3
These BSPs don't select a version of trusted-firmware-a, for clarity and
allow smooth upgrades explictly select 2.3.

Change-Id: Ieea7d075d709e2006ebf217d802f3eeecfb9a281
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 136207e7c1 arm-bsp/fvp-base-arm32: explicitly select trusted-firmware-a 2.2
Previously TF-A 2.3 failed to build for fvp-base-arm32, so explicitly select 2.2 for now.

Change-Id: I21f74861c5d5955ed7890d4e6fafc72dd85fe27f
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 56180fce2b arm-bsp/a5ds: explicitly select trusted-firmware-a 2.3
This BSP doesn't select a version of trusted-firmware-a, for clarity and
allow smooth upgrades explictly select 2.3.

Change-Id: I4e7ca6ff8322e22406040ba2f220d36e1bde4cae
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Ross Burton 067a259cbd arm/trusted-firmware-a: add CVE_PRODUCT
trusted-firmware-a has gone by many names in the CVE database, so add
them all.

Change-Id: I51f64211d10245ffcae010e3a723657ff4114b9c
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Ross Burton 197b0732e3 arm/optee-os: add CVE_PRODUCT tag
There are known CVEs for optee-os, so set the CVE_PRODUCT to ensure that
they are found.

Change-Id: Ibe88c2193a8e33f603386beedc76fe60eac1b3ea
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Nathan Dunne 214ec04498 arm-autonomy/arm-autonomy-host-image-minimal: Added multiconfig support
Added new documentation file arm-autonomy-multiconfig.md which explains
how to set up a multiconfig build, where both the host and guest are
built simultaneously in the same build dir.

To enable this feature the dependency between host and guest is set in
the image recipe, using the variables described in the documentation.

Issue-Id: SCM-638
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iae315c128dc6d2b39281312bc1a2ab9b88f6241e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Nathan Dunne 42c4ba9c96 arm-autonomy/documentation: Updated for gatesgarth branch
Updated arm-autonomy-quickstart.md to suggest a user checkout the
latest gatesgarth branch instead of zeus.

Issue-Id: SCM-1521
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Idbd54efbe4bdbc31588f726b41b082de89812d60
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 9872afc6c7 arm-autonomy/modutils-initscripts: Fix modules.dep update
When building an image with USE_DEPMOD="0" we expect that on the first boot the
modutils.sh initscript will create the modules.dep file if it is empty or not
present.

Change-Id: I0048dc47f807587e723c068b0a4ba24718d66f49
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro a996166e85 arm-autonomy/init: Change execution order between modutils.sh and checkroot.sh
When '/' is first mounted as read-only, we want to have the checkroot.sh
initscript (which then remounts '/' as rw if allowed) running before the
modutils.sh.
This is because modutils.sh initscript might need to run depmod depending on
the status of the modules.dep file to update it and the '/' needs to be
writable.

Change-Id: Idac9aa19fba6b6bf46532097a667ce0518af515c
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro e9e01e9be7 arm-autonomy/n1sdp: Add GRUB config when including alternate kernel
For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present
we set, as GRUB config, the arm-autonomy-n1sdp-rt-grub.cfg which includes
additional entries for booting with the PREEMPT_RT kernel.

Change-Id: If40aee159ae5ba0efd3d9a5a16ee1c1167fb0504
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro ce9650ec84 arm-autonomy/n1sdp: Add support for building/installing alternate kernel
For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present
we build the linux-linaro-arm-rt (with PREEMPT_RT support) by setting it as the
PREFERRED_PROVIDER_alternate/kernel. As required, we set the
KERNEL_PACKAGE_NAME_pn-linux-linaro-arm-rt to kernel-rt.

Also, include the alternate kernel binary as Image-preempt-rt in the boot
partition of the generated wic image by setting the IMAGE_EFI_BOOT_FILES
variable.

Change-Id: I205caf5ef8b8d6b8a37ec3f4d0981fe8736cae63
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro a9cd4fc12f arm-autonomy/arm-autonomy-host-image-minimal: Build/Install alternate kernel
This patch introduces the usage of the alternate-kernel DISTRO_FEATURE, and
when it is present we will build and install the alternate kernel set via
PREFERRED_PROVIDER_alternate/kernel.

Change-Id: I1fe7447a5f903d7ff5584813bfb38fca8979e755
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 171616a183 arm-autonomy/classes: Introduce alternate-kernel.bbclass
The alternate-kernel.bbclass is to be inherited by image recipes that want to
build and install an alternate kernel (set via
PREFERRED_PROVIDER_alternate/kernel).

It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
its value needs to be different from "kernel" since this is the default set
for PREFERRED_PROVIDER_virtual/kernel.

When building and installing an alternate kernel, the kernel-modules packages
for both virtual/kernel and alternate/kernel will be installed.

Change-Id: I1cd0c425c39206fe449fb5f8761ed6de95cfb442
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 3c738c4f69 arm-autonomy/linux-linaro-arm-rt: Add preempt-rt-extras.scc KERNEL_FEATURE
For now, when building the linux-linaro-arm-rt recipe we want these extra
settings:
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_HZ_1000=y

Change-Id: I23573a2b5be512b7a84c71bc50a1a63b2d95dffb
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 222fcf4281 arm-autonomy/linux-linaro-arm-rt: add linux-RT patch for xen dynamic events
This patch contain following fix:
 * xen: use handle_fasteoi_irq to handle xen dynamic events

Change-Id: I0b1734247b151d65ca510a074a5de56e8f8f0ada
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Ross Burton aee22517e4 gem5/gem5-aarch64-native: bump to 20.0.0.3
Minor point release, that successfully compiles with GCC 9.3.

Change-Id: I22bec41f92ea4ae6e9fb7b6e6706338c0134bf99
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 11:55:37 -05:00
Ross Burton 167c854412 gem5/gem5-aarch64-native: don't specify -j twice
There's no need to pass -j here as the scons clas does this already.

Also, BB_NUMBER_THREADS is the number of BitBake threads, not the number
of parallel make jobs.

Change-Id: Ib6179bf05c5ec57b7cbe9c045f7bea86518d35af
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 11:55:37 -05:00
Kamil Dziezyk 9a2847c0d6 arm-autonomy/xenguest-init: fix guest shutdown issues after host reboot
This patch contain following changes:
 * xenguest-init stop action uses now blocking call,
   and additional 'xl destroy guest' call if normal shutdown has failed.
 * xenguest-init stop action stops only running guest.
 * xenguest-init script is now caled before xen-tools scripts
   on host shutdown or reboot.
 * xenguest-network-bridge script is now called before ifupdown script
   on host shutdown or reboot.

Change-Id: I46e307fd0ad36b2e35559b4e8a071be9bbc50e34
Issue-Id: SCM-1632
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 10:38:44 -05:00
Khasim Mohammed 55daf196a6 arm-bsp/n1sdp: remove swap parition entry from wic image
The swap partition on n1sdp seem to create an issue when shutdown or reboot is run
from the shell prompt, the console stops at "Deactivating swap ...". Hence
removing the swap partition entry from wic image.

Change-Id: I22cf971fdde7e3b8b386c74003983fab3d309cc5
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 10:38:44 -05:00
Jon Mason 5fa6bc3a9c arm-bsp: fix missing stable kernels
Corstone, a5ds, and sgi575 were using the meta-kernel, but recent
updates removed support for their non-LTS kernel.  Change to using the
respective kernels present in linux-yocto until it can be upgraded to
the latest version.

Change-Id: I63f2e511fe69051c06e6559950b798c1371cc8e9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 09:23:50 -05:00
Jon Mason 0f0a971458 arm-bsp: Fix u-boot 2020.07 recipe
The u-boot 2020.07 temporary recipe is a copy of 2020.04, and brought
with it a limitation in the recipe to only be used on certain hardware.
Remove this limitation so that it can be used where needed.

Change-Id: I5b99e92f3f440812ebc1fc550e6b860e6530e9b7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-12 14:04:24 -05:00
Jon Mason 658faaff76 arm-bsp: create u-boot 2020.07 to resolve warning
Poky, etc master branches updated the u-boot recipes to use 2020.10,
causing bbappends for 2020.07 to no longer function.  Create a temporary
recipe for 2020.07 until all the BSPs can update to support the latest
version.

Change-Id: Ib5fc9b8a2ff2ccf01be3640a34429d2c1e57b627
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:04:20 -05:00
Diego Sueiro db1d714029 arm-bsp/n1sdp: Add wic.gz and wic.bmap to IMAGE_FSTYPES
Speed up wic image flashing by including wic.gz and wic.bmap to IMAGE_FSTYPES.

Change-Id: I503b6ede5aaf188aabd2a925c2c42e5872d7713a
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:04:20 -05:00
Usama Arif 56514201ad tc0/spm: boot SP according to boot order specified in manifest
This is currently in review at:
https://review.trustedfirmware.org/c/hafnium/hafnium/+/4997/36

Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-10-27 17:35:35 +00:00
Arunachalam Ganapathy 86f9419b9d arm-bsp: Enable SPM build option in yocto framework
This patch adds:
spm, tf-a-tests recipes.
This builds tf-a with SPM at S-EL2 and test secure partitions at S-EL1.

Change-Id: Ia2f44f4000aa0786b945bc8fb66c9edb1a0094e8
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-10-27 17:35:26 +00:00
Usama Arif da57312334 arm-bsp/images: Add tc0-kernel-image
This depends on trusted-firmware-a which is the last component to be built.
Calling bitbake tc0-kernel-image will create all the required images
to boot poky.

Change-Id: Ia8675b048db4a127d32394f536632ce88fe20826
Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-10-26 18:26:37 +00:00
Usama Arif 70a9c4991e arm-bsp/u-boot: update SHA for tc0
Change-Id: Ideb4866df92d05bdc07b53f47346ae4f381dfc6d
Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-10-26 18:26:35 +00:00
Usama Arif 29cee51f84 arm-bsp/tc0: Enable verified u-boot
This involes creating the fitImage which contains
both the kernel and ramdisk. The fitImage is also
signed.

Change-Id: Iaedffd54751585a7ef6b467d63f5f8fb6e744aa7
Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-10-26 18:20:22 +00:00
384 changed files with 31265 additions and 6534 deletions
+139
View File
@@ -0,0 +1,139 @@
# Use our custom Crops-derived image
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/yocto-builder:master
# First do a common bootstrap, and then build all the targets
stages:
- bootstrap
- build
# Common job fragment to get a worker ready
.setup:
stage: build
variables:
KAS_WORK_DIR: $CI_PROJECT_DIR/work
SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
DL_DIR: $CI_BUILDS_DIR/persist/downloads
BB_LOGCONFIG: $CI_PROJECT_DIR/kas/logging.yml
before_script:
- echo KAS_WORK_DIR = $KAS_WORK_DIR
- echo SSTATE_DIR = $SSTATE_DIR
- echo DL_DIR = $DL_DIR
- mkdir --verbose --parents $KAS_WORK_DIR $SSTATE_DIR $DL_DIR
# Generalised fragment to do a Kas build
.build:
extends: .setup
script:
- KASFILES=$(kas/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- ./kas/check-warnings $KAS_WORK_DIR/build/warnings.log
#
# First phase, bootstrap and machine coverage
#
# Build a number of native tools first to ensure the other builders don't race
# over them
n1sdp/bootstrap:
extends: .build
stage: bootstrap
# What percentage of machines in the layer do we build
machine-coverage:
stage: bootstrap
script:
- ./kas/check-machine-coverage
coverage: '/Coverage: \d+/'
#
# Second phase, the actual build jobs
#
corstone500:
extends: .build
corstone700-fvp:
extends: .build
corstone700-mps3:
extends: .build
fvp-base:
extends: .build
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gcc-arm32:
extends: .build
gem5-arm64:
extends: .build
juno:
extends: .build
juno/clang:
extends: .build
musca-b1:
extends: .build
musca-s1:
extends: .build
n1sdp:
extends: .build
n1sdp/armgcc:
extends: .build
qemuarm64-secureboot:
extends: .build
qemuarm64-secureboot/clang:
extends: .build
qemuarm64-secureboot/clang/musl:
extends: .build
qemuarm64-secureboot/musl:
extends: .build
sgi575:
extends: .build
tc0:
extends: .build
#
# Utility tasks, not executed automatically
#
# Report on disk usage
usage:
extends: .setup
stage: bootstrap
when: manual
script:
- du -h -s $DL_DIR $SSTATE_DIR
# Wipe out old sstate
prune-sstate:
extends: .setup
stage: bootstrap
when: manual
script:
- find $SSTATE_DIR -type f -atime +30 -delete
# Delete all sstate
delete-sstate:
extends: .setup
stage: bootstrap
when: manual
script:
- rm -rf $SSTATE_DIR/*
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
local_conf_header:
cc: |
GCCVERSION = "arm-10.2"
+44
View File
@@ -0,0 +1,44 @@
header:
version: 9
distro: poky
defaults:
repos:
refspec: master
repos:
meta-arm:
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
layers:
meta:
meta-poky:
env:
BB_LOGCONFIG: ""
local_conf_header:
base: |
CONF_VERSION = "1"
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_WHITELIST += "armcompiler"
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
INHERIT += "rm_work"
PACKAGECONFIG_append_pn-perf = " coresight"
ERROR_QA = "${WARN_QA}"
ptest: |
DISTRO_FEATURES_remove = "ptest"
machine: unset
target:
- core-image-base
- perf
+9
View File
@@ -0,0 +1,9 @@
header:
version: 9
target:
- binutils-cross-aarch64
- gcc-cross-aarch64
- python3-native
- opkg-native
- rpm-native
+26
View File
@@ -0,0 +1,26 @@
#! /usr/bin/env python3
from pathlib import Path
import sys
metaarm = Path.cwd()
if metaarm.name != "meta-arm":
print("Not running inside meta-arm")
sys.exit(1)
# All machine configurations
machines = metaarm.glob("meta-*/conf/machine/*.conf")
machines = set(p.stem for p in machines)
# All kas files
kas = metaarm.glob("kas/*.yml")
kas = set(p.stem for p in kas)
missing = machines - kas
print(f"The following machines are missing: {', '.join(sorted(missing))}.")
covered = len(machines) - len(missing)
total = len(machines)
percent = int(covered / total * 100)
print(f"Coverage: {percent}%")
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
# Expects the path to a log file as $1, and if this file has any content
# then display the contents and exit with an error code.
set -e -u
LOGFILE=$1
if test -s $LOGFILE; then
echo ==============================
echo The build had warnings/errors:
echo ==============================
cat $LOGFILE
exit 1
fi
exit 0
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
local_conf_header:
clang: |
TOOLCHAIN = "clang"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: corstone500
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
machine: corstone700-fvp
local_conf_header:
image: |
CORE_IMAGE_EXTRA_INSTALL = "corstone700-test-app"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- corstone700-fvp.yml
machine: corstone700-mps3
+8
View File
@@ -0,0 +1,8 @@
header:
version: 9
local_conf_header:
cc: |
PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "/usr/local/gcc-arm-10.2-2020.11-aarch64-arm-none-linux-gnueabihf"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: fvp-base-arm32
+7
View File
@@ -0,0 +1,7 @@
header:
version: 9
includes:
- base.yml
machine: fvp-base
+21
View File
@@ -0,0 +1,21 @@
header:
version: 9
includes:
- base.yml
repos:
meta-arm:
layers:
meta-gem5:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
machine: gem5-arm64
target:
- core-image-minimal
- perf
- gem5-aarch64-native
+19
View File
@@ -0,0 +1,19 @@
#! /bin/bash
# Read a GitLab CI job name on $1 and transform it to a
# list of Kas yaml files
set -e -u
# Read Job namne from $1 and split on /
IFS=/ read -r -a PARTS<<<$1
# Prefix each part with kas/
PARTS=("${PARTS[@]/#/kas/}")
# Suffix each part with .yml
PARTS=("${PARTS[@]/%/.yml}")
# Print colon-separated
IFS=":"
echo "${PARTS[*]}"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: juno
+13
View File
@@ -0,0 +1,13 @@
# Python logging configuration to write all warnings to a separate file
version: 1
handlers:
warnings:
class: logging.FileHandler
level: WARNING
filename: warnings.log
formatter: BitBake.logfileFormatter
loggers:
BitBake:
handlers: [warnings]
+9
View File
@@ -0,0 +1,9 @@
header:
version: 9
repos:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
meta-python:
+8
View File
@@ -0,0 +1,8 @@
header:
version: 9
includes:
- meta-python.yml
repos:
meta-zephyr:
url: https://git.yoctoproject.org/git/meta-zephyr
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: musca-b1
target:
- trusted-firmware-m
- zephyr-philosophers
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
- meta-python.yml
machine: musca-s1
target:
- trusted-firmware-m
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
local_conf_header:
libc: |
TCLIBC = "musl"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: n1sdp
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm64-secureboot
target:
- core-image-base
- perf
- optee-examples
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: sgi575
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: tc0
@@ -0,0 +1,26 @@
# This class is to be inherited by image recipes that want to build and install
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
#
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
# recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
# its value needs to be different from "kernel" since this is the default set
# for PREFERRED_PROVIDER_virtual/kernel.
#
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
#
# When building and installing an alternate kernel, the kernel-modules packages
# for both virtual/kernel and alternate/kernel will be installed.
PREFERRED_PROVIDER_alternate/kernel ??= ""
python () {
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
if alternate_kernel:
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME_pn-%s' % alternate_kernel)
if alternate_kernel_pkg_name:
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
else:
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME_pn-%s set" % alternate_kernel )
}
@@ -43,14 +43,17 @@ XENGUEST_IMAGE_KERNEL ??= "Image"
# be included in the xenguest image)
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
# set empty partition to be used by xenguest-manager for this image
XENGUEST_IMAGE_DISK_DEVICE ??= ""
#
# XENGUEST_IMAGE_DISK PARTITIONS is used to describe the partitions to setup
# XENGUEST_IMAGE_DISK_PARTITIONS is used to describe the partitions to setup
# and their content.
# It must be set to a space separated list of entries with each entry having
# the format num:sz:fs:[file] where:
# the format num:sz:[fs]:[file] where:
# - num is a partition number
# - sz is the partition size in Gigabit
# - fs is the filesystem to use for the partition
# - sz is the partition size in MB or GB(default), e.g 1000M or 1[G]
# - fs is optional filesystem to use for the partition
# - file is optionally pointing to a file to use as content of the partition
# Please check image_types_xenguest.bbclass for rootfs handling of files
#
@@ -129,21 +132,27 @@ xenguest_image_create() {
# create disk if needed
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
if [ -z "$disksize" ]; then
disksize="0"
fi
if [ $disksize -gt 0 ]; then
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
case ${disksize:=0} in
0|0M|0G)
;;
*)
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
done
fi
diskdevice="${XENGUEST_IMAGE_DISK_DEVICE}"
if [ -n "$diskdevice" ]; then
call_xenguest_mkimage update --disk-device="${diskdevice}"
fi
;;
esac
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
partnum="$(expr $partnum + 1)"
done
fi
fi
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
+1 -1
View File
@@ -9,7 +9,7 @@ BBFILES += " \
BBFILE_COLLECTIONS += "meta-arm-autonomy"
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-autonomy = "6"
BBFILE_PRIORITY_meta-arm-autonomy = "5"
LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
@@ -11,7 +11,7 @@ KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES += "tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
DISTRO_FEATURES += "arm-autonomy-guest"
@@ -0,0 +1,195 @@
arm-autonomy Multiconfig Build Environment Instructions
==================
This documentation explains how to simplify the process of building hosts
and guests in a single bitbake command, rather than in seperate build
folders. You can read more about multiconfig in the bitbake documentation:
- [bitbake user manual](https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html)
To achieve a multiconfig build, a number of different config files need to
be created in a single build directory.
Create a new project
----------------
Before you start, you will need to follow the instructions in
"Create a project" from the quickstart guide, to create a new project
directory with
```
oe-init-build-env my-mc-project
```
Ensure it has all the required layers in bblayers.conf as listed in
`arm-autonomy-quickstart.md`. The result should be a directory containing:
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
```
Add multiconfig
----------------
Here are the steps required to make the project build both the host and any
number of guests as required.
1. Create a new directory under `conf/` named `multiconfig/`
2. Create two new files in this directory:
`multiconfig/host.conf`
`multiconfig/guest.conf`
These files will contain any configurations that a specific to either the
host or the guest
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
| -- multiconfig
| -- host.conf
| -- guest.conf
```
3. In `local.conf` the following config variables must be added:
```
MACHINE ?= "fvp-base"
# ---Guest Config Start--- #
MC_GUEST = "guest"
MC_GUEST_NAME = "guest1"
MC_GUEST_IMAGERECIPE = "core-image-minimal"
MC_GUEST_MACHINE = "arm64-autonomy-guest"
MC_GUEST_INITRAMFS_IMAGE_BUNDLE ?= ""
MC_GUEST_INITRAMFS_IMAGE ?= ""
# Uncomment for initramfs
#MC_GUEST_INITRAMFS_IMAGE_BUNDLE = "1"
#MC_GUEST_INITRAMFS_IMAGE = "${MC_GUEST_IMAGERECIPE}"
# These variables are set automatically, don't edit them!
MC_GUEST_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}' }"
MC_GUEST_FILENAME = "${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.xenguest"
MC_GUEST_DEP = "${@ 'virtual/kernel:do_deploy' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}:do_image_complete'}"
MC_DOIMAGE_MCDEPENDS += "mc:${MC_HOST}:${MC_GUEST}:${MC_GUEST_DEP} "
BBMULTICONFIG += "${MC_GUEST} "
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS += "file://${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME};guestname=${MC_GUEST_NAME} "
# ---Guest Config End--- #
# ---Host Config Start--- #
MC_HOST = "host"
BBMULTICONFIG += "${MC_HOST} "
# ---Host Config End--- #
```
These variables will be used in both of the multiconf files. `MC_HOST` and
`MC_GUEST` should not be altered without renaming the conf files, but most
`MC_GUEST_*` variables can be customised if you desire.
4. Next set the contents of `multiconfig/guest.conf`:
```
TMPDIR = "${TOPDIR}/${MC_GUEST}"
MACHINE = "${MC_GUEST_MACHINE}"
DISTRO_FEATURES += " arm-autonomy-guest"
INITRAMFS_IMAGE_BUNDLE = "${MC_GUEST_INITRAMFS_IMAGE_BUNDLE}"
INITRAMFS_IMAGE = "${MC_GUEST_INITRAMFS_IMAGE}"
IMAGE_FSTYPES += "${@ 'cpio' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else ''}"
# ANY OTHER GUEST CONFIG
```
This contents shouldn't be changed directly, rather change the equivalent
config in local.conf. You can append any other config desired for the
guest at this point, for example `XENGUEST_IMAGE_DISK_SIZE`
Make sure not to change `${DEPLOY_DIR_IMAGE}` to anything other than
`${TMPDIR}/deploy/images`, as this is assumed by local.conf.
5. Lastly set the contents of `multiconfig/host.conf`:
```
TMPDIR = "${TOPDIR}/${MC_HOST}"
DISTRO_FEATURES += " arm-autonomy-host"
```
Building the image
----------------
To build the multiconfig image the command is:
```
bitbake mc:host:arm-autonomy-host-image-minimal
```
You should see that this triggers guest tasks to be built in
parallel. Once the build completes the guest will already be in the
rootfs of the host thanks to `ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST`
The deployed image including the guest will be in `host/deploy/images/`
Multiple Guests
----------------
To have multiple guests with the same config the line which appends to
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST` just needs to be duplicated with
a different guestname.
To have different config for each guest, each will need its own config
file similar to guest.conf, ensuring TMPDIR is set to a different path,
and everything between `---Guest Config Start---` and
`---Guest Config End---` will need to be duplicated.
Any copies of variables that start `MC_GUEST` must be altered to avoid
collisions (e.g. `MC_GUEST_2_*`), and the name of the conf file must also
be added to BBMULTICONFIG.
Guest with provisioned disk
----------------
To add guest rootfs partition to host wic image,
set `AUTONOMY_HOST_EXTRA_PARTITION` with proper wks partition entry, e.g:
```
AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy --fstype=ext4 --ondisk sda --align 1024 \
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
```
inside host.conf file.
The rest of the configuration has to be appended to guest.conf file:
```
XENGUEST_IMAGE_DISK_SIZE = "0"
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
XENGUEST_IMAGE_ROOT = "/dev/xvda"
IMAGE_ROOTFS_SIZE = "102400"
IMAGE_FSTYPES = "ext4"
```
content of rootdisk.cfg"
```
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
```
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
according to wks file.
@@ -26,11 +26,10 @@ First you must download the Yocto layers needed:
- [poky](https://git.yoctoproject.org/poky)
- [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)
- [meta-arm](https://git.yoctoproject.org/meta-arm)
- [meta-kernel](https://gitlab.com/openembedded/community/meta-kernel.git)
- all other layers you might want to use
For each of the downloaded layer make sure you checkout the release of Yocto
you want to use (for example zeus using `git checkout zeus`).
you want to use (for example gatesgarth using `git checkout gatesgarth`).
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
in order to have the required dependencies.
@@ -57,7 +56,6 @@ Here are the main steps to create an arm-autonomy project:
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
$LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-kernel \
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
```
@@ -73,7 +71,6 @@ Here are the main steps to create an arm-autonomy project:
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
/home/user/arm-autonomy/meta-openembedded/meta-networking \
/home/user/arm-autonomy/meta-virtualization \
/home/user/arm-autonomy/meta-kernel \
/home/user/arm-autonomy/meta-arm/meta-arm \
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
@@ -147,6 +144,9 @@ To create a guest project:
The build will create a ".xenguest" image that can be use on an host project
with the xenguest-manager.
The guest can also be built as a 'multiconfig' sub project of the host, see
`meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md` for more information
Include guests directly in the host image
-----------------------------------------
The layer provides a way to directly include in the host project one or several
@@ -209,7 +209,7 @@ and is configuring it by default to use dhcp.
If you need a different type of configuration you can set
XENGUEST_NETWORK_BRIDGE_CONFIG in a xenguest-network-bridge.bbappend to use
a different file.
The recipe will look for the file in ${WORKDIR} so you will need to add it to
The recipe will look for the file in ${WORKDIR} so you will need to add it to
SRC_URI in your bbappend.
The recipe will also substitute `###BRIDGE_NAME###` with the bridge name
configured in ${XENGUEST_NETWORK_BRIDGE_NAME}.
@@ -11,12 +11,17 @@ perform a couple of customizations in the generated wic image:
1 MiB per physical volume, hence it needs to be taken into account when
setting GUEST_PART_SIZE.
2. The wic image partition layout and contents with a custom wks file via
2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
`BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
bootimg is ~44M so 100M leaves just over 50M of free space.
3. The wic image partition layout and contents with a custom wks file via
`ARM_AUTONOMY_WKS_FILE` variable (default:
arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
GRUB_CFG_FILE variables).
3. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
@@ -70,7 +70,10 @@ The following parameters are available:
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
dom0 is defined using Xen boot arguments.
This variable is set by default to "1024M".
This variable is set by default to "1024M,max:1024", and cannot be empty.
The value can simply specify a size, e.g. "1024M", but best practice is to
also provide a max, documented here:
https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
booting it.
@@ -84,7 +87,8 @@ The following parameters are available:
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
be used for Dom0 will be copied. When using u-boot, this is the address at
which you will load the kernel Image before starting Xen.
This variable is set by default to "0x80080000".
This variable is set by default to "0x80080000", and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
@@ -92,7 +96,8 @@ The following parameters are available:
size but can be bigger. You must be careful not to have a value too big as it
could slow down boot or copy other parts with it (like the DTB).
You might need to increase this if you use a kernel with a bundled initramfs.
This variable is set by default to "0x01000000".
This variable is set by default to "0x01000000" and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
must be included inside the generated DTB file. By default the only one
@@ -23,7 +23,7 @@ Usage
-----
xenguest-manager must be called like this:
`xenguest-manager OPERATION [OPTIONS]`
`xenguest-manager [-v(v)] OPERATION [OPTIONS]`
The following operations are available:
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
@@ -37,6 +37,9 @@ The following operations are available:
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
not given, print the status of all guests.
Passing -v or -vv will increase the logging written to the logfile.
The terminal will always show only error messages, regardless of the logfile.
For a detailed help on available options please use:
`xenguest-manager --help`
@@ -65,6 +68,13 @@ The following parameters are available:
name).
This is set by default to "/usr/share/guests".
- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager. Must
be one of ERROR, INFO, VERBOSE (default: ERROR). The extra will be
written to /var/log/xenguest.
If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
will override the setting in xenguest-manager.conf
Init scripts
------------
@@ -80,7 +90,7 @@ directory on the target:
Inside the directory, scripts will be executed in alphabetical order.
Since these scripts are sourced by xenguest-manager they can acccess functions
Since these scripts are sourced by xenguest-manager, they can acccess functions
and variables from the parent file's scope, including:
- ${guestname} : The name of the guest being created
@@ -89,12 +99,31 @@ and variables from the parent file's scope, including:
- ${guestcfgfile} : The name of the config file for the starting guest
- ${LOGFILE} : The file to append any logging to, e.g.
echo "Hello, World" >> ${LOGFILE}
- log() : Used to write a log to the logfile, default level INFO.
Takes an optional log level and a message body
e.g. log ERROR "blah"
Options for log level: ERROR, INFO, VERBOSE, and FATAL, which
will call exit 1 immediately after logging the message
- log_command() : Used to call a shell command and log that it has been
called, as well as capturing both stdout and stderr.
By default the command output is dumped to the logfile as an error
if the command returns a status > 0, or as a verbose message if the
whole script is running in verbose mode. An optional log level can
be passed to alter the level the log should be if the command returns
a status >0,
e.g. log_command INFO "ls -lh ~"
Options for log level: ERROR, INFO, and VERBOSE
Attempting to call any other functions from xenguest_manager in an init script may
result in a fatal error, from which cleanup is not guarenteed.
Sourcing also allows the script to access params.cfg.
An example of how to create the directory and install an init shell script can
be found in:
recipes-extended/xenguest/xenguest-network.bb
@@ -58,12 +58,19 @@ order.
### disk.cfg and disk-files
disk.cfg contains the guest disk description (disk size and disk partitions).
The file contains the following entries:
- `DISK_SIZE=X`: size of the disk to create in GB
- `DISK_SIZE=X`: size of the disk to create in MB or GB(default),
e.g. 1000M or 4[G]
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
size of SIZE GB, format it with filesystem FS (can be ext2, ext3, ext4, vfat
or swap) and extract CONTENT as initial partition content
(.tar[.gz|.xz|.bz2] file or img[.gz|.bz2] file to be dumped in the partition). FS and
CONTENT can be empty.
size of SIZE MB or GB(default), e.g 1000M or 2[G].
Format it with filesystem FS (can be ext2, ext3, ext4, vfat or swap)
and extract CONTENT as initial partition content (.tar[.gz|.xz|.bz2] file
or img[.gz|.bz2] file to be dumped in the partition).
FS and CONTENT can be empty.
- `DISK_DEVICE=X`: disk or partition to be used by lvm. Setting this option
allows to bind guest disk with any partition or disk available on host,
e.g. /dev/sda3 or /dev/sdb.
This variable is not set by default, but if set, it overrides disk settings
inside xenguest-manager.conf - 'XENGUEST_VOLUME_DEVICE'.
The disk-files contain files to be used for initializing the disk partitions
content. Those should be used to create a LVM or a physical disk and initialize
@@ -105,12 +112,12 @@ For a detailed help on available operations, please use:
image file. Several script can be added and the basename of FILE is used to
distinguish them (calling the option twice with the same file will update the
script in the image with the second one).
--disk-size=SIZE: set the guest disk size to SIZE in GB. Calling this with 0
disable the guest disk.
--disk-size=SIZE: set the guest disk size to SIZE in MB or GB(default),
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
xenguest image disk. The partition is described with the arguments:
- NUM: partition number.
- SIZE: partition size in GB.
- SIZE: partition size in MB or GB(default), e.g 1000M or 2[G].
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
vfat of swap. If empty the partition is not formated.
- CONTENT: tar of img file to use to initialize the partition. The file must
@@ -1,4 +1,26 @@
# Extra machine settings for juno
KERNEL_ALT_IMAGETYPE = "Image.lzma"
# Juno board has 2 network interfaces, add both of them to the bridge
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
XEN_DEVICETREE_DOM0_SIZE ?= "0x02400000"
# We need to extend the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH_prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-juno-disk.wks.in"
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'${ARM_AUTONOMY_WKS_FILE}', d)}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# set wic image type only if INITRAMFS_IMAGE_BUNDLE is not set
IMAGE_FSTYPES += "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'wic wic.gz wic.bmap', d)}"
@@ -14,8 +14,19 @@ WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# Set default boot partition size and unit
BOOT_PART_SIZE ?= "100"
BOOT_PART_SIZE_UNIT ?= "M"
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
#
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel.
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
, d)}"
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
# the "/" partition is /dev/sda2.
@@ -38,3 +49,42 @@ do_image_wic[depends] += "xen:do_deploy"
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
# Use 5.4 kernel until later versions have been validated for autonomy-host
PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-arm"
PREFERRED_VERSION_linux-linaro-arm = "5.4%"
# When alternate-kernel DISTRO_FEATURE is present we set the linux-linaro-arm-rt
# by default
PREFERRED_PROVIDER_alternate/kernel ?= "\
${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \
'linux-linaro-arm-rt', '', d)}"
KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt"
# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by
# default
KERNEL_PACKAGE_NAME_pn-linux-linaro-arm-rt = "\
${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \
else 'kernel' }"
# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image
KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt"
# Only include the Kernel PREEMPT_RT Image if we are building with
# alternate-kernel DISTRO_FEATURE
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
EFIDIR ?= "/EFI/BOOT"
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel and also includes
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
@@ -4,6 +4,19 @@ OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d
FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:"
DEPENDS_append_xen = " dos2unix-native"
SRC_URI_append_xen = " file://add-xen-support.patch;patchdir=../"
do_install_append_xen() {
mv -v ${D}/${UNPACK_DIR}/SOFTWARE/uEnv.txt \
${D}/${UNPACK_DIR}/SOFTWARE/uenvfile
for dir in $(ls ${D}/${UNPACK_DIR}/SITE1/)
do
unix2dos ${D}/${UNPACK_DIR}/SITE1/${dir}/images.txt
done
}
DEPLOY_EXTRA_DEPS ??= ""
DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy"
@@ -14,8 +27,24 @@ do_deploy_prepend_xen() {
# xen:do_deploy and xen-devicetree:do_deploy when
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
# xen-devicetree binaries copying in the do_deploy task.
cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
${D}/${UNPACK_DIR}/SOFTWARE/xen
cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \
${D}/${UNPACK_DIR}/SOFTWARE/
mkdir -p ${D}/${UNPACK_DIR}/SOFTWARE/XEN
cp -v ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/xen
for dtb in $(basename -s .dtb ${KERNEL_DEVICETREE})
do
cp -v ${DEPLOY_DIR_IMAGE}/${dtb}-xen.dtb \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/${dtb}.dtb
done
bbnote "Xen binaries added under SOFTWARE/XEN directory"
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" -a "${KERNEL_ALT_IMAGETYPE}" = "Image.lzma" ]; then
# KERNEL_ALT_IMAGETYPE is expected to be Image.lzma,
# however NOR flash filesystem is DOS compatible with 8.3 naming,
# so we need to replace ".lzma" with ".lzm"
cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_ALT_IMAGETYPE} \
${D}/${UNPACK_DIR}/SOFTWARE/Image.lzm
fi
}
@@ -0,0 +1,173 @@
arm-bsp/firmware-image-juno: add xen support
This patch adds xen and dtbs binaries entries to images-r[012].txt files.
These images-r[012].txt files contain NOR filesystem entries details,
like file offset, name, path etc.
It also adds customization for uEnv.txt file, that allows to autoboot xen.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
diff -u a/images-r0.txt b/images-r0.txt
--- a/images-r0.txt 2020-11-25 20:25:38.677687712 +0100
+++ b/images-r0.txt 2020-11-25 20:36:55.482194294 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r1.txt b/images-r1.txt
--- a/images-r1.txt 2020-11-25 20:40:19.005177152 +0100
+++ b/images-r1.txt 2020-11-25 20:41:17.500886263 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r1.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r2.txt b/images-r2.txt
--- a/images-r2.txt 2020-11-25 20:40:30.625119321 +0100
+++ b/images-r2.txt 2020-11-25 20:41:30.720820597 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r2.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/uEnv.txt b/uEnv.txt
--- a/uEnv.txt 2020-11-20 13:48:31.845078690 +0100
+++ b/uEnv.txt 2020-11-25 20:30:00.572306675 +0100
@@ -1,11 +1,16 @@
+xen_name=xen
+xen_addr=0x84000000
uenvcmd=run mybootcmd
+kernel_alt_name=norkern.lzm
+kernel_comp_addr_r=0x88080000
mybootcmd=echo Loading custom boot command; \
echo Loading kernel; \
afs load ${kernel_name} ${kernel_addr_r} ; \
-if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr_r}; fi; \
+if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_comp_addr_r}; lzmadec ${kernel_comp_addr_r} ${kernel_addr_r}; fi; \
echo Loading device tree; \
afs load ${fdtfile} ${fdt_addr_r}; \
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
afs load ${fdt_alt_name} ${fdt_addr_r}; fi; fdt addr ${fdt_addr_r}; fdt resize; \
-booti ${kernel_addr_r} - ${fdt_addr_r};
-
+echo Loading Xen; \
+afs load ${xen_name} ${xen_addr}; \
+if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr_r}; fi;
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-r1-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-r2-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,15 +0,0 @@
xen_name=xen
xen_addr=0x84000000
uenvcmd=run mybootcmd
mybootcmd=echo Loading custom boot command; \
echo Loading kernel; \
afs load ${kernel_name} ${kernel_addr} ; \
if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr}; fi; \
echo Loading device tree; \
afs load ${fdtfile} ${fdt_addr}; \
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
afs load ${fdt_alt_name} ${fdt_addr}; fi; fdt addr ${fdt_addr}; fdt resize; \
echo Loading Xen; \
afs load ${xen_name} ${xen_addr}; \
if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr}; fi;
@@ -0,0 +1,7 @@
# Yocto kernel-cache sets CONFIG_NLS_CODEPAGE_437=m for LINUX_KERNEL_TYPR=preempt-rt
CONFIG_NLS_CODEPAGE_437=y
# Yocto kernel-cache sets CONFIG_NLS_ISO8859_1=m for LINUX_KERNEL_TYPR=preempt-rt
CONFIG_NLS_ISO8859_1=y
# Set the timer interrupt run at 1000 Hz to have a fast response
CONFIG_HZ_1000=y
@@ -0,0 +1,3 @@
define KFEATURE_DESCRIPTION "Extra kernel configs when building with PREEMPT_RT"
kconf non-hardware preempt-rt-extras.cfg
@@ -0,0 +1,80 @@
From c2971c8a3f076ea8a522ce4fbb367d112d86c13a Mon Sep 17 00:00:00 2001
From: Stefano Stabellini <sstabellini@kernel.org>
Date: Mon, 27 Apr 2020 16:15:26 -0700
Subject: [PATCH] xen: use handle_fasteoi_irq to handle xen dynamic events
When handling Xen events, we need to make sure the following sequence is
followed:
- mask event
- handle event and clear event (the order does not matter)
- unmask event
It is not possible to implement this flow with handle_edge_irq, so
switch back to handle_fasteoi_irq. Please note that Xen event irqs are
ONESHOT. Also note that handle_fasteoi_irq was in-use before the
following commit, that is partially reverted by this patch:
7e186bdd0098 xen: do not clear and mask evtchns in __xen_evtchn_do_upcall
PIRQ handling is left unchanged.
This patch fixes a domU hang observed when using LinuxRT as dom0 kernel.
Link: https://lkml.org/lkml/2020/4/27/1287
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Upstream-Status: Inappropriate since the upstream solution diverges from this patch
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
---
drivers/xen/events/events_base.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 6c8843968a52..1873a19b8b24 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -845,7 +845,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
goto out;
irq_set_chip_and_handler_name(irq, &xen_dynamic_chip,
- handle_edge_irq, "event");
+ handle_fasteoi_irq, "event");
ret = xen_irq_info_evtchn_setup(irq, evtchn);
if (ret < 0) {
@@ -978,7 +978,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu, bool percpu)
handle_percpu_irq, "virq");
else
irq_set_chip_and_handler_name(irq, &xen_dynamic_chip,
- handle_edge_irq, "virq");
+ handle_fasteoi_irq, "virq");
bind_virq.virq = virq;
bind_virq.vcpu = xen_vcpu_nr(cpu);
@@ -1387,12 +1387,6 @@ static void ack_dynirq(struct irq_data *data)
clear_evtchn(evtchn);
}
-static void mask_ack_dynirq(struct irq_data *data)
-{
- disable_dynirq(data);
- ack_dynirq(data);
-}
-
static int retrigger_dynirq(struct irq_data *data)
{
unsigned int evtchn = evtchn_from_irq(data->irq);
@@ -1595,8 +1589,7 @@ static struct irq_chip xen_dynamic_chip __read_mostly = {
.irq_mask = disable_dynirq,
.irq_unmask = enable_dynirq,
- .irq_ack = ack_dynirq,
- .irq_mask_ack = mask_ack_dynirq,
+ .irq_eoi = ack_dynirq,
.irq_set_affinity = set_affinity_irq,
.irq_retrigger = retrigger_dynirq,
--
2.17.1
@@ -0,0 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.4:"
SRC_URI_append = " \
file://0001-xen-use-handle_fasteoi_irq-to-handle-xen-dynamic-eve.patch \
"
KERNEL_FEATURES += "features/arm-autonomy/preempt-rt-extras.scc"
@@ -0,0 +1,14 @@
# short-description: Create a disk image
# long-description: Creates a partitioned disk image that the user
# can directly dd to boot media.
# For Juno first partition is rootfs normally populated as /dev/sda1
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Second partition to accomodate guests images normally populated as /dev/sda2 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
# Third partition is user defined entry normally populated as /dev/sda3
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos
@@ -3,7 +3,7 @@
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
# First boot partition normally populated as /dev/sda1
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
# Second rootfs partition normally populated as /dev/sda2
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
@@ -11,4 +11,7 @@ part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Third partition to accomodate guests images normally populated as /dev/sda3 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
# Fourth partition is user defined entry normally populated as /dev/sda4
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
@@ -0,0 +1,28 @@
set term="vt100"
set default="3"
set timeout="5"
source $prefix/arm-autonomy-n1sdp-grub.cfg
menuentry 'N1SDP PREEMPT_RT ACPI Boot' {
linux /Image-preempt-rt $kernel_cmdline acpi=force
}
menuentry 'N1SDP PREEMPT_RT Single-Chip Boot (Device Tree)' {
devicetree /n1sdp-single-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Multi-Chip Boot (Device Tree)' {
devicetree /n1sdp-multi-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
# no_argumants under here is a workaround for a bug
# also any kernel or dom0 cmdline arguments has to be passed via dtb
# because any arguments put here will be ignored by xen
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
xen_module /Image-preempt-rt
devicetree /n1sdp-single-chip-xen.dtb
}
@@ -0,0 +1,39 @@
#!/bin/sh
CONTAINER_IMAGE_FILE="###CONTAINER_IMAGE_FILE###"
CONTAINER_IMAGE_NAME_AND_TAG="###CONTAINER_IMAGE_NAME_AND_TAG###"
CONTAINER_IMAGE_FILE_KEEP="###CONTAINER_IMAGE_FILE_KEEP###"
has_docker_image() {
docker image inspect "$1" >/dev/null 2>&1
}
start() {
# Image does not exist and image file exists: Import the image.
if ! has_docker_image ${CONTAINER_IMAGE_NAME_AND_TAG} && \
[ -f "/usr/share/docker/images/${CONTAINER_IMAGE_FILE}" ]; then
echo "Importing ${CONTAINER_IMAGE_NAME_AND_TAG} container image..."
docker import \
/usr/share/docker/images/${CONTAINER_IMAGE_FILE} \
${CONTAINER_IMAGE_NAME_AND_TAG} 2>&1 || {
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Failed."
exit $?
}
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Done."
if [ "${CONTAINER_IMAGE_FILE_KEEP}" != "1" ]; then
rm /usr/share/docker/images/${CONTAINER_IMAGE_FILE}
fi
fi
}
case "$1" in
start)
start && exit 0
;;
*)
echo "Usage: $0 {start}"
exit 2
esac
exit $?
@@ -0,0 +1,79 @@
#
# This recipe imports a docker container image to the xenguest image
# Notes:
# - Users should add docker in the local.conf of their target with
# DISTRO_FEATURES += " docker" to make sure docker is installed.
# - The CONTAINER_IMAGE_FILE variable defines the docker
# container image to be imported and should be set in local.conf.
# - The CONTAINER_IMAGE_FILE_KEEP variable defines the
# behaviour that if the container image file is kept after import.
# Setting this variable to 1 means keep the container image file after
# import. This variable can be set in local.conf.
# - The CONTAINER_IMAGE_NAME_AND_TAG variable defines the name and
# tag of the imported image. The value of this variable should follow
# the format of `NAME:TAG`. This variable can be set in local.conf.
#
DESCRIPTION = "Import a docker image to xenguest"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
CONTAINER_IMAGE_FILE ??= ""
CONTAINER_IMAGE_FILE_KEEP ??= ""
CONTAINER_IMAGE_NAME_AND_TAG ??= "local:local"
inherit features_check
REQUIRED_DISTRO_FEATURES = "docker"
python __anonymous() {
# Check if `CONTAINER_IMAGE_FILE` is empty.
container_image_file = d.getVar('CONTAINER_IMAGE_FILE')
if not container_image_file:
raise bb.parse.SkipRecipe("CONTAINER_IMAGE_FILE is empty")
# In case we have a symlink we need to convert the link to its realpath.
if os.path.islink(container_image_file):
container_image_file = os.path.realpath(container_image_file)
bb.warn("Given CONTAINER_IMAGE_FILE: %s is a symlink, "
"convert the link to its realpath: %s" %
(d.getVar('CONTAINER_IMAGE_FILE'), container_image_file))
d.setVar('CONTAINER_IMAGE_FILE', container_image_file)
# Check if the container image file exists.
# The container image file here is either the real file or the symlink target.
if not os.path.exists(container_image_file):
raise bb.parse.SkipRecipe("CONTAINER_IMAGE_FILE: %s does not exist." %
container_image_file)
# Here we can ensure that the CONTAINER_IMAGE_FILE exists and is valid.
# Therefore we can append this file to SRC_URI.
d.appendVar('SRC_URI', ' file://' + container_image_file + ';unpack=0')
}
S = "${WORKDIR}"
SRC_URI = "file://import_container.sh"
inherit update-rc.d
INITSCRIPT_PARAMS = "start 30 2 3 4 5 ."
INITSCRIPT_NAME = "import_container.sh"
do_install() {
install -d ${D}${sysconfdir}/init.d
install -d -m 755 ${D}${datadir}/docker/images
install -m 777 ${CONTAINER_IMAGE_FILE} ${D}${datadir}/docker/images/.
install -m 755 import_container.sh ${D}${sysconfdir}/init.d
BASENAME_CONTAINER_IMAGE_FILE=$(basename "${CONTAINER_IMAGE_FILE}")
sed -i "s,###CONTAINER_IMAGE_FILE###,${BASENAME_CONTAINER_IMAGE_FILE}," \
${D}${sysconfdir}/init.d/import_container.sh
sed -i "s,###CONTAINER_IMAGE_NAME_AND_TAG###,${CONTAINER_IMAGE_NAME_AND_TAG}," \
${D}${sysconfdir}/init.d/import_container.sh
sed -i "s,###CONTAINER_IMAGE_FILE_KEEP###,${CONTAINER_IMAGE_FILE_KEEP}," \
${D}${sysconfdir}/init.d/import_container.sh
}
FILES_${PN} += "${datadir}/docker/images"
RDEPENDS_${PN} = "packagegroup-docker-runtime-minimal"
@@ -0,0 +1 @@
CONFIG_FEATURE_TAR_LONG_OPTIONS=y
@@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# The --exclude flag in Busybox tar is required by xenguest-mkimage
SRC_URI += "file://feature_tar_long_options.cfg"
@@ -2,7 +2,11 @@
DESCRIPTION = "Arm Autonomy stack host minimal image"
inherit core-image
# When alternate-kernel DISTRO_FEATURE is present we will build
# and install the alternate kernel
inherit ${@bb.utils.filter('DISTRO_FEATURES', 'alternate-kernel', d)}
inherit core-image features_check
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
@@ -10,12 +14,21 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
# The ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS variable can be used to include in the
# image one or several xenguest images.
# The list must be space separated and each entry must have the following
# format: URL[;guestname=NAME]
# format: URL[;params]
# - URL can be the full path to a file or a Yocto compatible SRC_URI url
# - guestname=NAME can be used to specify the name of the guest. If not
# specified the basename of the file (without .xenguest extension) is used.
# - params encompasses two values that can be optionally set:
# - guestname=NAME can be used to specify the name of the guest. If not
# specified the default value is the basename of the file
# (without .xenguest extension).
# - guestcount=NUM can be used to created NUM guests with the same config.
# All guests after the first will have numbers appended to the guestname,
# starting from 2. In the rootfs additional xenguest files will be
# symlinks to the original.
# params should be semicolon seperated, without a space, and can appear in
# any order.
#
# Here are examples of values:
# /home/mydir/myguest.xenguest;guestname=guest1
# /home/mydir/myguest.xenguest;guestname=guest1;guestcount=3
# http://www.url.com/testguest.xenguest
#
# If you are using the output of an other Yocto project, you should use the
@@ -50,12 +63,31 @@ EXTRA_IMAGEDEPENDS += "xen"
# Build xen-devicetree to produce a xen ready devicetree
EXTRA_IMAGEDEPENDS += "xen-devicetree"
python __anonymous() {
if bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'arm-autonomy-host'")
# Documentation for setting up a multiconfig build can be found in:
# meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
if bb.utils.contains('DISTRO_FEATURES', 'xen', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'xen'")
# In a multiconfig build this variable will hold a dependency string, which differs based
# on whether the guest has initramfs or not.
# It may have a space seperated list of dependency strings if mulitple guest types are
# configured
MC_DOIMAGE_MCDEPENDS ?= ""
# Example value: mc:host:guest:core-image-minimal:do_image_complete
# In a multiconfig build the host task 'do_image' has a dependency on multiconfig guest.
# This ensures that the guest image file already exists when it is needed by the host
DO_IMAGE_MCDEPENDS := "${@ '${MC_DOIMAGE_MCDEPENDS}' if d.getVar('BBMULTICONFIG') else ''}"
# Apply mc dependency. Empty string if multiconfig not enabled
do_image[mcdepends] += "${DO_IMAGE_MCDEPENDS}"
REQUIRED_DISTRO_FEATURES += 'arm-autonomy-host'
REQUIRED_DISTRO_FEATURES += 'xen'
python __anonymous() {
import re
guestfile_pattern = re.compile(r"^([^;]+);")
guestname_pattern = re.compile(r";guestname=([^;]+);?")
guestcount_pattern = re.compile(r";guestcount=(\d+);?")
# Check in ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS for extra guests and add them
# to SRC_URI with xenguest parameter if not set
@@ -65,16 +97,19 @@ python __anonymous() {
# If the user just specified a file instead of file://FILE, add
# the file:// prefix
if guest.startswith('/'):
guestfile = ''
guestname = ''
if ';guestname=' in guest:
# user specified a guestname
guestname = guest.split(';guestname=')[1]
guestfile = guest.split(';guestname=')[0]
else:
# no guestname so use the basename
guestname = os.path.basename(guest)
guestfile = guest
guestname = os.path.basename(guest)
guestfile = guest
guestcount = "1"
f = guestfile_pattern.search(guest)
n = guestname_pattern.search(guest)
c = guestcount_pattern.search(guest)
if f is not None:
guestfile = f.group(1)
if n is not None:
guestname = n.group(1)
if c is not None:
guestcount = c.group(1)
# in case we have a link we need the destination
guestfile = os.path.realpath(guestfile)
@@ -83,7 +118,7 @@ python __anonymous() {
raise bb.parse.SkipRecipe("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS entry does not exist: " + guest)
# In case the file is a symlink make sure we use the destination
d.appendVar('SRC_URI', ' file://' + guestfile + ';guestname=' + guestname)
d.appendVar('SRC_URI', ' file://' + guestfile + ';guestname=' + guestname + ';guestcount=' + guestcount)
else:
# we have a Yocto URL
try:
@@ -119,8 +154,15 @@ python add_extern_guests () {
# Add file extension if not there
if not dstname.endswith('.xenguest'):
dstname += '.xenguest'
if not bb.utils.copyfile(path, guestdir + '/' + dstname):
bb.fatal("Fail to copy Guest file " + path)
if 'guestcount' in parm:
guestcount = int(parm['guestcount']) + 1
for i in range(2, guestcount):
os.symlink('./' + dstname, guestdir + '/' + dstname.replace('.xenguest', str(i) + '.xenguest'))
}
IMAGE_PREPROCESS_COMMAND += "add_extern_guests; "
@@ -14,10 +14,12 @@ DESCRIPTION = "Add entries in DTB for Xen and Dom0"
# Please refer to documentation/xen-devicetree.md for documentation on those
# parameters
XEN_DEVICETREE_DEPEND ?= "virtual/kernel:do_deploy"
# kernel size is passed to xen via xen.dtb so wee need to add
# 'virtual/kernel:do_deploy' as a dependency
XEN_DEVICETREE_DEPEND_append = " virtual/kernel:do_deploy"
XEN_DEVICETREE_DTBS ?= "${KERNEL_DEVICETREE}"
XEN_DEVICETREE_XEN_BOOTARGS ?= "noreboot dom0_mem=${XEN_DEVICETREE_DOM0_MEM}"
XEN_DEVICETREE_DOM0_MEM ?= "1024M"
XEN_DEVICETREE_DOM0_MEM ?= "1024M,max:1024M"
XEN_DEVICETREE_DOM0_BOOTARGS ?= "console=hvc0 earlycon=xen"
XEN_DEVICETREE_DOM0_ADDR ?= "0x80080000"
XEN_DEVICETREE_DOM0_SIZE ?= "0x01000000"
@@ -28,11 +30,36 @@ XEN_DEVICETREE_DTSI_MERGE ?= "xen.dtsi"
inherit nopackages deploy
DEPENDS += "dtc-native"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
# Validate xen devicetree variables
python __anonymous() {
# Compare values of a list of variables to a regex pattern
def validate_type(pattern, var_list):
for varname in var_list:
if d.getVar(varname):
if not pattern.match(d.getVar(varname)):
raise bb.parse.SkipRecipe(d.getVar(varname) + "' is not a valid value for " + varname + "!")
else:
raise bb.parse.SkipRecipe('Required variable ' + varname + ' is empty!')
import re
num_vars_to_check = ['XEN_DEVICETREE_DOM0_ADDR', 'XEN_DEVICETREE_DOM0_SIZE']
size_vars_to_check = ['XEN_DEVICETREE_DOM0_MEM']
num_pattern = re.compile(r'((0x[0-9a-fA-F]+)|[0-9]+)$')
size_pattern = re.compile(r'[0-9]+[MG](,max:[0-9]+[MG])?$')
validate_type(num_pattern, num_vars_to_check)
validate_type(size_pattern, size_vars_to_check)
}
do_deploy() {
if [ ! -f ${WORKDIR}/xen.dtsi.in ]; then
die "xen.dtsi.in does not exist"
@@ -67,6 +94,37 @@ do_deploy() {
done
}
do_deploy[depends] += "${XEN_DEVICETREE_DEPEND}"
do_deploy[prefuncs] += "calc_xen_dtb_dom0_size"
addtask deploy after do_install
python calc_xen_dtb_dom0_size() {
from math import ceil
size = 0
if d.getVar('KERNEL_IMAGE_MAXSIZE'):
bb.note('size calculation based on KERNEL_IMAGE_MAXSIZE')
size = int(d.getVar('KERNEL_IMAGE_MAXSIZE')) * 1024
else:
kernel = os.path.realpath(d.getVar('DEPLOY_DIR_IMAGE') + '/' +\
d.getVar('KERNEL_IMAGETYPE'))
size = os.stat(kernel).st_size
bb.note('size calculation based on kernel Image file: %s' % kernel)
bb.note('size in bytes: %d' % size)
# Ceil to MiB
size_required = ceil(size / (2 ** 20)) * (2 ** 20)
xen_devicetree_dom0_size = d.getVar('XEN_DEVICETREE_DOM0_SIZE')
if xen_devicetree_dom0_size[:2] == "0x":
size_defined = int(xen_devicetree_dom0_size, 16)
else:
size_defined = int(xen_devicetree_dom0_size)
if size_required > size_defined:
bb.note ("Wrong kernel size setting inside xen dtb!\n"\
"Required:\t%(req)d (%(req)#010X)\n"\
"Requested:\t%(def)d (%(def)#010X)"\
% {"req": size_required, "def": size_defined})
bb.note ("Overriding XEN_DEVICETREE_DOM0_SIZE with "\
"%(req)d (%(req)#010X)" % {"req": size_required})
d.setVar('XEN_DEVICETREE_DOM0_SIZE', hex(size_required))
}
@@ -1,18 +1,34 @@
Upstream-Status: Pending
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
From 5499e0fc8082024bf7e2d0facd5c976e82105070 Mon Sep 17 00:00:00 2001
From: Diego Sueiro <diego.sueiro@arm.com>
Date: Thu, 20 Aug 2020 11:58:20 +0100
Subject: [PATCH] tools/hotplug: Fix hostname setting in vif-nat
Setting the hostname is failing because the "$XENBUS_PATH/domain"
doesn't exist anymore. To fix this we set it to dom$domid
Index: git/tools/hotplug/Linux/vif-nat
===================================================================
--- git.orig/tools/hotplug/Linux/vif-nat
+++ git/tools/hotplug/Linux/vif-nat
@@ -86,6 +86,7 @@ router_ip=$(routing_ip "$ip")
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Wei Liu <wl@xen.org>
---
tools/hotplug/Linux/vif-nat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
index a76d9c784b..26144350b3 100644
--- a/tools/hotplug/Linux/vif-nat
+++ b/tools/hotplug/Linux/vif-nat
@@ -85,7 +85,7 @@ router_ip=$(routing_ip "$ip")
# Split the given IP/bits pair.
vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
+[ -z "${hostname}" ] && hostname=dom$domid
-hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
+hostname=dom$domid
if [ "$vifid" != "1" ]
then
hostname="$hostname-$vifid"
--
2.17.1
@@ -0,0 +1,6 @@
/var/log/xenguest {
missingok
size 10k
copytruncate
rotate 2
}
@@ -11,11 +11,13 @@ BRIDGE_NAME="###BRIDGE_NAME###"
case "${XENGUEST_NETWORK_TYPE:=}" in
nat)
echo "vif = ['script=vif-nat']" >> ${guestcfgfile}
log info "Network type is NAT"
;;
bridge)
echo "vif = ['script=vif-bridge,bridge=${BRIDGE_NAME}']" >> ${guestcfgfile}
log info "Network type is bridge: ${BRIDGE_NAME}"
;;
*)
echo "${@}: XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
log error "XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
;;
esac
@@ -65,8 +65,10 @@ case "$1" in
;;
stop)
echo "Stopping xenguest"
# update guest list
guestlist=$(xenguest-manager status | grep Running | cut -d ":" -f1)
for f in ${guestlist}; do
/usr/bin/xenguest-manager stop ${f}
xenguest-manager shutdown ${f} --kill
done
;;
reload)
File diff suppressed because it is too large Load Diff
@@ -110,7 +110,8 @@ Init configuration
Disk configuration
--disk-reset-config reset disk guest configuration to default (no disk)
--disk-size=SZ set guest disk size (in GB)
--disk-size=SZ set guest disk size in MB or GB(default),
e.g 1000M or 2[G].
--disk-device=DEV set device to be used to create the guest disk
if unset or set to an empty string, the volume will be
create in the default manager volume group.
@@ -127,7 +128,7 @@ Disk configuration
--disk-rm-part=ID remove partition ID from the guest disk
--disk-add-file=SRC:DST add file SRC as disk file DST in the xenguest image.
DST can then be used as a partition CONTENT.
--disk--rm-file=DST remove disk file DST from the xenguest image.
--disk-rm-file=DST remove disk file DST from the xenguest image.
EOF
}
@@ -370,13 +371,159 @@ disk_config_rm_part() {
sed -i "/DISK_PART${partid}=.*/d" ${IMAGE_TMPDIR}/disk.cfg
}
is_integer() {
if ! [[ "${1}" =~ ^[0-9]+$ ]]; then
>&2 echo "error: invalid number '${1}'"; exit 1
fi
}
# check size and convert it to MB, e.g '1[G]' => '1000M'
check_size() {
local disksize="${1}"
[ -n "${disksize}" ] || disksize="invalid"
# disksize may have appended M or G suffix, let's extract it
# ${var:offset:length}, where #var is var length
local lastchar="${disksize:${#disksize}-1}"
case "${lastchar}" in
[0-9])
# backwards compatibility
is_integer "${disksize}"
echo -e "$((${disksize} * 1000))M"
return
;;
G|M)
if [ "${#disksize}" -gt "1" ]; then
local size="${disksize::${#disksize}-1}"
is_integer "${size}"
# convert GB to MB
[ "${lastchar}" = "M" ] || size=$((${size} * 1000))
echo -e "${size}M"
return
fi
;;
*)
;;
esac
>&2 echo -e "Invalid size format '${1}'" \
"\n\tSupported size format is e.g 1000M or 2[G]"
exit 1
}
disk_config_get_size() {
disksize=$(echo -e "$( . ${IMAGE_TMPDIR}/disk.cfg && echo $DISK_SIZE)")
check_size "${disksize}"
}
disk_config_get_parts() {
echo -e "$( . ${IMAGE_TMPDIR}/disk.cfg && \
typeset -p | awk '$3 ~ /^DISK_PART/ { print $3 }')"
}
disk_config_get_free_space() {
disk_usage="0"
for partinfo in $(disk_config_get_parts)
do
partsize=$(echo "${partinfo}" | cut -d '"' -f2 | sed -e "s/:.*//")
sizeMB=$(check_size "${partsize}")
[ -n "${sizeMB}" ] || exit 1
disk_usage=$((${sizeMB::${#sizeMB}-1} + $disk_usage))
done
disk_size=$(disk_config_get_size)
echo -e "$((${disk_size::${#disk_size}-1} - ${disk_usage}))M"
}
disk_check_partition_format() {
local partformat="${1}"
# if partformat is not defined let's skip this check
[ -n "${partformat}" ] || return 0
case "${partformat}" in
vfat|ext2|ext3|ext4|swap)
;;
*)
# invalid/unknown fstype
echo "Invalid file fstype ${partformat}"
exit 1
;;
esac
}
disk_check_partition_content() {
local partcontent="${1}"
# if partcontent is not defined let's skip this check
[ -n "${partcontent}" ] || return 0
case "${partcontent}" in
*.img*)
case "${partcontent}" in
*.img.gz|*.img.bz2|*.img)
;;
*)
# invalid/unknown compression type
echo "Invalid file format in disk ${partcontent}"
exit 1
;;
esac
;;
*.tar*)
case "${partcontent}" in
*.tar.gz|*.tar.bz2|*.tar.xz|*.tar)
;;
*)
# invalid/unknown tar type
echo "Invalid file format in disk ${partcontent}"
exit 1
;;
esac
;;
*)
#invalid content type
echo "Unsupported content type ${partcontent}!"
exit 1
;;
esac
# do not allow to create multiple partitions the same content
if grep ":${partcontent}\"" <<< "$(disk_config_get_parts)"; then
echo "Error ${partcontent} is already inside guest image"
exit 1
fi
}
disk_config_add_part() {
partconf="${1}"
partid=$(echo ${partconf} | sed -e "s/:.*//")
partinfo=$(echo ${partconf} | sed -e "s/[^:]*://")
partsize=$(echo ${partinfo} | cut -d ":" -f1)
partformat=$(echo ${partinfo} | cut -d ":" -f2)
partcontent=$(echo ${partinfo} | cut -d ":" -f3)
# check size "ID:*SIZE*:FORMAT:CONTENT"
partsizeMB=$(check_size "${partsize}")
# Make sure we don't add the same partition twice
disk_config_rm_part ${partid}
disk_config_rm_part "${partid}"
# check available disk space
freespace=$(disk_config_get_free_space)
if ((${partsizeMB::${#partsizeMB}-1} > ${freespace::${#freespace}-1}))
then
echo -e "Not enough free disk space(${freespace}) for partition "\
"'${partconf}'!"\
"\tTo adjust disk size use '--disk-size' parameter"\
"\tor shrink the partition with '--disk-add-part' parameter"
exit 1
fi
# check format "ID:SIZE:*FORMAT*:CONTENT"
disk_check_partition_format "${partformat}"
# check content "ID:SIZE:FORMAT:*CONTENT*"
disk_check_partition_content "${partcontent}"
echo "DISK_PART${partid}=\"${partinfo}\"" >> \
${IMAGE_TMPDIR}/disk.cfg
}
@@ -742,11 +889,13 @@ for arg in "${@}"; do
disk_config_reset
;;
--disk-size=*)
sed -i "s/DISK_SIZE=.*/DISK_SIZE=\"${optarg}\"/" \
size=$(check_size "${optarg}")
[ -n "size" ] || exit 1
sed -i "s/DISK_SIZE=.*/DISK_SIZE=\"${size}\"/" \
${IMAGE_TMPDIR}/disk.cfg
;;
--disk-device=*)
sed -i "s/DISK_DEVICE=.*/DISK_SIZE=\"${optarg}\"/" \
sed -i "s@DISK_DEVICE=.*@DISK_DEVICE=\"${optarg}\"@" \
${IMAGE_TMPDIR}/disk.cfg
;;
--disk-add-part=*)
@@ -31,15 +31,14 @@ case "${XENGUEST_NETWORK_TYPE:-}" in
release_lock "vif-nat-kea"
exit 0
fi
echo "Waiting for ${vif_name} - network interface is not ready..."\
" try #${try}" >> "${LOGFILE}" 2>&1
log info "Waiting for ${vif_name} - network interface is not ready..."
log info "try #${try}"
sleep 1
done
echo "ERROR: Failed to get ${vif_name} "\
"network interface ready!" >> "${LOGFILE}" 2>&1
log error "Failed to get ${vif_name}. network interface ready!"
exit 1
;;
*)
echo "No action needed" >> "${LOGFILE}" 2>&1
log verbose "No action needed"
;;
esac
@@ -2,6 +2,16 @@
#
# xenguest-manager is a tool to control xen guest (e.g. create, start, stop)
#
# By default xenguest-manager logs to /var/log when in verbose mode, which is a
# Volatile directory. To persist logs across reboots the following needs to be
# added to either local.conf or distro.conf
#
# VOLATILE_LOG_DIR="no"
#
# Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
#
# When this is enabled, logrotate will monitor the file to ensure it does not grow
# excessively large. See files/logrotate-xenguest
DESCRIPTION = "Xen Guest Manager"
LICENSE = "MIT"
@@ -9,6 +19,7 @@ LICENSE = "MIT"
SRC_URI = " \
file://xenguest-manager \
file://xenguest-init \
file://logrotate-xenguest \
"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
@@ -17,14 +28,16 @@ S = "${WORKDIR}"
# Please refer to documentation/xenguest-manager.md for documentation on those
# parameters
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda2"
XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen"
XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen-$(basename ${XENGUEST_MANAGER_VOLUME_DEVICE})"
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
XENGUEST_MANAGER_LOG_LEVEL ?= "ERROR"
# We add an init script to create and start guests automatically
# run start script after xen-tools and run stop script before xen-tools
INITSCRIPT_NAME = "xenguest"
INITSCRIPT_PARAMS = "defaults 90"
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 79 0 1 6 ."
inherit update-rc.d
inherit allarch update-rc.d
do_compile() {
echo "XENGUEST_VOLUME_DEVICE=\"${XENGUEST_MANAGER_VOLUME_DEVICE}\"" > \
@@ -33,6 +46,8 @@ do_compile() {
xenguest-manager.conf
echo "XENGUEST_GUEST_DIR=\"${XENGUEST_MANAGER_GUEST_DIR}\"" >> \
xenguest-manager.conf
echo "XENGUEST_LOG_LEVEL=\"${XENGUEST_MANAGER_LOG_LEVEL}\"" >> \
xenguest-manager.conf
}
do_install() {
@@ -43,10 +58,13 @@ do_install() {
install -d -m 755 ${D}${sysconfdir}/init.d
install -m 755 xenguest-init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
install -d -m 755 ${D}${XENGUEST_GUEST_DIR}
install -d -m 755 ${D}${sysconfdir}/logrotate.d
install -m 644 logrotate-xenguest ${D}${sysconfdir}/logrotate.d/xenguest
}
# Things that we need on the target
RDEPENDS_${PN} += "bash tar xenguest-mkimage lvm2 xen-tools parted e2fsprogs dosfstools"
RDEPENDS_${PN} += "bash xenguest-mkimage lvm2 xen-tools parted e2fsprogs \
dosfstools logrotate"
FILES_${PN} += "${bindir}/xenguest-manager \
${sysconfdir}/xenguest"
@@ -17,6 +17,8 @@ S = "${WORKDIR}"
# Can be built native also to produce xenguest images during Yocto build
BBCLASSEXTEND = "native"
inherit allarch
do_configure[noexec] = "1"
do_compile[noexec] = "1"
@@ -25,7 +27,7 @@ do_install() {
install -m 755 xenguest-mkimage ${D}${bindir}/.
}
# We need bash and tar
RDEPENDS_${PN} = "bash tar"
# We need bash
RDEPENDS_${PN} = "bash"
FILES_${PN} = "${bindir}/xenguest-mkimage"
@@ -29,16 +29,17 @@ PACKAGES =+ "${PN}-kea-dhcp4"
# Bridge configurator needs to run before S01networking init script
# Prefix with a_ to make sure it is executed in runlevel 01 before others
# run start script before ifupdown and run stop script after ifupdown
INITSCRIPT_PACKAGES = "${PN} ${PN}-kea-dhcp4"
INITSCRIPT_NAME_${PN} = "a_xenguest-network-bridge"
INITSCRIPT_PARAMS_${PN} = "defaults 01"
INITSCRIPT_PARAMS_${PN} = "start 01 2 3 4 5 . stop 81 0 1 6 ."
# Kea configuration needs to be restored before kea init scripts:
# Kea dhcp4 server is 30, so lets use 20, to have higher priority
INITSCRIPT_NAME_${PN}-kea-dhcp4 = "kea-restore-default-config"
INITSCRIPT_PARAMS_${PN}-kea-dhcp4 = "defaults 20"
inherit update-rc.d
inherit allarch update-rc.d
do_install() {
cat ${WORKDIR}/xenguest-network-bridge.in \
@@ -1,5 +1,3 @@
define KFEATURE_DESCRIPTION "Common XEN (Host and Guest) configs and patches on autonomy systems"
kconf non-hardware xen-common.cfg
patch 0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch
@@ -5,5 +5,6 @@
define KFEATURE_DESCRIPTION "Enable netfilter + conn tracking + extras"
define KFEATURE_COMPATIBILITY all
include cfg/net/bridge.scc
include features/netfilter/netfilter.scc
kconf non-hardware netfilter-extra.cfg
@@ -33,3 +33,13 @@ KMACHINE_arm64-autonomy-guest = "arm64-autonomy-guest"
# Add Minimal Kernel Configs for Docker runtime
KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \
'docker', 'features/arm-autonomy/docker-minimal.scc', '', d)}"
python() {
from distutils.version import LooseVersion
kernelVersion = d.getVar('LINUX_VERSION')
if kernelVersion and LooseVersion(kernelVersion) < '5.10':
if oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"):
d.appendVar('SRC_URI', ' file://files/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch' )
}
@@ -1,32 +0,0 @@
#
# SPDX-License-Identifier: MIT
#
# The empty wic plugin is used to create unformatted empty partitions for wic
# images.
# To use it you must pass "empty" as argument for the "--source" parameter in
# the wks file. For example:
# part foo --source empty --ondisk sda --size="1024" --align 1024
import logging
from wic.pluginbase import SourcePlugin
logger = logging.getLogger('wic')
class EmptyPartitionPlugin(SourcePlugin):
"""
Populate unformatted empty partition.
"""
name = 'empty'
@classmethod
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
oe_builddir, bootimg_dir, kernel_dir,
rootfs_dir, native_sysroot):
"""
Called to do the actual content population for a partition i.e. it
'prepares' the partition to be incorporated into the image.
"""
return
+2 -2
View File
@@ -7,11 +7,11 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "meta-arm-bsp"
BBFILE_PATTERN_meta-arm-bsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-bsp = "6"
BBFILE_PRIORITY_meta-arm-bsp = "5"
LAYERSERIES_COMPAT_meta-arm-bsp = "gatesgarth"
LAYERDEPENDS_meta-arm-bsp = "core meta-arm meta-kernel"
LAYERDEPENDS_meta-arm-bsp = "core meta-arm"
# This won't be used by layerindex-fetch, but works everywhere else
LAYERDEPENDS_meta-arm-bsp_append_musca-b1 = " meta-python"
LAYERDEPENDS_meta-arm-bsp_append_musca-s1 = " meta-python"
-23
View File
@@ -1,23 +0,0 @@
# Configuration for Cortex-A5 DesignStart development board
#@TYPE: Machine
#@NAME: a5ds machine
#@DESCRIPTION: Machine configuration for Cortex-A5 DesignStart
require conf/machine/include/tune-cortexa5.inc
PREFERRED_PROVIDER_virtual/kernel ?= "linux-stable"
PREFERRED_VERSION_linux-stable ?= "5.3%"
KBUILD_DEFCONFIG = "multi_v7_defconfig"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
SERIAL_CONSOLES = "115200;ttyAMA0"
IMAGE_FSTYPES += "tar.bz2 cpio.gz"
# Cortex-a5 u-boot configuration
UBOOT_MACHINE = "designstart_ca5_defconfig"
UBOOT_IMAGE_ENTRYPOINT = "0x84000000"
UBOOT_IMAGE_LOADADDRESS = "0x84000000"
@@ -0,0 +1,32 @@
#@TYPE: Machine
#@NAME: Corstone-500 machine
#@DESCRIPTION: Machine configuration for the Corstone-500 platform
require conf/machine/include/tune-cortexa5.inc
#
# Corstone-500 is built against poky-tiny distro.
# poky-tiny sets PREFERRED_PROVIDER_virtual/kernel to linux-yocto-tiny.
# Since distro config is evaluated after the machine config, we need to
# use the strongest override possible (forcevariable) so the
# PREFERRED_PROVIDER_virtual/kernel specified in the machine config will
# apply.
#
PREFERRED_PROVIDER_virtual/kernel_forcevariable = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.3%"
KBUILD_DEFCONFIG = "multi_v7_defconfig"
KCONFIG_MODE = "--alldefconfig"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
SERIAL_CONSOLES = "115200;ttyAMA0"
IMAGE_FSTYPES += "tar.bz2 cpio.gz"
# Corstone-500 u-boot configuration
UBOOT_MACHINE = "designstart_ca5_defconfig"
UBOOT_IMAGE_ENTRYPOINT = "0x84000000"
UBOOT_IMAGE_LOADADDRESS = "0x84000000"
PREFERRED_VERSION_u-boot ?= "2020.07"
@@ -1,17 +0,0 @@
# Configuration for Armv8-A Foundation
#@TYPE: Machine
#@NAME: Armv8-A Foundation Platform machine
#@DESCRIPTION: Machine configuration for Armv8-A Foundation Platform model
require conf/machine/fvp-common.inc
require conf/machine/include/arm/arch-armv8a.inc
TUNE_FEATURES = "aarch64"
# FVP u-boot configuration
UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
KERNEL_IMAGETYPE = "Image"
KERNEL_DEVICETREE = "arm/foundation-v8-gicv3-psci.dtb"
@@ -9,8 +9,6 @@ require conf/machine/include/arm/arch-armv7a.inc
KERNEL_IMAGETYPE = "zImage"
PREFERRED_VERSION_trusted-firmware-a ?= "2.2%"
# FVP u-boot configuration
UBOOT_MACHINE = "vexpress_aemv8a_aarch32_defconfig"
+4 -1
View File
@@ -29,7 +29,10 @@ DISK_IMG_PARTITION3_CONTENT = ""
SERIAL_CONSOLES = "115200;ttyAMA0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
PREFERRED_VERSION_u-boot ?= "2020.10"
PREFERRED_VERSION_trusted-firmware-a ?= "2.4%"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
@@ -8,14 +8,13 @@ TFA_PLATFORM = "corstone700"
SERIAL_CONSOLES ?= "115200;ttyAMA0"
PREFERRED_PROVIDER_virtual/kernel_corstone700 = "linux-stable"
PREFERRED_VERSION_linux-stable ?= "5.6%"
PREFERRED_PROVIDER_virtual/kernel_corstone700 = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.6%"
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "scp-firmware"
PREFERRED_VERSION_control-processor-firmware ?= "2.6.0"
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "boot-firmware"
EXTRA_IMAGEDEPENDS += " \
virtual/trusted-firmware-a \
+2
View File
@@ -20,7 +20,9 @@ SERIAL_CONSOLES = "115200;ttyAMA0"
# Use kernel provided by yocto
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
PREFERRED_VERSION_scp-firmware ?= "2.6%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
PREFERRED_VERSION_u-boot ?= "2020.07"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot firmware-image-juno"
+4 -4
View File
@@ -4,9 +4,6 @@
#@NAME: Musca-B1 machine
#@DESCRIPTION: Machine configuration for Musca-B1
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-m"
PREFERRED_VERSION_trusted-firmware-m = "1.0"
DEFAULTTUNE ?= "armv8m-main"
require conf/machine/include/tune-cortexm33.inc
@@ -14,7 +11,8 @@ require conf/machine/include/tune-cortexm33.inc
TCLIBC = "newlib"
# For runqemu
require conf/machine/include/qemu.inc
IMAGE_FSTYPES += "ext4"
IMAGE_CLASSES += "qemuboot"
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine musca-b1"
QB_CPU = "-cpu cortex-m33"
@@ -25,3 +23,5 @@ QB_MEM = "512k"
ZEPHYR_BOARD = "v2m_musca_b1"
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
ARCH_musca-b1 = "arm"
TFM_PLATFORM = "MUSCA_B1"
+2 -3
View File
@@ -4,10 +4,9 @@
#@NAME: Musca-S1 machine
#@DESCRIPTION: Machine configuration for Musca-S1
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-m"
PREFERRED_VERSION_trusted-firmware-m = "1.0"
require conf/machine/include/tune-cortexm33.inc
# GLIBC will not work with Cortex-M.
TCLIBC = "newlib"
TFM_PLATFORM = "MUSCA_S1"
+8 -7
View File
@@ -8,7 +8,7 @@ require conf/machine/include/tune-neoversen1.inc
KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES += "wic tar.bz2 ext4"
IMAGE_FSTYPES += "wic wic.gz wic.bmap tar.bz2 ext4"
SERIAL_CONSOLES = "115200;ttyAMA0"
@@ -17,22 +17,23 @@ WKS_FILE ?= "n1sdp-efidisk.wks"
IMAGE_EFI_BOOT_FILES ?= "n1sdp-multi-chip.dtb n1sdp-single-chip.dtb"
WKS_FILE_DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}"
# Use kernel provided by linaro (Contains support for SCMi or HDMI)
PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-arm"
PREFERRED_VERSION_linux-linaro-arm ?= "5.4%"
# Use kernel provided by yocto
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
# RTL8168E Gigabit Ethernet Controller is attached to the PCIe interface
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-firmware-rtl8168"
# Trusted firmware v2.3 version
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.4%"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
EXTRA_IMAGEDEPENDS += "virtual/control-processor-firmware"
PREFERRED_VERSION_scp-firmware ?= "2.7%"
#UEFI EDK2 firmware
EXTRA_IMAGEDEPENDS += "virtual/uefi-firmware"
PREFERRED_VERSION_edk2-firmware ?= "201911%"
#grub-efi
EFI_PROVIDER ?= "grub-efi"
+5 -2
View File
@@ -16,10 +16,13 @@ EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
# Use kernel provided by linaro
KERNEL_IMAGETYPE ?= "Image"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-stable"
PREFERRED_VERSION_linux-stable ?= "5.7%"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.7%"
KCONFIG_MODE = "--alldefconfig"
SERIAL_CONSOLES = "115200;ttyAMA0"
PREFERRED_VERSION_edk2-firmware ?= "202011%"
#grub-efi
EFI_PROVIDER ?= "grub-efi"
MACHINE_FEATURES += "efi"
+22 -7
View File
@@ -10,19 +10,34 @@ require conf/machine/include/arm/arch-armv8a.inc
# Das U-boot
UBOOT_MACHINE ?= "total_compute_defconfig"
PREFERRED_VERSION_u-boot ?= "2020.10"
UBOOT_RD_LOADADDRESS = "0x88000000"
UBOOT_RD_ENTRYPOINT = "0x88000000"
UBOOT_LOADADDRESS = "0x80080000"
UBOOT_ENTRYPOINT = "0x80080000"
# Below options will generate a key to sign the kernel Image and INITRAMFS_IMAGE
# according to the default parameters of kernel-fitimage.bbclass. If the user
# would prefer to use their own keys, disable the key generation using the
# FIT_GENERATE_KEYS parameter and specify the location of the keys using the
# below paramters.
UBOOT_SIGN_ENABLE = "1"
UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb"
UBOOT_SIGN_KEYNAME = "dev_key"
UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}/keys"
FIT_GENERATE_KEYS = "1"
# Trusted firmware A v2.3
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.4%"
PREFERRED_VERSION_linux-arm64-ack ?= "5.4"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
# Cannot use the default zImage on arm64
KERNEL_IMAGETYPE = "Image"
KERNEL_BOOTCMD = "booti"
IMAGE_FSTYPES += "cpio.gz.u-boot"
KERNEL_IMAGETYPES += "fitImage"
KERNEL_CLASSES = " kernel-fitimage "
IMAGE_FSTYPES += "cpio.gz"
INITRAMFS_IMAGE ?= "core-image-minimal"
SERIAL_CONSOLES = "115200;ttyAMA0"
@@ -1,19 +1,19 @@
# Cortex-A5 DesignStart A5DS Platform Support in meta-arm-bsp
# Corstone-500 Platform Support in meta-arm-bsp
## Howto Build and Run
### Configuration:
In the local.conf file, MACHINE should be set as follow:
MACHINE ?= "a5ds"
DISTRO ?= "iota-tiny"
MACHINE ?= "corstone500"
DISTRO ?= "poky-tiny"
Or set environment variables with that values:
MACHINE "a5ds"
DISTRO "iota-tiny"
MACHINE "corstone500"
DISTRO "poky-tiny"
### Build:
``bash$ bitbake iota-tiny-image```
``bash$ bitbake arm-reference-image```
### Run:
To run the result in a Fixed Virtual Platform please get:
@@ -1,51 +0,0 @@
# Armv8-A Base Platform Support in meta-arm-bsp
## Howto Build and Run
### Configuration:
In the local.conf file, MACHINE should be set as follow:
MACHINE ?= "foundation-armv8"
### Build:
```bash$ bitbake core-image-minimal```
### Run:
To Run the Fixed Virtual Platform simulation tool you must download "Armv8-A
Foundation Platform" from Arm developer (This might require the user to
register) from this address:
https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms
and install it on your host PC.
Fast Models Fixed Virtual Platforms (FVP) Reference Guide:
https://developer.arm.com/docs/100966/latest
Armv8A Foundation Platform User Guide:
https://developer.arm.com/docs/100961/latest/
Once done, do the following to build and run an image:
```bash$ bitbake core-image-minimal```
```bash$ export YOCTO_DEPLOY_IMGS_DIR="<yocto-build-dir/tmp/deploy/images/foundation-v8>"```
```bash$ cd <path-to-Foundation_Platformpkg-dir/models/Linux64_GCC-X.X/>```
```
bash$ ./Foundation_Platform --cores=4 --no-sve --gicv3 \
--data=${YOCTO_DEPLOY_IMGS_DIR}/bl1-fvp.bin@0x0 \
--data=${YOCTO_DEPLOY_IMGS_DIR}/fip-fvp.bin@0x8000000 \
--data=${YOCTO_DEPLOY_IMGS_DIR}/Image@0x80080000 \
--data=${YOCTO_DEPLOY_IMGS_DIR}/foundation-v8-gicv3-psci.dtb@0x83000000 \
--block-device=${YOCTO_DEPLOY_IMGS_DIR}/core-image-minimal-foundation-armv8.disk.img
```
If you have built a configuration without a ramdisk, you can use the following
command in U-boot to start Linux:
```VExpress64# booti 0x80080000 - 0x83000000```
## Devices supported in the kernel
- serial
- virtio disk
- network
- watchdog
- rtc
## Devices not supported or not functional
None
+14
View File
@@ -1,5 +1,19 @@
# N1SDP Development Platform Support in meta-arm-bsp
## Overview
The N1SDP provides access to the Arm Neoverse N1 SoC. The N1SDP enables software development for key enterprise technology
and general Arm software development. The N1SDP consists of the N1 board containing the N1 SoC.
The N1 SoC contains two dual-core Arm Neoverse N1 processor clusters.
The system demonstrates Arm technology in the context of Cache-Coherent Interconnect for Accelerators (CCIX) protocol by:
- Running coherent traffic between the N1 SoC and an accelerator card.
- Coherent communication between two N1 SoCs.
- Enabling development of CCIX-enabled FPGA accelerators.
Further information on N1SDP can be found at
https://community.arm.com/developer/tools-software/oss-platforms/w/docs/458/neoverse-n1-sdp
## Configuration:
In the local.conf file, MACHINE should be set as follow:
MACHINE ?= "n1sdp"
+6 -3
View File
@@ -15,9 +15,12 @@ https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/tre
In the local.conf file, MACHINE should be set as follows:
MACHINE = "tc0"
To build the required binaries for tc0, run the commmand for the required image,
for e.g for core-image-minimal:
```bash$ bitbake core-image-minimal```
To build the required binaries for tc0, run the commmand:
```bash$ bitbake tc0-artifacts-image```
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building tc0-artifacts-image which depends
on trusted-firmware-a will build all the required binaries.
## Running
To run the produced binaries in a TC0 Fixed Virtual Platform please get
@@ -0,0 +1,61 @@
SUMMARY = "Boot Processor firmware for Corstone700"
DESCRIPTION = "Boot Processor firmware"
LICENSE = "BSD-3-Clause & Apache-2.0"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "gitsm://git.linaro.org/landing-teams/working/arm/boot-firmware.git;protocol=https"
SRCREV = "af7eeb1bb8c5a85a5e5a76d48acc6fe864d715a9"
PV = "2020.02.10+git${SRCPV}"
PROVIDES += "virtual/control-processor-firmware"
DEPENDS = "virtual/arm-none-eabi-gcc-native virtual/trusted-firmware-a"
inherit deploy
B = "${WORKDIR}/build"
S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(corstone700-*)"
SCP_PLATFORM = "corstone-700"
LDFLAGS[unexport] = "1"
do_configure[noexec] = "1"
EXTRA_OEMAKE = "PRODUCT='${SCP_PLATFORM}' \
BUILD_PATH=${B} \
CROSS_COMPILE='arm-none-eabi-' \
V=y \
"
do_compile() {
oe_runmake -C ${S}/tools/spitoc CC=${BUILD_CC} all
oe_runmake -C ${S}
}
do_compile[cleandirs] += "${B}"
do_install() {
install -D -p -m 0644 ${B}/product/${SCP_PLATFORM}/se_ramfw/release/bin/firmware.bin ${D}/firmware/se_ramfw.bin
install -D -p -m 0644 ${B}/product/${SCP_PLATFORM}/se_romfw/release/bin/firmware.bin ${D}/firmware/se_romfw.bin
${S}/tools/spitoc/spitoc \
--seram ${D}/firmware/se_ramfw.bin \
--offset 1 \
--fip ${RECIPE_SYSROOT}/firmware/fip.bin-${TFA_PLATFORM} \
--offset 33 \
--out ${D}/firmware/spitoc.bin
}
FILES_${PN} = "/firmware"
SYSROOT_DIRS += "/firmware"
# Skip QA check for relocations in .text of elf binaries
INSANE_SKIP_${PN} = "textrel"
do_deploy() {
# Copy the images to deploy directory
cp -rf ${D}/firmware/* ${DEPLOYDIR}/
}
addtask deploy after do_install
@@ -2,7 +2,7 @@ SUMMARY = "External system Cortex-M3 Firmware"
DESCRIPTION = "Firmware to be loaded and run in External System Harness in\
support to the main application CPU."
HOMEPAGE = "https://git.linaro.org/landing-teams/working/arm/external-system.git"
DEPENDS = "coreutils-native gcc-arm-none-eabi-native"
DEPENDS = "gcc-arm-none-eabi-native"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0"
@@ -0,0 +1,256 @@
From 7a8b0d634b23e77bb6c84f1b34c5cc031aa8c105 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 12 Apr 2021 10:08:29 +0100
Subject: [PATCH 1/3] Revert "FFA: Set and verify allocator of memory handle"
This reverts commit 917d2f2dc46b20625156e9067329e04c7fec587d.
Reverting this commit enables memory sharing between SPs
Upstream-Status: Inappropriate [will not be submitted as its only required for ACK 5.4]
---
inc/hf/arch/ffa_memory_handle.h | 25 ----------------
inc/vmapi/hf/ffa.h | 14 ++++-----
src/api.c | 4 +--
src/arch/aarch64/hypervisor/BUILD.gn | 1 -
.../aarch64/hypervisor/ffa_memory_handle.c | 29 -------------------
src/arch/fake/hypervisor/BUILD.gn | 1 -
src/arch/fake/hypervisor/ffa_memory_handle.c | 20 -------------
src/ffa_memory.c | 19 ++++--------
8 files changed, 14 insertions(+), 99 deletions(-)
delete mode 100644 inc/hf/arch/ffa_memory_handle.h
delete mode 100644 src/arch/aarch64/hypervisor/ffa_memory_handle.c
delete mode 100644 src/arch/fake/hypervisor/ffa_memory_handle.c
diff --git a/inc/hf/arch/ffa_memory_handle.h b/inc/hf/arch/ffa_memory_handle.h
deleted file mode 100644
index 9eba5d4..0000000
--- a/inc/hf/arch/ffa_memory_handle.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2021 The Hafnium Authors.
- *
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file or at
- * https://opensource.org/licenses/BSD-3-Clause.
- */
-
-#ifndef FFA_MEMORY_HANDLE_H
-#define FFA_MEMORY_HANDLE_H
-
-#include "hf/ffa.h"
-
-/**
- * Encodes memory handle according to section 5.10.2 of the FF-A v1.0 spec.
- */
-ffa_memory_handle_t ffa_memory_handle_make(uint64_t index);
-
-/**
- * Checks whether given handle was allocated by current world, according to
- * handle encoding rules.
- */
-bool ffa_memory_handle_allocated_by_current_world(ffa_memory_handle_t handle);
-
-#endif
diff --git a/inc/vmapi/hf/ffa.h b/inc/vmapi/hf/ffa.h
index a79f2eb..a948930 100644
--- a/inc/vmapi/hf/ffa.h
+++ b/inc/vmapi/hf/ffa.h
@@ -189,23 +189,21 @@ ATTR_FUNCTION_SET(memory_shareability, ffa_memory_attributes_t,
ATTR_FUNCTION_GET(memory_shareability, ffa_memory_attributes_t,
FFA_MEMORY_SHAREABILITY_OFFSET, FFA_MEMORY_SHAREABILITY_MASK)
-/**
- * A globally-unique ID assigned by the hypervisor for a region of memory being
- * sent between VMs.
- */
-typedef uint64_t ffa_memory_handle_t;
-
#define FFA_MEMORY_HANDLE_ALLOCATOR_MASK \
((ffa_memory_handle_t)(UINT64_C(1) << 63))
#define FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR \
((ffa_memory_handle_t)(UINT64_C(1) << 63))
-
-#define FFA_MEMORY_HANDLE_ALLOCATOR_SPMC (UINT64_C(0) << 63)
#define FFA_MEMORY_HANDLE_INVALID (~UINT64_C(0))
/** The ID of a VM. These are assigned sequentially starting with an offset. */
typedef uint16_t ffa_vm_id_t;
+/**
+ * A globally-unique ID assigned by the hypervisor for a region of memory being
+ * sent between VMs.
+ */
+typedef uint64_t ffa_memory_handle_t;
+
/**
* A count of VMs. This has the same range as the VM IDs but we give it a
* different name to make the different semantics clear.
diff --git a/src/api.c b/src/api.c
index fa5c9b7..16626b6 100644
--- a/src/api.c
+++ b/src/api.c
@@ -9,7 +9,6 @@
#include "hf/api.h"
#include "hf/arch/cpu.h"
-#include "hf/arch/ffa_memory_handle.h"
#include "hf/arch/mm.h"
#include "hf/arch/other_world.h"
#include "hf/arch/timer.h"
@@ -2158,7 +2157,8 @@ struct ffa_value api_ffa_mem_reclaim(ffa_memory_handle_t handle,
struct vm *to = current->vm;
struct ffa_value ret;
- if (ffa_memory_handle_allocated_by_current_world(handle)) {
+ if ((handle & FFA_MEMORY_HANDLE_ALLOCATOR_MASK) ==
+ FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR) {
struct vm_locked to_locked = vm_lock(to);
ret = ffa_memory_reclaim(to_locked, handle, flags,
diff --git a/src/arch/aarch64/hypervisor/BUILD.gn b/src/arch/aarch64/hypervisor/BUILD.gn
index 8f57598..0f9c15e 100644
--- a/src/arch/aarch64/hypervisor/BUILD.gn
+++ b/src/arch/aarch64/hypervisor/BUILD.gn
@@ -17,7 +17,6 @@ offset_size_header("offsets") {
source_set("other_world") {
public_configs = [ "//src/arch/aarch64:config" ]
sources = [
- "ffa_memory_handle.c",
"other_world.c",
]
deps = [
diff --git a/src/arch/aarch64/hypervisor/ffa_memory_handle.c b/src/arch/aarch64/hypervisor/ffa_memory_handle.c
deleted file mode 100644
index 647186d..0000000
--- a/src/arch/aarch64/hypervisor/ffa_memory_handle.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2021 The Hafnium Authors.
- *
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file or at
- * https://opensource.org/licenses/BSD-3-Clause.
- */
-
-#include "hf/arch/ffa_memory_handle.h"
-
-ffa_memory_handle_t ffa_memory_handle_make(uint64_t index)
-{
-#if SECURE_WORLD == 1
- return (index & ~FFA_MEMORY_HANDLE_ALLOCATOR_MASK) |
- FFA_MEMORY_HANDLE_ALLOCATOR_SPMC;
-#else
- return index | FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR;
-#endif
-}
-
-bool ffa_memory_handle_allocated_by_current_world(ffa_memory_handle_t handle)
-{
- return (handle & FFA_MEMORY_HANDLE_ALLOCATOR_MASK) ==
-#if SECURE_WORLD == 1
- FFA_MEMORY_HANDLE_ALLOCATOR_SPMC;
-#else
- FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR;
-#endif
-}
diff --git a/src/arch/fake/hypervisor/BUILD.gn b/src/arch/fake/hypervisor/BUILD.gn
index 8f28802..97a82f6 100644
--- a/src/arch/fake/hypervisor/BUILD.gn
+++ b/src/arch/fake/hypervisor/BUILD.gn
@@ -16,7 +16,6 @@ source_set("hypervisor") {
source_set("other_world") {
sources = [
- "ffa_memory_handle.c",
"other_world.c",
]
}
diff --git a/src/arch/fake/hypervisor/ffa_memory_handle.c b/src/arch/fake/hypervisor/ffa_memory_handle.c
deleted file mode 100644
index 9091295..0000000
--- a/src/arch/fake/hypervisor/ffa_memory_handle.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2021 The Hafnium Authors.
- *
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file or at
- * https://opensource.org/licenses/BSD-3-Clause.
- */
-
-#include "hf/arch/ffa_memory_handle.h"
-
-ffa_memory_handle_t ffa_memory_handle_make(uint64_t index)
-{
- return index;
-}
-
-bool ffa_memory_handle_allocated_by_current_world(ffa_memory_handle_t handle)
-{
- (void)handle;
- return true;
-}
diff --git a/src/ffa_memory.c b/src/ffa_memory.c
index 8b28191..00ec68c 100644
--- a/src/ffa_memory.c
+++ b/src/ffa_memory.c
@@ -8,7 +8,6 @@
#include "hf/ffa_memory.h"
-#include "hf/arch/ffa_memory_handle.h"
#include "hf/arch/other_world.h"
#include "hf/api.h"
@@ -121,14 +120,6 @@ static struct ffa_memory_share_state share_states[MAX_MEM_SHARES];
alignas(PAGE_SIZE) static uint8_t
tee_retrieve_buffer[HF_MAILBOX_SIZE * MAX_FRAGMENTS];
-/**
- * Extracts the index from a memory handle allocated by Hafnium's current world.
- */
-uint64_t ffa_memory_handle_get_index(ffa_memory_handle_t handle)
-{
- return handle & ~FFA_MEMORY_HANDLE_ALLOCATOR_MASK;
-}
-
/**
* Initialises the next available `struct ffa_memory_share_state` and sets
* `share_state_ret` to a pointer to it. If `handle` is
@@ -159,7 +150,8 @@ static bool allocate_share_state(
if (handle == FFA_MEMORY_HANDLE_INVALID) {
memory_region->handle =
- ffa_memory_handle_make(i);
+ i |
+ FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR;
} else {
memory_region->handle = handle;
}
@@ -213,7 +205,7 @@ static bool get_share_state(struct share_states_locked share_states,
struct ffa_memory_share_state **share_state_ret)
{
struct ffa_memory_share_state *share_state;
- uint64_t index;
+ uint32_t index;
CHECK(share_states.share_states != NULL);
CHECK(share_state_ret != NULL);
@@ -222,8 +214,9 @@ static bool get_share_state(struct share_states_locked share_states,
* First look for a share_state allocated by us, in which case the
* handle is based on the index.
*/
- if (ffa_memory_handle_allocated_by_current_world(handle)) {
- index = ffa_memory_handle_get_index(handle);
+ if ((handle & FFA_MEMORY_HANDLE_ALLOCATOR_MASK) ==
+ FFA_MEMORY_HANDLE_ALLOCATOR_HYPERVISOR) {
+ index = handle & ~FFA_MEMORY_HANDLE_ALLOCATOR_MASK;
if (index < MAX_MEM_SHARES) {
share_state = &share_states.share_states[index];
if (share_state->share_func != 0) {
--
2.29.2
@@ -0,0 +1,99 @@
From f080a6ae839b48188131648363c9e050f496f205 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 12 Apr 2021 10:22:26 +0100
Subject: [PATCH 3/3] FF-A: Fix to fetch proper vCPU index for UP SP
When switching the context between SPs, fetch the vCPU index using
api_vm_get_vcpu() helper routine. This routine gets the vCPU at index 0
for UP SP.
Rename function api_ffa_msg_send_direct_get_receiver_vcpu() to
api_vm_get_vcpu() as it is used both in direct message request
and response.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I45a60427f8c2d1b5058443536d972495728ee0c2
Upstream-Status: Pending [Not submitted to upstream yet]
---
src/api.c | 44 +++++++++++++++++++++-----------------------
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git a/src/api.c b/src/api.c
index 16626b6..4c8034e 100644
--- a/src/api.c
+++ b/src/api.c
@@ -63,6 +63,25 @@ void api_init(struct mpool *ppool)
mpool_init_from(&api_page_pool, ppool);
}
+/**
+ * Get target VM vCPU.
+ * If VM is UP then return first vCPU.
+ * If VM is MP then return vCPU whose index matches current CPU index.
+ */
+static struct vcpu *api_vm_get_vcpu(struct vm *vm, struct vcpu *current)
+{
+ ffa_vcpu_index_t current_cpu_index = cpu_index(current->cpu);
+ struct vcpu *vcpu = NULL;
+
+ if (vm->vcpu_count == 1) {
+ vcpu = vm_get_vcpu(vm, 0);
+ } else if (current_cpu_index < vm->vcpu_count) {
+ vcpu = vm_get_vcpu(vm, current_cpu_index);
+ }
+
+ return vcpu;
+}
+
/**
* Switches the physical CPU back to the corresponding vCPU of the VM whose ID
* is given as argument of the function.
@@ -80,7 +99,7 @@ static struct vcpu *api_switch_to_vm(struct vcpu *current,
ffa_vm_id_t to_id)
{
struct vm *to_vm = vm_find(to_id);
- struct vcpu *next = vm_get_vcpu(to_vm, cpu_index(current->cpu));
+ struct vcpu *next = api_vm_get_vcpu(to_vm, current);
CHECK(next != NULL);
@@ -1630,26 +1649,6 @@ struct ffa_value api_ffa_features(uint32_t function_id)
}
}
-/**
- * Get target VM vCPU for direct messaging request.
- * If VM is UP then return first vCPU.
- * If VM is MP then return vCPU whose index matches current CPU index.
- */
-static struct vcpu *api_ffa_msg_send_direct_get_receiver_vcpu(
- struct vm *vm, struct vcpu *current)
-{
- ffa_vcpu_index_t current_cpu_index = cpu_index(current->cpu);
- struct vcpu *vcpu = NULL;
-
- if (vm->vcpu_count == 1) {
- vcpu = vm_get_vcpu(vm, 0);
- } else if (current_cpu_index < vm->vcpu_count) {
- vcpu = vm_get_vcpu(vm, current_cpu_index);
- }
-
- return vcpu;
-}
-
/**
* FF-A specification states that x2/w2 Must Be Zero for direct messaging
* interfaces.
@@ -1733,8 +1732,7 @@ struct ffa_value api_ffa_msg_send_direct_req(ffa_vm_id_t sender_vm_id,
* number of PEs in the system. It further states that MP partitions
* accepting direct request messages cannot migrate.
*/
- receiver_vcpu =
- api_ffa_msg_send_direct_get_receiver_vcpu(receiver_vm, current);
+ receiver_vcpu = api_vm_get_vcpu(receiver_vm, current);
if (receiver_vcpu == NULL) {
return ffa_error(FFA_INVALID_PARAMETERS);
}
--
2.29.2
@@ -0,0 +1,32 @@
From fd177558a1da73fa7e10f8b2997864bb76d66dc8 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Thu, 15 Apr 2021 10:46:33 +0100
Subject: [PATCH] tc0: Add Theodul DSU support and GICR changes
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I4a9b7e4350410fdacccd8c12ff03a61b7e64e98b
Upstream-Status: Pending [Not submitted to upstream yet]
---
project/reference/BUILD.gn | 4 ++--
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/project/reference/BUILD.gn b/project/reference/BUILD.gn
index 5596009..ffcaab7 100644
--- a/project/reference/BUILD.gn
+++ b/project/reference/BUILD.gn
@@ -160,9 +160,9 @@ aarch64_toolchains("secure_tc0") {
iommu = "//src/iommu:absent"
gic_version = 3
gicd_base_address = "0x30000000"
- gicr_base_address = "0x30140000"
- heap_pages = 60
- max_cpus = 4
+ gicr_base_address = "0x30080000"
+ heap_pages = 80
+ max_cpus = 8
max_vms = 16
toolchain_args = {
plat_psci = "//src/arch/aarch64/plat/psci:spmc"
--
2.29.2
@@ -0,0 +1,19 @@
# TC0 specific configuration
# Intermediate SHA with 2.4 baseline version, required for OP-TEE SEL1 support
SRCREV = "2904b2c5361f06d35c324f37d2e71e3278d351a7"
PV = "2.4+git${SRCPV}"
FILESEXTRAPATHS_prepend_tc0 := "${THISDIR}/files/tc0:"
SRC_URI_append = " \
file://0001-Revert-FFA-Set-and-verify-allocator-of-memory-handle.patch \
file://0002-FF-A-Fix-to-fetch-proper-vCPU-index-for-UP-SP.patch \
file://0003-tc0-Theodul-GICR-changes.patch \
"
COMPATIBLE_MACHINE = "tc0"
HAFNIUM_PROJECT = "reference"
HAFNIUM_PLATFORM = "secure_tc0"
HAFNIUM_INSTALL_TARGET = "hafnium"
@@ -0,0 +1,6 @@
# Machine specific configurations
MACHINE_HAFNIUM_REQUIRE ?= ""
MACHINE_HAFNIUM_REQUIRE_tc0 = "hafnium-tc0.inc"
require ${MACHINE_HAFNIUM_REQUIRE}
@@ -18,9 +18,7 @@ FIRMWARE_DIR = "n1sdp-board-firmware_source"
PRIMARY_DIR = "${WORKDIR}/n1sdp-board-firmware_primary"
SECONDARY_DIR = "${WORKDIR}/n1sdp-board-firmware_secondary"
SOC_BINARIES_PRIMARY = "mcp_fw.bin scp_fw.bin ${SOC_BINARIES_SECONDARY}"
SOC_BINARIES_SECONDARY = "mcp_rom.bin scp_rom.bin"
SOC_BINARIES = "mcp_fw.bin scp_fw.bin mcp_rom.bin scp_rom.bin"
prepare_package() {
cd ${WORKDIR}
@@ -33,7 +31,7 @@ prepare_package() {
cp -v ${RECIPE_SYSROOT}/firmware/uefi.bin ${PRIMARY_DIR}/SOFTWARE/
# Copy SOC binaries
for f in ${SOC_BINARIES_PRIMARY}; do
for f in ${SOC_BINARIES}; do
cp -v ${RECIPE_SYSROOT}/firmware/${f} ${PRIMARY_DIR}/SOFTWARE/
done
@@ -49,7 +47,7 @@ prepare_package() {
mkdir -p ${SECONDARY_DIR}/SOFTWARE/
# Copy SOC binaries
for f in ${SOC_BINARIES_SECONDARY}; do
for f in ${SOC_BINARIES}; do
cp -v ${RECIPE_SYSROOT}/firmware/${f} ${SECONDARY_DIR}/SOFTWARE/
done
@@ -59,10 +57,8 @@ prepare_package() {
${SECONDARY_DIR}/MB/HBI0316A/io_v123f.txt
sed -i -e 's|.*SOCCON: 0x1170.*PLATFORM_CTRL.*|SOCCON: 0x1170 0x00000101 ;SoC SCC PLATFORM_CTRL|' \
${SECONDARY_DIR}/MB/HBI0316A/io_v123f.txt
sed -i -e '/^TOTALIMAGES:/ s|5|2|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
sed -i -e 's|^IMAGE[^23]|;&|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
sed -i -e 's|^IMAGE2|IMAGE0|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
sed -i -e 's|^IMAGE3|IMAGE1|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
sed -i -e '/^TOTALIMAGES:/ s|5|4|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
sed -i -e 's|^IMAGE4|;&|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
}
do_deploy() {
@@ -81,4 +77,4 @@ do_deploy() {
do_deploy[dirs] += "${PRIMARY_DIR} ${SECONDARY_DIR}"
do_deploy[cleandirs] += "${PRIMARY_DIR} ${SECONDARY_DIR}"
do_deploy[umask] = "022"
addtask deploy after do_populate_sysroot
addtask deploy after do_prepare_recipe_sysroot
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2020 Arm Limited
#
SUMMARY = "Total Compute Images"
DESCRIPTION = "Build all the images required for Total Compute platform"
LICENSE = "Apache-2.0"
inherit nopackages
# The last image to be built is trusted-firmware-a
DEPENDS += " trusted-firmware-a"
@@ -1,13 +1,9 @@
Upstream-Status: Inappropriate [will not be submitted as its only required till hardware gets fixed]
The patch is picked from git repo:
https://git.linaro.org/landing-teams/working/arm/n1sdp-pcie-quirk.git/tree/scp/0001-product-n1sdp-set-CCIX-speed-to-GEN3-to-work-with-in.patch
Upstream-Status: Backport
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
From a6d545cf9b6c46f2ea415d64fa81eb4771cfb51c Mon Sep 17 00:00:00 2001
From 3deb59c5f4c64aa092bb3a4ebc018acf3f746f47 Mon Sep 17 00:00:00 2001
From: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Date: Thu, 28 May 2020 16:19:12 +0530
Date: Tue, 10 Nov 2020 12:31:04 +0530
Subject: [PATCH] product/n1sdp: set CCIX speed to GEN3 to work with interposer
C2C setup
@@ -15,23 +11,22 @@ Set CCIX speed to GEN3 to work with interposer C2C setup
In this use case set downstream/upstream port transmitter
preset value to 4.
Change-Id: I16e72a5eaa105386a64ab4ffe56f67134c670313
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Change-Id: I635566574babbb7591b5bba97105f76f1f8e550a
---
.../module/n1sdp_pcie/src/mod_n1sdp_pcie.c | 33 +++++++++++++++----
1 file changed, 26 insertions(+), 7 deletions(-)
.../module/n1sdp_pcie/src/mod_n1sdp_pcie.c | 30 ++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c b/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c
index 19fa5a5..a93e6cc 100644
index 901e0464..ba02144f 100644
--- a/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c
+++ b/product/n1sdp/module/n1sdp_pcie/src/mod_n1sdp_pcie.c
@@ -206,7 +206,13 @@ static int n1sdp_pcie_phy_init(fwk_id_t id)
@@ -206,7 +206,12 @@ static int n1sdp_pcie_phy_init(fwk_id_t id)
if (dev_ctx == NULL)
return FWK_E_PARAM;
- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3;
+ if ((n1sdp_get_chipid() != 0x0) ||
+ !dev_ctx->config->ccix_capable ||
+ if ((n1sdp_get_chipid() != 0x0) || !dev_ctx->config->ccix_capable ||
+ pcie_ctx.c2c_api->is_slave_alive())
+ gen_speed = PCIE_GEN_3;
+ else
@@ -40,13 +35,12 @@ index 19fa5a5..a93e6cc 100644
lane_count = LAN_COUNT_IN_X_16;
FWK_LOG_INFO("[%s] Initializing PHY...", pcie_type[did]);
@@ -239,7 +245,13 @@ static int n1sdp_pcie_controller_init(fwk_id_t id, bool ep_mode)
@@ -239,7 +244,12 @@ static int n1sdp_pcie_controller_init(fwk_id_t id, bool ep_mode)
if (dev_ctx == NULL)
return FWK_E_PARAM;
- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3;
+ if ((n1sdp_get_chipid() != 0x0) ||
+ !dev_ctx->config->ccix_capable ||
+ if ((n1sdp_get_chipid() != 0x0) || !dev_ctx->config->ccix_capable ||
+ pcie_ctx.c2c_api->is_slave_alive())
+ gen_speed = PCIE_GEN_3;
+ else
@@ -55,13 +49,12 @@ index 19fa5a5..a93e6cc 100644
lane_count = LAN_COUNT_IN_X_16;
if (ep_mode) {
@@ -282,12 +294,19 @@ static int n1sdp_pcie_link_training(fwk_id_t id, bool ep_mode)
@@ -282,12 +292,18 @@ static int n1sdp_pcie_link_training(fwk_id_t id, bool ep_mode)
if (dev_ctx == NULL)
return FWK_E_PARAM;
- gen_speed = dev_ctx->config->ccix_capable ? PCIE_GEN_4 : PCIE_GEN_3;
+ if ((n1sdp_get_chipid() != 0x0) ||
+ !dev_ctx->config->ccix_capable ||
+ if ((n1sdp_get_chipid() != 0x0) || !dev_ctx->config->ccix_capable ||
+ pcie_ctx.c2c_api->is_slave_alive()) {
+ gen_speed = PCIE_GEN_3;
+ down_stream_tx_preset = PCIE_RC_TX_PRESET_VALUE;
@@ -81,5 +74,5 @@ index 19fa5a5..a93e6cc 100644
if (gen_speed >= PCIE_GEN_3 && !ep_mode) {
FWK_LOG_INFO(
--
2.25.0
2.25.1
@@ -0,0 +1,817 @@
From 6be977b3196b555cdee0758a380102264410f651 Mon Sep 17 00:00:00 2001
From: Usama Arif <usama.arif@arm.com>
Date: Sun, 31 Jan 2021 22:13:07 +0000
Subject: [PATCH 1/2] product/tc0: add clock and dvfs support for all cores.
This patch corrects the OPPs of cores 0-3 (klein cores)
and adds the right OPPs for matterhorn cores.
Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I1070d71c29ca2d06f9945708c135fa812b172003
Upstream-Status: Backport [https://github.com/ARM-software/SCP-firmware/commit/a550dd1042ecc1e6191ea2636b67d370ee865024]
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
---
product/tc0/include/clock_soc.h | 15 +++-
product/tc0/include/scp_soc_mmap.h | 4 +
product/tc0/include/tc0_timer.h | 3 +-
product/tc0/scp_ramfw/config_clock.c | 18 +++-
product/tc0/scp_ramfw/config_css_clock.c | 105 +++++++++++++++++++---
product/tc0/scp_ramfw/config_dvfs.c | 62 +++++++++++--
product/tc0/scp_ramfw/config_mock_psu.c | 16 +++-
product/tc0/scp_ramfw/config_pik_clock.c | 77 +++++++++++++---
product/tc0/scp_ramfw/config_psu.c | 11 ++-
product/tc0/scp_ramfw/config_scmi_perf.c | 1 +
product/tc0/scp_ramfw/config_system_pll.c | 19 +++-
product/tc0/scp_romfw/config_clock.c | 6 +-
product/tc0/scp_romfw/config_css_clock.c | 40 ++++-----
product/tc0/scp_romfw/config_pik_clock.c | 20 ++---
product/tc0/scp_romfw/config_system_pll.c | 6 +-
15 files changed, 327 insertions(+), 76 deletions(-)
diff --git a/product/tc0/include/clock_soc.h b/product/tc0/include/clock_soc.h
index 3e05bbab..2c2805c0 100644
--- a/product/tc0/include/clock_soc.h
+++ b/product/tc0/include/clock_soc.h
@@ -17,7 +17,8 @@
* PLL clock indexes.
*/
enum clock_pll_idx {
- CLOCK_PLL_IDX_CPU0,
+ CLOCK_PLL_IDX_CPU_KLEIN,
+ CLOCK_PLL_IDX_CPU_MATTERHORN,
CLOCK_PLL_IDX_SYS,
CLOCK_PLL_IDX_INTERCONNECT,
CLOCK_PLL_IDX_DPU,
@@ -30,11 +31,15 @@ enum clock_pll_idx {
* PIK clock indexes.
*/
enum clock_pik_idx {
+ CLOCK_PIK_IDX_INTERCONNECT,
CLOCK_PIK_IDX_CLUS0_CPU0,
CLOCK_PIK_IDX_CLUS0_CPU1,
CLOCK_PIK_IDX_CLUS0_CPU2,
CLOCK_PIK_IDX_CLUS0_CPU3,
- CLOCK_PIK_IDX_INTERCONNECT,
+ CLOCK_PIK_IDX_CLUS0_CPU4,
+ CLOCK_PIK_IDX_CLUS0_CPU5,
+ CLOCK_PIK_IDX_CLUS0_CPU6,
+ CLOCK_PIK_IDX_CLUS0_CPU7,
CLOCK_PIK_IDX_SCP,
CLOCK_PIK_IDX_GIC,
CLOCK_PIK_IDX_PCLKSCP,
@@ -48,7 +53,8 @@ enum clock_pik_idx {
* CSS clock indexes.
*/
enum clock_css_idx {
- CLOCK_CSS_IDX_CPU_GROUP0,
+ CLOCK_CSS_IDX_CPU_GROUP_KLEIN,
+ CLOCK_CSS_IDX_CPU_GROUP_MATTERHORN,
CLOCK_CSS_IDX_DPU,
CLOCK_CSS_IDX_COUNT
};
@@ -58,7 +64,8 @@ enum clock_css_idx {
*/
enum clock_idx {
CLOCK_IDX_INTERCONNECT,
- CLOCK_IDX_CPU_GROUP0,
+ CLOCK_IDX_CPU_GROUP_KLEIN,
+ CLOCK_IDX_CPU_GROUP_MATTERHORN,
CLOCK_IDX_DPU,
CLOCK_IDX_PIXEL_0,
CLOCK_IDX_PIXEL_1,
diff --git a/product/tc0/include/scp_soc_mmap.h b/product/tc0/include/scp_soc_mmap.h
index 14f8a8d5..774bbc29 100644
--- a/product/tc0/include/scp_soc_mmap.h
+++ b/product/tc0/include/scp_soc_mmap.h
@@ -22,5 +22,9 @@
#define SCP_PLL_CPU1 (SCP_PLL_BASE + 0x00000104)
#define SCP_PLL_CPU2 (SCP_PLL_BASE + 0x00000108)
#define SCP_PLL_CPU3 (SCP_PLL_BASE + 0x0000010C)
+#define SCP_PLL_CPU4 (SCP_PLL_BASE + 0x00000110)
+#define SCP_PLL_CPU5 (SCP_PLL_BASE + 0x00000114)
+#define SCP_PLL_CPU6 (SCP_PLL_BASE + 0x00000118)
+#define SCP_PLL_CPU7 (SCP_PLL_BASE + 0x0000011C)
#endif /* SCP_SOC_MMAP_H */
diff --git a/product/tc0/include/tc0_timer.h b/product/tc0/include/tc0_timer.h
index 03d6893c..6f4bf06c 100644
--- a/product/tc0/include/tc0_timer.h
+++ b/product/tc0/include/tc0_timer.h
@@ -9,7 +9,8 @@
#define CONFIG_TIMER_H
enum config_timer_refclk_sub_element_idx {
- CONFIG_TIMER_DVFS_CPU,
+ CONFIG_TIMER_DVFS_CPU_KLEIN,
+ CONFIG_TIMER_DVFS_CPU_MATTERHORN,
CONFIG_TIMER_SUB_ELEMENT_IDX_COUNT,
};
diff --git a/product/tc0/scp_ramfw/config_clock.c b/product/tc0/scp_ramfw/config_clock.c
index db545119..98863a01 100644
--- a/product/tc0/scp_ramfw/config_clock.c
+++ b/product/tc0/scp_ramfw/config_clock.c
@@ -32,13 +32,25 @@ static const struct fwk_element clock_dev_desc_table[] = {
MOD_PIK_CLOCK_API_TYPE_CLOCK),
}),
},
- [CLOCK_IDX_CPU_GROUP0] =
+ [CLOCK_IDX_CPU_GROUP_KLEIN] =
{
- .name = "CPU_GROUP0",
+ .name = "CPU_GROUP_KLEIN",
.data = &((struct mod_clock_dev_config){
.driver_id = FWK_ID_ELEMENT_INIT(
FWK_MODULE_IDX_CSS_CLOCK,
- CLOCK_CSS_IDX_CPU_GROUP0),
+ CLOCK_CSS_IDX_CPU_GROUP_KLEIN),
+ .api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_CSS_CLOCK,
+ MOD_CSS_CLOCK_API_TYPE_CLOCK),
+ }),
+ },
+ [CLOCK_IDX_CPU_GROUP_MATTERHORN] =
+ {
+ .name = "CPU_GROUP_MATTERHORN",
+ .data = &((struct mod_clock_dev_config){
+ .driver_id = FWK_ID_ELEMENT_INIT(
+ FWK_MODULE_IDX_CSS_CLOCK,
+ CLOCK_CSS_IDX_CPU_GROUP_MATTERHORN),
.api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_CSS_CLOCK,
MOD_CSS_CLOCK_API_TYPE_CLOCK),
diff --git a/product/tc0/scp_ramfw/config_css_clock.c b/product/tc0/scp_ramfw/config_css_clock.c
index 1ad285ae..14a23d63 100644
--- a/product/tc0/scp_ramfw/config_css_clock.c
+++ b/product/tc0/scp_ramfw/config_css_clock.c
@@ -17,7 +17,60 @@
#include <fwk_module.h>
#include <fwk_module_idx.h>
-static const struct mod_css_clock_rate rate_table_cpu_group[] = {
+static const struct mod_css_clock_rate rate_table_cpu_group_klein[] = {
+ {
+ /* Super Underdrive */
+ .rate = 768 * FWK_MHZ,
+ .pll_rate = 768 * FWK_MHZ,
+ .clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .clock_div = 1,
+ .clock_mod_numerator = 1,
+ .clock_mod_denominator = 1,
+ },
+ {
+ /* Underdrive */
+ .rate = 1153 * FWK_MHZ,
+ .pll_rate = 1153 * FWK_MHZ,
+ .clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .clock_div = 1,
+ .clock_mod_numerator = 1,
+ .clock_mod_denominator = 1,
+ },
+ {
+ /* Nominal */
+ .rate = 1537 * FWK_MHZ,
+ .pll_rate = 1537 * FWK_MHZ,
+ .clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .clock_div = 1,
+ .clock_mod_numerator = 1,
+ .clock_mod_denominator = 1,
+ },
+ {
+ /* Overdrive */
+ .rate = 1844 * FWK_MHZ,
+ .pll_rate = 1844 * FWK_MHZ,
+ .clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .clock_div = 1,
+ .clock_mod_numerator = 1,
+ .clock_mod_denominator = 1,
+ },
+ {
+ /* Super Overdrive */
+ .rate = 2152 * FWK_MHZ,
+ .pll_rate = 2152 * FWK_MHZ,
+ .clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .clock_div = 1,
+ .clock_mod_numerator = 1,
+ .clock_mod_denominator = 1,
+ },
+};
+
+static const struct mod_css_clock_rate rate_table_cpu_group_matterhorn[] = {
{
/* Super Underdrive */
.rate = 946 * FWK_MHZ,
@@ -70,39 +123,71 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
};
-static const fwk_id_t member_table_cpu_group_0[] = {
+static const fwk_id_t member_table_cpu_group_klein[] = {
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU0),
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU1),
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU2),
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU3),
};
+static const fwk_id_t member_table_cpu_group_matterhorn[] = {
+ FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU4),
+ FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU5),
+ FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU6),
+ FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU7),
+};
+
+
static const fwk_id_t member_table_dpu[] = {
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_DPU),
};
static const struct fwk_element css_clock_element_table[] = {
- [CLOCK_CSS_IDX_CPU_GROUP0] =
+ [CLOCK_CSS_IDX_CPU_GROUP_KLEIN] =
+ {
+ .name = "CPU_GROUP_KLEIN",
+ .data = &((struct mod_css_clock_dev_config){
+ .clock_type = MOD_CSS_CLOCK_TYPE_INDEXED,
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
+ .clock_switching_source =
+ MOD_PIK_CLOCK_CLUSCLK_SOURCE_SYSREFCLK,
+ .pll_id = FWK_ID_ELEMENT_INIT(
+ FWK_MODULE_IDX_SYSTEM_PLL,
+ CLOCK_PLL_IDX_CPU_KLEIN),
+ .pll_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_SYSTEM_PLL,
+ MOD_SYSTEM_PLL_API_TYPE_DEFAULT),
+ .member_table = member_table_cpu_group_klein,
+ .member_count = FWK_ARRAY_SIZE(member_table_cpu_group_klein),
+ .member_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_PIK_CLOCK,
+ MOD_PIK_CLOCK_API_TYPE_CSS),
+ .initial_rate = 1537 * FWK_MHZ,
+ .modulation_supported = true,
+ }),
+ },
+ [CLOCK_CSS_IDX_CPU_GROUP_MATTERHORN] =
{
- .name = "CPU_GROUP_0",
+ .name = "CPU_GROUP_MATTERHORN",
.data = &((struct mod_css_clock_dev_config){
.clock_type = MOD_CSS_CLOCK_TYPE_INDEXED,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_matterhorn,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_matterhorn),
.clock_switching_source =
MOD_PIK_CLOCK_CLUSCLK_SOURCE_SYSREFCLK,
.pll_id = FWK_ID_ELEMENT_INIT(
FWK_MODULE_IDX_SYSTEM_PLL,
- CLOCK_PLL_IDX_CPU0),
+ CLOCK_PLL_IDX_CPU_MATTERHORN),
.pll_api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_SYSTEM_PLL,
MOD_SYSTEM_PLL_API_TYPE_DEFAULT),
- .member_table = member_table_cpu_group_0,
- .member_count = FWK_ARRAY_SIZE(member_table_cpu_group_0),
+ .member_table = member_table_cpu_group_matterhorn,
+ .member_count = FWK_ARRAY_SIZE(member_table_cpu_group_matterhorn),
.member_api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_PIK_CLOCK,
MOD_PIK_CLOCK_API_TYPE_CSS),
- .initial_rate = 2271 * FWK_MHZ,
+ .initial_rate = 1893 * FWK_MHZ,
.modulation_supported = true,
}),
},
diff --git a/product/tc0/scp_ramfw/config_dvfs.c b/product/tc0/scp_ramfw/config_dvfs.c
index a0b59b2b..4b952ef8 100644
--- a/product/tc0/scp_ramfw/config_dvfs.c
+++ b/product/tc0/scp_ramfw/config_dvfs.c
@@ -16,7 +16,35 @@
#include <fwk_module.h>
#include <fwk_module_idx.h>
-static struct mod_dvfs_opp opps[] = { {
+static struct mod_dvfs_opp opps_klein[] = { {
+ .level = 768 * 1000000UL,
+ .frequency = 768 * FWK_KHZ,
+ .voltage = 550,
+ },
+ {
+ .level = 1153 * 1000000UL,
+ .frequency = 1153 * FWK_KHZ,
+ .voltage = 650,
+ },
+ {
+ .level = 1537 * 1000000UL,
+ .frequency = 1537 * FWK_KHZ,
+ .voltage = 750,
+ },
+ {
+ .level = 1844 * 1000000UL,
+ .frequency = 1844 * FWK_KHZ,
+ .voltage = 850,
+ },
+ {
+ .level = 2152 * 1000000UL,
+ .frequency = 2152 * FWK_KHZ,
+ .voltage = 950,
+ },
+ { 0 } };
+
+
+static struct mod_dvfs_opp opps_matterhorn[] = { {
.level = 946 * 1000000UL,
.frequency = 946 * FWK_KHZ,
.voltage = 550,
@@ -43,11 +71,26 @@ static struct mod_dvfs_opp opps[] = { {
},
{ 0 } };
-static const struct mod_dvfs_domain_config cpu_group = {
+static const struct mod_dvfs_domain_config cpu_group_klein = {
.psu_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PSU, 0),
- .clock_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_CPU_GROUP0),
+ .clock_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_CPU_GROUP_KLEIN),
+ .alarm_id =
+ FWK_ID_SUB_ELEMENT_INIT(FWK_MODULE_IDX_TIMER, 0, CONFIG_TIMER_DVFS_CPU_KLEIN),
+ .notification_id = FWK_ID_MODULE_INIT(FWK_MODULE_IDX_SCMI_PERF),
+ .updates_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_SCMI_PERF,
+ MOD_SCMI_PERF_DVFS_UPDATE_API),
+ .retry_ms = 1,
+ .latency = 1200,
+ .sustained_idx = 2,
+ .opps = opps_klein,
+};
+
+static const struct mod_dvfs_domain_config cpu_group_matterhorn = {
+ .psu_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PSU, 1),
+ .clock_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_CPU_GROUP_MATTERHORN),
.alarm_id =
- FWK_ID_SUB_ELEMENT_INIT(FWK_MODULE_IDX_TIMER, 0, CONFIG_TIMER_DVFS_CPU),
+ FWK_ID_SUB_ELEMENT_INIT(FWK_MODULE_IDX_TIMER, 0, CONFIG_TIMER_DVFS_CPU_MATTERHORN),
.notification_id = FWK_ID_MODULE_INIT(FWK_MODULE_IDX_SCMI_PERF),
.updates_api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_SCMI_PERF,
@@ -55,13 +98,18 @@ static const struct mod_dvfs_domain_config cpu_group = {
.retry_ms = 1,
.latency = 1200,
.sustained_idx = 2,
- .opps = opps,
+ .opps = opps_matterhorn,
};
static const struct fwk_element element_table[] = { [0] =
{
- .name = "CPU_GROUP",
- .data = &cpu_group,
+ .name = "CPU_GROUP_KLEIN",
+ .data = &cpu_group_klein,
+ },
+ [1] =
+ {
+ .name = "CPU_GROUP_MATTERHORN",
+ .data = &cpu_group_matterhorn,
},
{ 0 } };
diff --git a/product/tc0/scp_ramfw/config_mock_psu.c b/product/tc0/scp_ramfw/config_mock_psu.c
index 1f9411ca..2d3742f2 100644
--- a/product/tc0/scp_ramfw/config_mock_psu.c
+++ b/product/tc0/scp_ramfw/config_mock_psu.c
@@ -12,7 +12,21 @@
static const struct fwk_element element_table[] = {
{
- .name = "DVFS_GROUP0",
+ .name = "DVFS_GROUP_KLEIN",
+ .data =
+ &(const struct mod_mock_psu_element_cfg){
+ .async_alarm_id = FWK_ID_NONE_INIT,
+ .async_alarm_api_id = FWK_ID_NONE_INIT,
+
+ .async_response_id = FWK_ID_NONE_INIT,
+ .async_response_api_id = FWK_ID_NONE_INIT,
+
+ .default_enabled = true,
+ .default_voltage = 550,
+ },
+ },
+ {
+ .name = "DVFS_GROUP_MATTERHORN",
.data =
&(const struct mod_mock_psu_element_cfg){
.async_alarm_id = FWK_ID_NONE_INIT,
diff --git a/product/tc0/scp_ramfw/config_pik_clock.c b/product/tc0/scp_ramfw/config_pik_clock.c
index d2c03865..38837a91 100644
--- a/product/tc0/scp_ramfw/config_pik_clock.c
+++ b/product/tc0/scp_ramfw/config_pik_clock.c
@@ -21,9 +21,18 @@
/*
* Rate lookup tables
*/
-static struct mod_pik_clock_rate rate_table_cpu_group[] = {
+static struct mod_pik_clock_rate rate_table_cpu_group_klein[] = {
{
- .rate = 1750 * FWK_MHZ,
+ .rate = 1537 * FWK_MHZ,
+ .source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
+ .divider_reg = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
+ .divider = 1, /* Rate adjusted via CPU PLL */
+ },
+};
+
+static struct mod_pik_clock_rate rate_table_cpu_group_matterhorn[] = {
+ {
+ .rate = 1893 * FWK_MHZ,
.source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.divider_reg = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.divider = 1, /* Rate adjusted via CPU PLL */
@@ -103,8 +112,8 @@ static const struct fwk_element pik_clock_element_table[] = {
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU1] = {
@@ -115,8 +124,8 @@ static const struct fwk_element pik_clock_element_table[] = {
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU2] = {
@@ -127,8 +136,8 @@ static const struct fwk_element pik_clock_element_table[] = {
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU3] = {
@@ -139,8 +148,56 @@ static const struct fwk_element pik_clock_element_table[] = {
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
+ }),
+ },
+ [CLOCK_PIK_IDX_CLUS0_CPU4] = {
+ .name = "CLUS0_CPU4",
+ .data = &((struct mod_pik_clock_dev_config) {
+ .type = MOD_PIK_CLOCK_TYPE_CLUSTER,
+ .is_group_member = true,
+ .control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[4].CTRL,
+ .divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[4].DIV,
+ .modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[4].MOD,
+ .rate_table = rate_table_cpu_group_matterhorn,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_matterhorn),
+ }),
+ },
+ [CLOCK_PIK_IDX_CLUS0_CPU5] = {
+ .name = "CLUS0_CPU5",
+ .data = &((struct mod_pik_clock_dev_config) {
+ .type = MOD_PIK_CLOCK_TYPE_CLUSTER,
+ .is_group_member = true,
+ .control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[5].CTRL,
+ .divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[5].DIV,
+ .modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[5].MOD,
+ .rate_table = rate_table_cpu_group_matterhorn,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_matterhorn),
+ }),
+ },
+ [CLOCK_PIK_IDX_CLUS0_CPU6] = {
+ .name = "CLUS0_CPU6",
+ .data = &((struct mod_pik_clock_dev_config) {
+ .type = MOD_PIK_CLOCK_TYPE_CLUSTER,
+ .is_group_member = true,
+ .control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[6].CTRL,
+ .divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[6].DIV,
+ .modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[6].MOD,
+ .rate_table = rate_table_cpu_group_matterhorn,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_matterhorn),
+ }),
+ },
+ [CLOCK_PIK_IDX_CLUS0_CPU7] = {
+ .name = "CLUS0_CPU7",
+ .data = &((struct mod_pik_clock_dev_config) {
+ .type = MOD_PIK_CLOCK_TYPE_CLUSTER,
+ .is_group_member = true,
+ .control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[7].CTRL,
+ .divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[7].DIV,
+ .modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[7].MOD,
+ .rate_table = rate_table_cpu_group_matterhorn,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_matterhorn),
}),
},
[CLOCK_PIK_IDX_INTERCONNECT] = {
diff --git a/product/tc0/scp_ramfw/config_psu.c b/product/tc0/scp_ramfw/config_psu.c
index 8e3bcb5a..3bf0f7fd 100644
--- a/product/tc0/scp_ramfw/config_psu.c
+++ b/product/tc0/scp_ramfw/config_psu.c
@@ -14,7 +14,7 @@
static const struct fwk_element element_table[] = {
{
- .name = "DVFS_GROUP0",
+ .name = "DVFS_GROUP_KLEIN",
.data =
&(const struct mod_psu_element_cfg){
.driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, 0),
@@ -22,6 +22,15 @@ static const struct fwk_element element_table[] = {
FWK_MODULE_IDX_MOCK_PSU,
MOD_MOCK_PSU_API_IDX_DRIVER) },
},
+ {
+ .name = "DVFS_GROUP_MATTERHORN",
+ .data =
+ &(const struct mod_psu_element_cfg){
+ .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, 1),
+ .driver_api_id = FWK_ID_API_INIT(
+ FWK_MODULE_IDX_MOCK_PSU,
+ MOD_MOCK_PSU_API_IDX_DRIVER) },
+ },
{ 0 }
};
diff --git a/product/tc0/scp_ramfw/config_scmi_perf.c b/product/tc0/scp_ramfw/config_scmi_perf.c
index f2be2253..6ef6146b 100644
--- a/product/tc0/scp_ramfw/config_scmi_perf.c
+++ b/product/tc0/scp_ramfw/config_scmi_perf.c
@@ -15,6 +15,7 @@
static const struct mod_scmi_perf_domain_config domains[] = {
[0] = {},
+ [1] = {},
};
const struct fwk_module_config config_scmi_perf = {
diff --git a/product/tc0/scp_ramfw/config_system_pll.c b/product/tc0/scp_ramfw/config_system_pll.c
index b55dd642..37578855 100644
--- a/product/tc0/scp_ramfw/config_system_pll.c
+++ b/product/tc0/scp_ramfw/config_system_pll.c
@@ -18,14 +18,27 @@
static const struct fwk_element system_pll_element_table[] =
{
- [CLOCK_PLL_IDX_CPU0] =
+ [CLOCK_PLL_IDX_CPU_KLEIN] =
{
- .name = "CPU_PLL_0",
+ .name = "CPU_PLL_KLEIN",
.data = &((struct mod_system_pll_dev_config){
.control_reg = (void *)SCP_PLL_CPU0,
.status_reg = (void *)&SCP_PIK_PTR->PLL_STATUS[1],
.lock_flag_mask = PLL_STATUS_CPUPLLLOCK(0),
- .initial_rate = 1750 * FWK_MHZ,
+ .initial_rate = 1537 * FWK_MHZ,
+ .min_rate = MOD_SYSTEM_PLL_MIN_RATE,
+ .max_rate = MOD_SYSTEM_PLL_MAX_RATE,
+ .min_step = MOD_SYSTEM_PLL_MIN_INTERVAL,
+ }),
+ },
+ [CLOCK_PLL_IDX_CPU_MATTERHORN] =
+ {
+ .name = "CPU_PLL_MATTERHORN",
+ .data = &((struct mod_system_pll_dev_config){
+ .control_reg = (void *)SCP_PLL_CPU4,
+ .status_reg = (void *)&SCP_PIK_PTR->PLL_STATUS[1],
+ .lock_flag_mask = PLL_STATUS_CPUPLLLOCK(0),
+ .initial_rate = 1893 * FWK_MHZ,
.min_rate = MOD_SYSTEM_PLL_MIN_RATE,
.max_rate = MOD_SYSTEM_PLL_MAX_RATE,
.min_step = MOD_SYSTEM_PLL_MIN_INTERVAL,
diff --git a/product/tc0/scp_romfw/config_clock.c b/product/tc0/scp_romfw/config_clock.c
index f43b61b0..96806211 100644
--- a/product/tc0/scp_romfw/config_clock.c
+++ b/product/tc0/scp_romfw/config_clock.c
@@ -35,13 +35,13 @@ static const struct fwk_element clock_dev_desc_table[] = {
}),
},
- [CLOCK_IDX_CPU_GROUP0] =
+ [CLOCK_IDX_CPU_GROUP_KLEIN] =
{
- .name = "CPU_GROUP0",
+ .name = "CPU_GROUP_KLEIN",
.data = &((struct mod_clock_dev_config){
.driver_id = FWK_ID_ELEMENT_INIT(
FWK_MODULE_IDX_CSS_CLOCK,
- CLOCK_CSS_IDX_CPU_GROUP0),
+ CLOCK_CSS_IDX_CPU_GROUP_KLEIN),
.api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_CSS_CLOCK,
MOD_CSS_CLOCK_API_TYPE_CLOCK),
diff --git a/product/tc0/scp_romfw/config_css_clock.c b/product/tc0/scp_romfw/config_css_clock.c
index fcb9bbbb..ca284ee7 100644
--- a/product/tc0/scp_romfw/config_css_clock.c
+++ b/product/tc0/scp_romfw/config_css_clock.c
@@ -17,11 +17,11 @@
#include <fwk_module.h>
#include <fwk_module_idx.h>
-static const struct mod_css_clock_rate rate_table_cpu_group[] = {
+static const struct mod_css_clock_rate rate_table_cpu_group_klein[] = {
{
/* Super Underdrive */
- .rate = 946 * FWK_MHZ,
- .pll_rate = 946 * FWK_MHZ,
+ .rate = 768 * FWK_MHZ,
+ .pll_rate = 768 * FWK_MHZ,
.clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.clock_div = 1,
@@ -30,8 +30,8 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
{
/* Underdrive */
- .rate = 1419 * FWK_MHZ,
- .pll_rate = 1419 * FWK_MHZ,
+ .rate = 1153 * FWK_MHZ,
+ .pll_rate = 1153 * FWK_MHZ,
.clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.clock_div = 1,
@@ -40,8 +40,8 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
{
/* Nominal */
- .rate = 1893 * FWK_MHZ,
- .pll_rate = 1893 * FWK_MHZ,
+ .rate = 1537 * FWK_MHZ,
+ .pll_rate = 1537 * FWK_MHZ,
.clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.clock_div = 1,
@@ -50,8 +50,8 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
{
/* Overdrive */
- .rate = 2271 * FWK_MHZ,
- .pll_rate = 2271 * FWK_MHZ,
+ .rate = 1844 * FWK_MHZ,
+ .pll_rate = 1844 * FWK_MHZ,
.clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.clock_div = 1,
@@ -60,8 +60,8 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
{
/* Super Overdrive */
- .rate = 2650 * FWK_MHZ,
- .pll_rate = 2650 * FWK_MHZ,
+ .rate = 2152 * FWK_MHZ,
+ .pll_rate = 2152 * FWK_MHZ,
.clock_source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.clock_div_type = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.clock_div = 1,
@@ -70,7 +70,7 @@ static const struct mod_css_clock_rate rate_table_cpu_group[] = {
},
};
-static const fwk_id_t member_table_cpu_group_0[] = {
+static const fwk_id_t member_table_cpu_group_klein[] = {
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU0),
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU1),
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PIK_CLOCK, CLOCK_PIK_IDX_CLUS0_CPU2),
@@ -78,27 +78,27 @@ static const fwk_id_t member_table_cpu_group_0[] = {
};
static const struct fwk_element css_clock_element_table[] = {
- [CLOCK_CSS_IDX_CPU_GROUP0] =
+ [CLOCK_CSS_IDX_CPU_GROUP_KLEIN] =
{
- .name = "CPU_GROUP_0",
+ .name = "CPU_GROUP_KLEIN",
.data = &((struct mod_css_clock_dev_config){
.clock_type = MOD_CSS_CLOCK_TYPE_INDEXED,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
.clock_switching_source =
MOD_PIK_CLOCK_CLUSCLK_SOURCE_SYSREFCLK,
.pll_id = FWK_ID_ELEMENT_INIT(
FWK_MODULE_IDX_SYSTEM_PLL,
- CLOCK_PLL_IDX_CPU0),
+ CLOCK_PLL_IDX_CPU_KLEIN),
.pll_api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_SYSTEM_PLL,
MOD_SYSTEM_PLL_API_TYPE_DEFAULT),
- .member_table = member_table_cpu_group_0,
- .member_count = FWK_ARRAY_SIZE(member_table_cpu_group_0),
+ .member_table = member_table_cpu_group_klein,
+ .member_count = FWK_ARRAY_SIZE(member_table_cpu_group_klein),
.member_api_id = FWK_ID_API_INIT(
FWK_MODULE_IDX_PIK_CLOCK,
MOD_PIK_CLOCK_API_TYPE_CSS),
- .initial_rate = 2271 * FWK_MHZ,
+ .initial_rate = 1537 * FWK_MHZ,
.modulation_supported = true,
}),
},
diff --git a/product/tc0/scp_romfw/config_pik_clock.c b/product/tc0/scp_romfw/config_pik_clock.c
index ba7c3ddc..2c883084 100644
--- a/product/tc0/scp_romfw/config_pik_clock.c
+++ b/product/tc0/scp_romfw/config_pik_clock.c
@@ -19,9 +19,9 @@
/*
* Rate lookup tables
*/
-static struct mod_pik_clock_rate rate_table_cpu_group[] = {
+static struct mod_pik_clock_rate rate_table_cpu_group_klein[] = {
{
- .rate = 1750 * FWK_MHZ,
+ .rate = 1537 * FWK_MHZ,
.source = MOD_PIK_CLOCK_CLUSCLK_SOURCE_PLL0,
.divider_reg = MOD_PIK_CLOCK_MSCLOCK_DIVIDER_DIV_EXT,
.divider = 1, /* Rate adjusted via CPU PLL */
@@ -94,8 +94,8 @@ static const struct fwk_element
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[0].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU1] =
@@ -107,8 +107,8 @@ static const struct fwk_element
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[1].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU2] =
@@ -120,8 +120,8 @@ static const struct fwk_element
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[2].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_CLUS0_CPU3] =
@@ -133,8 +133,8 @@ static const struct fwk_element
.control_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].CTRL,
.divext_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].DIV,
.modulator_reg = &CLUSTER_PIK_PTR(0)->CORECLK[3].MOD,
- .rate_table = rate_table_cpu_group,
- .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group),
+ .rate_table = rate_table_cpu_group_klein,
+ .rate_count = FWK_ARRAY_SIZE(rate_table_cpu_group_klein),
}),
},
[CLOCK_PIK_IDX_INTERCONNECT] =
diff --git a/product/tc0/scp_romfw/config_system_pll.c b/product/tc0/scp_romfw/config_system_pll.c
index e6b578ff..8440f126 100644
--- a/product/tc0/scp_romfw/config_system_pll.c
+++ b/product/tc0/scp_romfw/config_system_pll.c
@@ -17,14 +17,14 @@
#include <fwk_module.h>
static const struct fwk_element system_pll_element_table[] = {
- [CLOCK_PLL_IDX_CPU0] =
+ [CLOCK_PLL_IDX_CPU_KLEIN] =
{
- .name = "CPU_PLL_0",
+ .name = "CPU_PLL_KLEIN",
.data = &((struct mod_system_pll_dev_config){
.control_reg = (void *)SCP_PLL_CPU0,
.status_reg = (void *)&SCP_PIK_PTR->PLL_STATUS[1],
.lock_flag_mask = PLL_STATUS_CPUPLLLOCK(0),
- .initial_rate = 1750 * FWK_MHZ,
+ .initial_rate = 1537 * FWK_MHZ,
.min_rate = MOD_SYSTEM_PLL_MIN_RATE,
.max_rate = MOD_SYSTEM_PLL_MAX_RATE,
.min_step = MOD_SYSTEM_PLL_MIN_INTERVAL,
--
2.29.2

Some files were not shown because too many files have changed in this diff Show More