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

Compare commits

..

34 Commits

Author SHA1 Message Date
Nathan Dunne e219ef606e arm-autonomy/u-boot: Modified kernel_addr for fvp-base with xen
Modified the default booti command for fvp-base with xen to boot
into xen at 0x84000000, rather than requiring the user to break
into the u-boot prompt.

Issue-Id: SCM-2195
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I91f324ce77716474596a78f97e74f432969d9803
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-25 09:32:52 -04:00
Richard Neill fc4b2f8907 arm-autonomy/linux-arm-autonomy: Drop XenStore initialisation patch
With the linux-yocto version upgrade, the xenstore initialisation patch is no
longer necessary.

Issue-Id: SCM-2263
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I293a5f81b48c57f3af1c99606af776537f35f0bb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-15 22:59:44 -04:00
Richard Neill d8074cb6a0 arm-autonomy/xen: remove patches that have been mainlined in xen 4.14.1
Remove the 4 patches from recipes-extended/xen/xen_4.14.bbappend that
have been integrated in xen 4.14.1

Issue-Id: SCM-2133
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: If38262d17699794eb600b11e131c168ed4de4391
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-08 09:12:15 -05:00
Richard Neill 48720822d6 arm-autonomy: Add meta-networking dependency to autonomy layer config
meta-arm-autonomy requires the bridge-utils package, which is provided by the
meta-openembedded/meta-networking layer. This patch adds the explicit
dependency.

Issue-Id: SCM-2166
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: If2a79755ac1f16fafa994e16ac980a37999692db
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:22 -05:00
Ross Burton 7336830dab kas: update meta-clang to use the gatesgarth branch
When the CI was written there wasn't a gatesgarth branch, but there is now
and it is needed as master meta-clang doesn't work with gatesgarth oe-core.

Change-Id: Ief06b6c5be11dd7fc77520f5601b662bdca52891
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:11 -05:00
Ross Burton 332410055a arm/opencsd: backport patch to fix build race
Change-Id: I46ea9cfa5e149db000740b4a2c6730ced99340ef
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:11 -05:00
Richard Neill 7c3a55f8ff arm-autonomy/linux-arm-autonomy: Add Xen per-cpu address translation patch
Adds a kernel patch to avoid Xen guest initialisation failure when converting a
virtual address to a frame number when the initial address space has a
non-contiguous physical layout.

The patch is mainlined for kernel versions >= 5.9, so we only apply it for
earlier versions.

Issue-Id: SCM-1910
Change-Id: Icf84535718779f91eb668d178a118c96e05f54de
Signed-off-by: Richard Neill <richard.neill@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-03 15:10:06 -05:00
Ross Burton ac9f59ca62 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-02-22 11:48:30 +00:00
Ross Burton fb196bacd6 kas: meta-kernel is no longer needed
Change-Id: I36d34828fe34c02c15afdf92330ec9a95a93c170
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-22 11:47:52 +00:00
Diego Sueiro 6e3e29857c arm-autonomy: Fix xenbus probe for guest kernels < 5.4.99
The arm64-autonomy-guest kernel from commit a09d4e7acdbf ("xen: Fix event
channel callback via INTX/GSI") are hanging at `hw-breakpoint: found 6
breakpoint and 4 watchpoint registers.`.
The arm-autonomy-guest kernels older than 5.4.99 need to backport the
0001-arm-xen-Don-t-probe-xenbus-as-part-of-an-early-initc.patch in order
to be able to boot.

Issue-Id: SCM-2151
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I56c558f518336567eadd5dc69fd9334c23b19cd8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Diego Sueiro d235d4b53e arm-autonomy: Fix XenStore initialisation for host kernels < 5.4.95
The arm-autonomy-host kernels older than 5.4.95 need to backport the
0001-xen-Fix-XenStore-initialisation-for-XS_LOCAL.patch in order to be able to
use the `xl block-attach` and fix this issue:
```
xl block-attach 0 "phy:/dev/vg-xen-vda3/base" xvda w
libxl: error: libxl_xshelp.c:201:libxl__xs_read_mandatory: xenstore read failed: `/libxl/0/type': No such file or directory
libxl: warning: libxl_dom.c:52:libxl__domain_type: unable to get domain type for domid=0, assuming HVM
libxl: error: libxl_disk.c:314:device_disk_add: device already exists in xenstore
libxl: error: libxl_device.c:1407:device_addrm_aocomplete: unable to add device
```

This issue is not present in linux-linaro-arm[-rt] 5.4.0 used by N1SDP, hence
we do not apply this patch for it.

Issue-Id: SCM-2151
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Iea22c54e86db17952662faf75cae94d0ef18d4f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Diego Sueiro 5207074884 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.

Issue-Id: SCM-2033
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I6bccc0c75d931d8046260c61afb53395bb9d2d1b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Jon Mason 7185d29de9 arm-toolchain: Fix potential runtime crash
GCCv9 tree vectorization code is faulty and can cause random crashes at
runtime (when using -O3).  Add the backported patch to address this
issue.

Change-Id: If7bb0ba0720bab42e7d34f3679d988934f657392
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-16 09:45:48 -05:00
Nathan Dunne 932d35bab0 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-25 11:11:22 -05:00
Kamil Dziezyk d12eadacd0 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>
2021-01-08 10:15:06 -05:00
Kamil Dziezyk e45752aa6f 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>
2021-01-08 10:15:06 -05:00
Kamil Dziezyk a365b3bd7e 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>
2021-01-08 10:15:06 -05:00
Nathan Dunne 7b82307c0a 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>
2021-01-08 10:15:06 -05:00
Jon Mason a72b89ccd1 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:00:43 -05:00
Ross Burton 1cd14b33c1 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-17 12:40:07 +00:00
Ross Burton 27ed22b040 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-17 12:40:05 +00:00
Ross Burton b97016fcfa 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>
2020-12-17 12:40:03 +00:00
Ross Burton eff9e62526 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>
2020-12-17 12:39:55 +00:00
Jon Mason 892c9686bf 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>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-17 12:39:55 +00:00
Ross Burton e8cc03775e 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-11 09:12:58 -05:00
Kamil Dziezyk 4cae9fe87b 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-09 15:55:34 -05:00
Ross Burton 784ef62cc4 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:51:41 +00:00
Ross Burton 1a0a9700f2 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 17:48:17 +00:00
Khasim Mohammed ba30bf591e 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 16:06:33 +00:00
Khasim Syed Mohammed 0c59d1cf42 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 16:06:31 +00:00
Kamil Dziezyk 289982e1cb 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: Ross Burton <ross.burton@arm.com>
2020-11-25 12:50:03 +00:00
Kamil Dziezyk 44e51aa5be 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-25 12:49:34 +00:00
Khasim Mohammed b8bb75b4d3 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-19 08:48:44 -05:00
Kamil Dziezyk 0057143f4b 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-19 08:48:17 -05:00
344 changed files with 6811 additions and 30324 deletions
+4 -15
View File
@@ -52,7 +52,7 @@ machine-coverage:
# Second phase, the actual build jobs
#
corstone500:
a5ds:
extends: .build
corstone700-fvp:
@@ -61,15 +61,15 @@ corstone700-fvp:
corstone700-mps3:
extends: .build
foundation-armv8:
extends: .build
fvp-base:
extends: .build
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gcc-arm32:
extends: .build
gem5-arm64:
extends: .build
@@ -88,9 +88,6 @@ musca-s1:
n1sdp:
extends: .build
n1sdp/armgcc:
extends: .build
qemuarm64-secureboot:
extends: .build
@@ -129,11 +126,3 @@ prune-sstate:
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/*
+1 -1
View File
@@ -3,4 +3,4 @@ header:
includes:
- base.yml
machine: corstone500
machine: a5ds
-6
View File
@@ -1,6 +0,0 @@
header:
version: 9
local_conf_header:
cc: |
GCCVERSION = "arm-10.2"
+1 -1
View File
@@ -5,7 +5,7 @@ distro: poky
defaults:
repos:
refspec: master
refspec: gatesgarth
repos:
meta-arm:
+1
View File
@@ -4,6 +4,7 @@ header:
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
refspec: gatesgarth
local_conf_header:
clang: |
-8
View File
@@ -1,8 +0,0 @@
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: foundation-armv8
@@ -1,26 +0,0 @@
# 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,17 +43,14 @@ 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 MB or GB(default), e.g 1000M or 1[G]
# - fs is optional filesystem to use for the partition
# - sz is the partition size in Gigabit
# - fs is the 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
#
@@ -132,27 +129,21 @@ xenguest_image_create() {
# create disk if needed
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
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
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
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
+2 -1
View File
@@ -9,11 +9,12 @@ BBFILES += " \
BBFILE_COLLECTIONS += "meta-arm-autonomy"
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-autonomy = "5"
BBFILE_PRIORITY_meta-arm-autonomy = "6"
LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
openembedded-layer \
networking-layer \
virtualization-layer \
"
LAYERSERIES_COMPAT_meta-arm-autonomy = "gatesgarth"
@@ -11,7 +11,7 @@ KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES += "tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
DISTRO_FEATURES += "arm-autonomy-guest"
@@ -29,7 +29,7 @@ First you must download the Yocto layers needed:
- 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 gatesgarth using `git checkout gatesgarth`).
you want to use (for example zeus using `git checkout zeus`).
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
in order to have the required dependencies.
@@ -119,6 +119,10 @@ To boot the system using an u-boot base board you will need to:
In this example the addresses might need to be adapted depending on your board.
For arm-autonomy host on FVP-Base u-boot has been modified such that
`booti 0x84000000 - 0x83000000` is the default boot command. If FVP-Base is your
MACHINE target there should be no need to interfere with u-boot.
Guest project
-------------
The guest projects are not target specific and will use a Yocto MACHINE defined
@@ -11,17 +11,12 @@ 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. 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
2. 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, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
GRUB_CFG_FILE variables).
GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
3. 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,10 +70,7 @@ 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,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
This variable is set by default to "1024M".
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
booting it.
@@ -87,8 +84,7 @@ 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", and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
This variable is set by default to "0x80080000".
- 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
@@ -96,8 +92,7 @@ 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" and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
This variable is set by default to "0x01000000".
- 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 [-v(v)] OPERATION [OPTIONS]`
`xenguest-manager 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,9 +37,6 @@ 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`
@@ -68,13 +65,6 @@ 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
------------
@@ -90,7 +80,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
@@ -99,31 +89,12 @@ and variables from the parent file's scope, including:
- ${guestcfgfile} : The name of the config file for the starting guest
- 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.
- ${LOGFILE} : The file to append any logging to, e.g.
echo "Hello, World" >> ${LOGFILE}
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,19 +58,12 @@ 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 MB or GB(default),
e.g. 1000M or 4[G]
- `DISK_SIZE=X`: size of the disk to create in GB
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
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'.
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.
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
@@ -112,12 +105,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 MB or GB(default),
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
--disk-size=SIZE: set the guest disk size to SIZE in GB. 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 MB or GB(default), e.g 1000M or 2[G].
- SIZE: partition size in GB.
- 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
@@ -14,19 +14,8 @@ 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
#
# 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)}"
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
# the "/" partition is /dev/sda2.
@@ -49,42 +38,3 @@ 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 ''}"
@@ -1,7 +0,0 @@
# 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
@@ -1,3 +0,0 @@
define KFEATURE_DESCRIPTION "Extra kernel configs when building with PREEMPT_RT"
kconf non-hardware preempt-rt-extras.cfg
@@ -1,80 +0,0 @@
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
@@ -1,7 +0,0 @@
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"
@@ -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 --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
# Second rootfs partition normally populated as /dev/sda2
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
@@ -1,28 +0,0 @@
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,16 @@
Upstream Status: Inappropriate [meta-arm-autonomy specifc u-boot config]
Signed-off-by: Nathan Dunne <nathan.dunne@arm.com>
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index e63c335f85..9ee050a4a6 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -162,7 +162,7 @@
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_name=Image\0" \
- "kernel_addr=0x80080000\0" \
+ "kernel_addr=0x84000000\0" \
"initrd_name=ramdisk.img\0" \
"initrd_addr=0x88000000\0" \
"fdtfile=devtree.dtb\0" \
@@ -0,0 +1,9 @@
# Machine specific u-boot
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
#
# FVP BASE
#
SRC_URI_append_fvp-base = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ' file://xen_u-boot_kernel_addr.patch', '', d)}"
@@ -1,39 +0,0 @@
#!/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 $?
@@ -1,79 +0,0 @@
#
# 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"
@@ -1 +0,0 @@
CONFIG_FEATURE_TAR_LONG_OPTIONS=y
@@ -1,4 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# The --exclude flag in Busybox tar is required by xenguest-mkimage
SRC_URI += "file://feature_tar_long_options.cfg"
@@ -2,11 +2,7 @@
DESCRIPTION = "Arm Autonomy stack host minimal 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
inherit core-image
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
@@ -14,21 +10,12 @@ 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[;params]
# format: URL[;guestname=NAME]
# - URL can be the full path to a file or a Yocto compatible SRC_URI url
# - 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.
#
# - 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.
# Here are examples of values:
# /home/mydir/myguest.xenguest;guestname=guest1;guestcount=3
# /home/mydir/myguest.xenguest;guestname=guest1
# http://www.url.com/testguest.xenguest
#
# If you are using the output of an other Yocto project, you should use the
@@ -80,14 +67,13 @@ DO_IMAGE_MCDEPENDS := "${@ '${MC_DOIMAGE_MCDEPENDS}' if d.getVar('BBMULTICONFIG'
# 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+);?")
if bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'arm-autonomy-host'")
if bb.utils.contains('DISTRO_FEATURES', 'xen', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'xen'")
# Check in ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS for extra guests and add them
# to SRC_URI with xenguest parameter if not set
@@ -97,19 +83,16 @@ python __anonymous() {
# If the user just specified a file instead of file://FILE, add
# the file:// prefix
if guest.startswith('/'):
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)
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
# in case we have a link we need the destination
guestfile = os.path.realpath(guestfile)
@@ -118,7 +101,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 + ';guestcount=' + guestcount)
d.appendVar('SRC_URI', ' file://' + guestfile + ';guestname=' + guestname)
else:
# we have a Yocto URL
try:
@@ -154,15 +137,8 @@ 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; "
@@ -19,7 +19,7 @@ DESCRIPTION = "Add entries in DTB for Xen and Dom0"
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,max:1024M"
XEN_DEVICETREE_DOM0_MEM ?= "1024M"
XEN_DEVICETREE_DOM0_BOOTARGS ?= "console=hvc0 earlycon=xen"
XEN_DEVICETREE_DOM0_ADDR ?= "0x80080000"
XEN_DEVICETREE_DOM0_SIZE ?= "0x01000000"
@@ -30,36 +30,11 @@ 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"
@@ -113,18 +88,14 @@ python calc_xen_dtb_dom0_size() {
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)
size_defined = int(d.getVar('XEN_DEVICETREE_DOM0_SIZE'), 16)
if size_required > size_defined:
bb.note ("Wrong kernel size setting inside xen dtb!\n"\
bb.warn ("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 "\
bb.warn ("Overriding XEN_DEVICETREE_DOM0_SIZE with "\
"%(req)d (%(req)#010X)" % {"req": size_required})
d.setVar('XEN_DEVICETREE_DOM0_SIZE', hex(size_required))
}
@@ -1,40 +0,0 @@
From 3b418b33265402aab0cb1bf2b745a25724bae2d8 Mon Sep 17 00:00:00 2001
Message-Id: <3b418b33265402aab0cb1bf2b745a25724bae2d8.1602684880.git.diego.sueiro@arm.com>
From: Bertrand Marquis <bertrand.marquis@arm.com>
Date: Tue, 18 Aug 2020 14:47:38 +0100
Subject: [PATCH] arm: Add Neoverse N1 processor identification
Add MIDR and CPU part numbers for Neoverse N1
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
xen/include/asm-arm/processor.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index aa642e3..3ca67f8 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -58,6 +58,7 @@
#define ARM_CPU_PART_CORTEX_A73 0xD09
#define ARM_CPU_PART_CORTEX_A75 0xD0A
#define ARM_CPU_PART_CORTEX_A76 0xD0B
+#define ARM_CPU_PART_NEOVERSE_N1 0xD0C
#define MIDR_CORTEX_A12 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A12)
#define MIDR_CORTEX_A17 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A17)
@@ -68,6 +69,7 @@
#define MIDR_CORTEX_A73 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A73)
#define MIDR_CORTEX_A75 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A75)
#define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
+#define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1)
/* MPIDR Multiprocessor Affinity Register */
#define _MPIDR_UP (30)
--
2.7.4
@@ -1,42 +0,0 @@
From 858c0be8c2fa4125a0fa0acaa03ae730e5c7cb3c Mon Sep 17 00:00:00 2001
Message-Id: <858c0be8c2fa4125a0fa0acaa03ae730e5c7cb3c.1602684183.git.diego.sueiro@arm.com>
From: Bertrand Marquis <bertrand.marquis@arm.com>
Date: Tue, 18 Aug 2020 14:47:39 +0100
Subject: [PATCH] xen/arm: Enable CPU Erratum 1165522 for Neoverse
Enable CPU erratum of Speculative AT on the Neoverse N1 processor
versions r0p0 to r2p0.
Also Fix Cortex A76 Erratum string which had a wrong errata number.
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
xen/arch/arm/cpuerrata.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 0248893..6c09017 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -477,8 +477,14 @@ static const struct arm_cpu_capabilities arm_errata[] = {
},
#endif
{
+ /* Neoverse r0p0 - r2p0 */
+ .desc = "ARM erratum 1165522",
+ .capability = ARM64_WORKAROUND_AT_SPECULATE,
+ MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 2 << MIDR_VARIANT_SHIFT),
+ },
+ {
/* Cortex-A76 r0p0 - r2p0 */
- .desc = "ARM erratum 116522",
+ .desc = "ARM erratum 1165522",
.capability = ARM64_WORKAROUND_AT_SPECULATE,
MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
},
--
2.7.4
@@ -1,35 +0,0 @@
From 1814a626fb5811184eda64fe22f0055df4600211 Mon Sep 17 00:00:00 2001
Message-Id: <1814a626fb5811184eda64fe22f0055df4600211.1602684203.git.diego.sueiro@arm.com>
From: Julien Grall <jgrall@amazon.com>
Date: Tue, 25 Aug 2020 18:38:10 +0100
Subject: [PATCH] xen/arm: Update silicon-errata.txt with the Neovers AT
erratum
Commit 858c0be8c2fa "xen/arm: Enable CPU Erratum 1165522 for Neoverse"
added a new erratum but forgot to update silicon-errata.txt.
Update the file accordingly to keep track of errata workaround in Xen.
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
docs/misc/arm/silicon-errata.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/misc/arm/silicon-errata.txt b/docs/misc/arm/silicon-errata.txt
index 11e5a9d..e15d092 100644
--- a/docs/misc/arm/silicon-errata.txt
+++ b/docs/misc/arm/silicon-errata.txt
@@ -51,4 +51,5 @@ stable hypervisors.
| ARM | Cortex-A57 | #1319537 | N/A |
| ARM | Cortex-A72 | #1319367 | N/A |
| ARM | Cortex-A76 | #1165522 | N/A |
+| ARM | Neoverse-N1 | #1165522 | N/A
| ARM | MMU-500 | #842869 | N/A |
--
2.7.4
@@ -1,51 +0,0 @@
From 968bb86d04913f52d7678a842474f2a674a8b23e Mon Sep 17 00:00:00 2001
Message-Id: <968bb86d04913f52d7678a842474f2a674a8b23e.1602683678.git.diego.sueiro@arm.com>
From: Wei Chen <wei.chen@arm.com>
Date: Fri, 28 Aug 2020 02:34:03 +0000
Subject: [PATCH] xen/arm: Missing N1/A76/A75 FP registers in vCPU context
switch
Xen has cpu_has_fp/cpu_has_simd to detect whether the CPU supports
FP/SIMD or not. But currently, these two MACROs only consider value 0
of ID_AA64PFR0_EL1.FP/SIMD as FP/SIMD features enabled. But for CPUs
that support FP/SIMD and half-precision floating-point arithmetic, the
ID_AA64PFR0_EL1.FP/SIMD are 1 (see Arm ARM DDI0487F.b, D13.2.64).
For these CPUs, xen will treat them as no FP/SIMD support, the
vfp_save/restore_state will not take effect.
From the TRM documents of Cortex-A75/A76/N1, we know these CPUs support
basic Advanced SIMD/FP and half-precision floating-point arithmetic. In
this case, on N1/A76/A75 platforms, Xen will always miss the floating
pointer registers save/restore. If different vCPUs are running on the
same pCPU, the floating pointer registers will be corrupted randomly.
This patch fixes Xen on these new cores.
Signed-off-by: Wei Chen <wei.chen@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
xen/include/asm-arm/cpufeature.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h
index 674beb0..10878ea 100644
--- a/xen/include/asm-arm/cpufeature.h
+++ b/xen/include/asm-arm/cpufeature.h
@@ -13,8 +13,8 @@
#define cpu_has_el2_64 (boot_cpu_feature64(el2) >= 1)
#define cpu_has_el3_32 (boot_cpu_feature64(el3) == 2)
#define cpu_has_el3_64 (boot_cpu_feature64(el3) >= 1)
-#define cpu_has_fp (boot_cpu_feature64(fp) == 0)
-#define cpu_has_simd (boot_cpu_feature64(simd) == 0)
+#define cpu_has_fp (boot_cpu_feature64(fp) < 8)
+#define cpu_has_simd (boot_cpu_feature64(simd) < 8)
#define cpu_has_gicv3 (boot_cpu_feature64(gic) == 1)
#endif
--
2.7.4
@@ -1,9 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:"
SRC_URI += " \
file://0001-arm-Add-Neoverse-N1-processor-identification.patch \
file://0002-xen-arm-Enable-CPU-Erratum-1165522-for-Neoverse.patch \
file://0003-xen-arm-Update-silicon-errata.txt-with-the-Neovers-A.patch \
file://0004-xen-arm-Missing-N1-A76-A75-FP-registers-in-vCPU-cont.patch \
file://0005-xen-arm-Throw-messages-for-unknown-FP-SIMD-implement.patch \
file://0001-xen-arm-Throw-messages-for-unknown-FP-SIMD-implement.patch \
"
@@ -1,6 +0,0 @@
/var/log/xenguest {
missingok
size 10k
copytruncate
rotate 2
}
@@ -11,13 +11,11 @@ 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}"
;;
*)
log error "XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
echo "${@}: XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
;;
esac
@@ -68,7 +68,7 @@ case "$1" in
# update guest list
guestlist=$(xenguest-manager status | grep Running | cut -d ":" -f1)
for f in ${guestlist}; do
xenguest-manager shutdown ${f} --kill
xl shutdown -w ${f} || xl destroy ${f}
done
;;
reload)
File diff suppressed because it is too large Load Diff
@@ -110,8 +110,7 @@ Init configuration
Disk configuration
--disk-reset-config reset disk guest configuration to default (no disk)
--disk-size=SZ set guest disk size in MB or GB(default),
e.g 1000M or 2[G].
--disk-size=SZ set guest disk size (in GB)
--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.
@@ -128,7 +127,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
}
@@ -371,159 +370,13 @@ 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}"
# 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}"
disk_config_rm_part ${partid}
echo "DISK_PART${partid}=\"${partinfo}\"" >> \
${IMAGE_TMPDIR}/disk.cfg
}
@@ -889,13 +742,11 @@ for arg in "${@}"; do
disk_config_reset
;;
--disk-size=*)
size=$(check_size "${optarg}")
[ -n "size" ] || exit 1
sed -i "s/DISK_SIZE=.*/DISK_SIZE=\"${size}\"/" \
sed -i "s/DISK_SIZE=.*/DISK_SIZE=\"${optarg}\"/" \
${IMAGE_TMPDIR}/disk.cfg
;;
--disk-device=*)
sed -i "s@DISK_DEVICE=.*@DISK_DEVICE=\"${optarg}\"@" \
sed -i "s/DISK_DEVICE=.*/DISK_SIZE=\"${optarg}\"/" \
${IMAGE_TMPDIR}/disk.cfg
;;
--disk-add-part=*)
@@ -31,14 +31,15 @@ case "${XENGUEST_NETWORK_TYPE:-}" in
release_lock "vif-nat-kea"
exit 0
fi
log info "Waiting for ${vif_name} - network interface is not ready..."
log info "try #${try}"
echo "Waiting for ${vif_name} - network interface is not ready..."\
" try #${try}" >> "${LOGFILE}" 2>&1
sleep 1
done
log error "Failed to get ${vif_name}. network interface ready!"
echo "ERROR: Failed to get ${vif_name} "\
"network interface ready!" >> "${LOGFILE}" 2>&1
exit 1
;;
*)
log verbose "No action needed"
echo "No action needed" >> "${LOGFILE}" 2>&1
;;
esac
@@ -2,16 +2,6 @@
#
# 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"
@@ -19,7 +9,6 @@ LICENSE = "MIT"
SRC_URI = " \
file://xenguest-manager \
file://xenguest-init \
file://logrotate-xenguest \
"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
@@ -28,16 +17,15 @@ 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-$(basename ${XENGUEST_MANAGER_VOLUME_DEVICE})"
XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen"
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 = "start 90 2 3 4 5 . stop 79 0 1 6 ."
inherit allarch update-rc.d
inherit update-rc.d
do_compile() {
echo "XENGUEST_VOLUME_DEVICE=\"${XENGUEST_MANAGER_VOLUME_DEVICE}\"" > \
@@ -46,8 +34,6 @@ 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() {
@@ -58,13 +44,10 @@ 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 xenguest-mkimage lvm2 xen-tools parted e2fsprogs \
dosfstools logrotate"
RDEPENDS_${PN} += "bash tar xenguest-mkimage lvm2 xen-tools parted e2fsprogs dosfstools"
FILES_${PN} += "${bindir}/xenguest-manager \
${sysconfdir}/xenguest"
@@ -17,8 +17,6 @@ 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"
@@ -27,7 +25,7 @@ do_install() {
install -m 755 xenguest-mkimage ${D}${bindir}/.
}
# We need bash
RDEPENDS_${PN} = "bash"
# We need bash and tar
RDEPENDS_${PN} = "bash tar"
FILES_${PN} = "${bindir}/xenguest-mkimage"
@@ -39,7 +39,7 @@ INITSCRIPT_PARAMS_${PN} = "start 01 2 3 4 5 . stop 81 0 1 6 ."
INITSCRIPT_NAME_${PN}-kea-dhcp4 = "kea-restore-default-config"
INITSCRIPT_PARAMS_${PN}-kea-dhcp4 = "defaults 20"
inherit allarch update-rc.d
inherit update-rc.d
do_install() {
cat ${WORKDIR}/xenguest-network-bridge.in \
@@ -5,6 +5,5 @@
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
@@ -0,0 +1,147 @@
From 5a0677110b73dd3e1766f89159701bfe8ac06808 Mon Sep 17 00:00:00 2001
From: Masami Hiramatsu <mhiramat@kernel.org>
Date: Tue, 6 Oct 2020 15:49:31 +0900
Subject: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn
correctly
Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu
address conversion.
In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted
to gfn by virt_to_gfn() macro. However, since the virt_to_gfn(v)
assumes the given virtual address is in linear mapped kernel memory
area, it can not convert the per-cpu memory if it is allocated on
vmalloc area.
This depends on CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK.
If it is enabled, the first chunk of percpu memory is linear mapped.
In the other case, that is allocated from vmalloc area. Moreover,
if the first chunk of percpu has run out until allocating
xen_vcpu_info, it will be allocated on the 2nd chunk, which is
based on kernel memory or vmalloc memory (depends on
CONFIG_NEED_PER_CPU_KM).
Without this fix and kernel configured to use vmalloc area for
the percpu memory, the Dom0 kernel will fail to boot with following
errors.
[ 0.466172] Xen: initializing cpu0
[ 0.469601] ------------[ cut here ]------------
[ 0.474295] WARNING: CPU: 0 PID: 1 at arch/arm64/xen/../../arm/xen/enlighten.c:153 xen_starting_cpu+0x160/0x180
[ 0.484435] Modules linked in:
[ 0.487565] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc4+ #4
[ 0.493895] Hardware name: Socionext Developer Box (DT)
[ 0.499194] pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--)
[ 0.504836] pc : xen_starting_cpu+0x160/0x180
[ 0.509263] lr : xen_starting_cpu+0xb0/0x180
[ 0.513599] sp : ffff8000116cbb60
[ 0.516984] x29: ffff8000116cbb60 x28: ffff80000abec000
[ 0.522366] x27: 0000000000000000 x26: 0000000000000000
[ 0.527754] x25: ffff80001156c000 x24: fffffdffbfcdb600
[ 0.533129] x23: 0000000000000000 x22: 0000000000000000
[ 0.538511] x21: ffff8000113a99c8 x20: ffff800010fe4f68
[ 0.543892] x19: ffff8000113a9988 x18: 0000000000000010
[ 0.549274] x17: 0000000094fe0f81 x16: 00000000deadbeef
[ 0.554655] x15: ffffffffffffffff x14: 0720072007200720
[ 0.560037] x13: 0720072007200720 x12: 0720072007200720
[ 0.565418] x11: 0720072007200720 x10: 0720072007200720
[ 0.570801] x9 : ffff8000100fbdc0 x8 : ffff800010715208
[ 0.576182] x7 : 0000000000000054 x6 : ffff00001b790f00
[ 0.581564] x5 : ffff800010bbf880 x4 : 0000000000000000
[ 0.586945] x3 : 0000000000000000 x2 : ffff80000abec000
[ 0.592327] x1 : 000000000000002f x0 : 0000800000000000
[ 0.597716] Call trace:
[ 0.600232] xen_starting_cpu+0x160/0x180
[ 0.604309] cpuhp_invoke_callback+0xac/0x640
[ 0.608736] cpuhp_issue_call+0xf4/0x150
[ 0.612728] __cpuhp_setup_state_cpuslocked+0x128/0x2c8
[ 0.618030] __cpuhp_setup_state+0x84/0xf8
[ 0.622192] xen_guest_init+0x324/0x364
[ 0.626097] do_one_initcall+0x54/0x250
[ 0.630003] kernel_init_freeable+0x12c/0x2c8
[ 0.634428] kernel_init+0x1c/0x128
[ 0.637988] ret_from_fork+0x10/0x18
[ 0.641635] ---[ end trace d95b5309a33f8b27 ]---
[ 0.646337] ------------[ cut here ]------------
[ 0.651005] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:158!
[ 0.657697] Internal error: Oops - BUG: 0 [#1] SMP
[ 0.662548] Modules linked in:
[ 0.665676] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.9.0-rc4+ #4
[ 0.673398] Hardware name: Socionext Developer Box (DT)
[ 0.678695] pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--)
[ 0.684338] pc : xen_starting_cpu+0x178/0x180
[ 0.688765] lr : xen_starting_cpu+0x144/0x180
[ 0.693188] sp : ffff8000116cbb60
[ 0.696573] x29: ffff8000116cbb60 x28: ffff80000abec000
[ 0.701955] x27: 0000000000000000 x26: 0000000000000000
[ 0.707344] x25: ffff80001156c000 x24: fffffdffbfcdb600
[ 0.712718] x23: 0000000000000000 x22: 0000000000000000
[ 0.718107] x21: ffff8000113a99c8 x20: ffff800010fe4f68
[ 0.723481] x19: ffff8000113a9988 x18: 0000000000000010
[ 0.728863] x17: 0000000094fe0f81 x16: 00000000deadbeef
[ 0.734245] x15: ffffffffffffffff x14: 0720072007200720
[ 0.739626] x13: 0720072007200720 x12: 0720072007200720
[ 0.745008] x11: 0720072007200720 x10: 0720072007200720
[ 0.750390] x9 : ffff8000100fbdc0 x8 : ffff800010715208
[ 0.755771] x7 : 0000000000000054 x6 : ffff00001b790f00
[ 0.761153] x5 : ffff800010bbf880 x4 : 0000000000000000
[ 0.766534] x3 : 0000000000000000 x2 : 00000000deadbeef
[ 0.771916] x1 : 00000000deadbeef x0 : ffffffffffffffea
[ 0.777304] Call trace:
[ 0.779819] xen_starting_cpu+0x178/0x180
[ 0.783898] cpuhp_invoke_callback+0xac/0x640
[ 0.788325] cpuhp_issue_call+0xf4/0x150
[ 0.792317] __cpuhp_setup_state_cpuslocked+0x128/0x2c8
[ 0.797619] __cpuhp_setup_state+0x84/0xf8
[ 0.801779] xen_guest_init+0x324/0x364
[ 0.805683] do_one_initcall+0x54/0x250
[ 0.809590] kernel_init_freeable+0x12c/0x2c8
[ 0.814016] kernel_init+0x1c/0x128
[ 0.817583] ret_from_fork+0x10/0x18
[ 0.821226] Code: d0006980 f9427c00 cb000300 17ffffea (d4210000)
[ 0.827415] ---[ end trace d95b5309a33f8b28 ]---
[ 0.832076] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.839815] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/160196697165.60224.17470743378683334995.stgit@devnote2
Signed-off-by: Juergen Gross <jgross@suse.com>
Upstream-Status: Backport
Signed-off-by: Richard Neill <richard.neill@arm.com>
---
arch/arm/xen/enlighten.c | 2 +-
include/xen/arm/page.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index e93145d72c26..a6ab3689b2f4 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -150,7 +150,7 @@ static int xen_starting_cpu(unsigned int cpu)
pr_info("Xen: initializing cpu%d\n", cpu);
vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
- info.mfn = virt_to_gfn(vcpup);
+ info.mfn = percpu_to_gfn(vcpup);
info.offset = xen_offset_in_page(vcpup);
err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu),
diff --git a/include/xen/arm/page.h b/include/xen/arm/page.h
index 39df751d0dc4..ac1b65470563 100644
--- a/include/xen/arm/page.h
+++ b/include/xen/arm/page.h
@@ -83,6 +83,9 @@ static inline unsigned long bfn_to_pfn(unsigned long bfn)
})
#define gfn_to_virt(m) (__va(gfn_to_pfn(m) << XEN_PAGE_SHIFT))
+#define percpu_to_gfn(v) \
+ (pfn_to_gfn(per_cpu_ptr_to_phys(v) >> XEN_PAGE_SHIFT))
+
/* Only used in PV code. But ARM guests are always HVM. */
static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr)
{
--
2.25.1
@@ -0,0 +1,95 @@
From 18d691d837b340c941ad778bc8dfa77446e48bb4 Mon Sep 17 00:00:00 2001
Message-Id: <18d691d837b340c941ad778bc8dfa77446e48bb4.1613579395.git.diego.sueiro@arm.com>
From: Julien Grall <jgrall@amazon.com>
Date: Wed, 10 Feb 2021 17:06:54 +0000
Subject: [PATCH] arm/xen: Don't probe xenbus as part of an early initcall
commit c4295ab0b485b8bc50d2264bcae2acd06f25caaf upstream.
After Commit 3499ba8198cad ("xen: Fix event channel callback via
INTX/GSI"), xenbus_probe() will be called too early on Arm. This will
recent to a guest hang during boot.
If the hang wasn't there, we would have ended up to call
xenbus_probe() twice (the second time is in xenbus_probe_initcall()).
We don't need to initialize xenbus_probe() early for Arm guest.
Therefore, the call in xen_guest_init() is now removed.
After this change, there is no more external caller for xenbus_probe().
So the function is turned to a static one. Interestingly there were two
prototypes for it.
Cc: stable@vger.kernel.org
Fixes: 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI")
Reported-by: Ian Jackson <iwj@xenproject.org>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20210210170654.5377-1-julien@xen.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
arch/arm/xen/enlighten.c | 2 --
drivers/xen/xenbus/xenbus.h | 1 -
drivers/xen/xenbus/xenbus_probe.c | 2 +-
include/xen/xenbus.h | 2 --
4 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index f45bff158fc2..57dfc13b2752 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -370,8 +370,6 @@ static int __init xen_guest_init(void)
return -ENOMEM;
}
gnttab_init();
- if (!xen_initial_domain())
- xenbus_probe();
/*
* Making sure board specific code will not set up ops for
diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h
index a9bb5f91082d..88516a8a9f93 100644
--- a/drivers/xen/xenbus/xenbus.h
+++ b/drivers/xen/xenbus/xenbus.h
@@ -115,7 +115,6 @@ int xenbus_probe_node(struct xen_bus_type *bus,
const char *type,
const char *nodename);
int xenbus_probe_devices(struct xen_bus_type *bus);
-void xenbus_probe(void);
void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 786494bb7f20..652894d61967 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -683,7 +683,7 @@ void unregister_xenstore_notifier(struct notifier_block *nb)
}
EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
-void xenbus_probe(void)
+static void xenbus_probe(void)
{
xenstored_ready = 1;
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index fe9a9fa2ebc4..14d47ed4114f 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -187,8 +187,6 @@ void xs_suspend_cancel(void);
struct work_struct;
-void xenbus_probe(void);
-
#define XENBUS_IS_ERR_READ(str) ({ \
if (!IS_ERR(str) && strlen(str) == 0) { \
kfree(str); \
--
2.17.1
@@ -38,6 +38,17 @@ python() {
from distutils.version import LooseVersion
kernelVersion = d.getVar('LINUX_VERSION')
pn = d.getVar('PN')
if kernelVersion and LooseVersion(kernelVersion) < '5.4.99' \
and pn != 'linux-libc-headers' \
and oe.utils.any_distro_features(d, "arm-autonomy-guest"):
d.appendVar('SRC_URI', ' file://files/0001-arm-xen-Don-t-probe-xenbus-as-part-of-an-early-initc.patch' )
if kernelVersion and LooseVersion(kernelVersion) < '5.9' \
and pn != 'linux-libc-headers' \
and oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"):
d.appendVar('SRC_URI', ' file://files/0001-arm-arm64-xen-Fix-to-convert-percpu-address-to-gfn-c.patch' )
if kernelVersion and LooseVersion(kernelVersion) < '5.10':
if oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"):
@@ -0,0 +1,32 @@
#
# 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
+1 -1
View File
@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "meta-arm-bsp"
BBFILE_PATTERN_meta-arm-bsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-bsp = "5"
BBFILE_PRIORITY_meta-arm-bsp = "6"
LAYERSERIES_COMPAT_meta-arm-bsp = "gatesgarth"
+24
View File
@@ -0,0 +1,24 @@
# 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-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.3%"
KBUILD_DEFCONFIG = "multi_v7_defconfig"
KCONFIG_MODE = "--alldefconfig"
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"
@@ -1,32 +0,0 @@
#@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"
@@ -0,0 +1,17 @@
# 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,6 +9,8 @@ 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"
+1 -4
View File
@@ -29,10 +29,7 @@ DISK_IMG_PARTITION3_CONTENT = ""
SERIAL_CONSOLES = "115200;ttyAMA0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
PREFERRED_VERSION_u-boot ?= "2020.10"
PREFERRED_VERSION_trusted-firmware-a ?= "2.4%"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
@@ -14,7 +14,8 @@ 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 ?= "boot-firmware"
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "scp-firmware"
PREFERRED_VERSION_control-processor-firmware ?= "2.6.0"
EXTRA_IMAGEDEPENDS += " \
virtual/trusted-firmware-a \
-2
View File
@@ -20,9 +20,7 @@ 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,6 +4,9 @@
#@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
@@ -11,8 +14,7 @@ require conf/machine/include/tune-cortexm33.inc
TCLIBC = "newlib"
# For runqemu
IMAGE_FSTYPES += "ext4"
IMAGE_CLASSES += "qemuboot"
require conf/machine/include/qemu.inc
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine musca-b1"
QB_CPU = "-cpu cortex-m33"
@@ -23,5 +25,3 @@ QB_MEM = "512k"
ZEPHYR_BOARD = "v2m_musca_b1"
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
ARCH_musca-b1 = "arm"
TFM_PLATFORM = "MUSCA_B1"
+3 -2
View File
@@ -4,9 +4,10 @@
#@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"
+7 -8
View File
@@ -8,7 +8,7 @@ require conf/machine/include/tune-neoversen1.inc
KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES += "wic wic.gz wic.bmap tar.bz2 ext4"
IMAGE_FSTYPES += "wic tar.bz2 ext4"
SERIAL_CONSOLES = "115200;ttyAMA0"
@@ -17,23 +17,22 @@ 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 yocto
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
# 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%"
# RTL8168E Gigabit Ethernet Controller is attached to the PCIe interface
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-firmware-rtl8168"
PREFERRED_VERSION_trusted-firmware-a ?= "2.4%"
# Trusted firmware v2.3 version
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
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"
-2
View File
@@ -21,8 +21,6 @@ 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"
+7 -22
View File
@@ -10,34 +10,19 @@ 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.4%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
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_IMAGETYPES += "fitImage"
KERNEL_CLASSES = " kernel-fitimage "
IMAGE_FSTYPES += "cpio.gz"
INITRAMFS_IMAGE ?= "core-image-minimal"
KERNEL_BOOTCMD = "booti"
IMAGE_FSTYPES += "cpio.gz.u-boot"
SERIAL_CONSOLES = "115200;ttyAMA0"
@@ -1,19 +1,19 @@
# Corstone-500 Platform Support in meta-arm-bsp
# Cortex-A5 DesignStart A5DS Platform Support in meta-arm-bsp
## Howto Build and Run
### Configuration:
In the local.conf file, MACHINE should be set as follow:
MACHINE ?= "corstone500"
DISTRO ?= "poky-tiny"
MACHINE ?= "a5ds"
DISTRO ?= "iota-tiny"
Or set environment variables with that values:
MACHINE "corstone500"
DISTRO "poky-tiny"
MACHINE "a5ds"
DISTRO "iota-tiny"
### Build:
``bash$ bitbake arm-reference-image```
``bash$ bitbake iota-tiny-image```
### Run:
To run the result in a Fixed Virtual Platform please get:
@@ -0,0 +1,51 @@
# 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
+3 -6
View File
@@ -15,12 +15,9 @@ 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:
```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.
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```
## Running
To run the produced binaries in a TC0 Fixed Virtual Platform please get
@@ -1,61 +0,0 @@
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
@@ -1,256 +0,0 @@
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
@@ -1,99 +0,0 @@
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
@@ -1,32 +0,0 @@
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
@@ -1,19 +0,0 @@
# 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"
@@ -1,6 +0,0 @@
# Machine specific configurations
MACHINE_HAFNIUM_REQUIRE ?= ""
MACHINE_HAFNIUM_REQUIRE_tc0 = "hafnium-tc0.inc"
require ${MACHINE_HAFNIUM_REQUIRE}
@@ -1,12 +0,0 @@
# 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,9 +1,13 @@
Upstream-Status: Backport
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
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
From 3deb59c5f4c64aa092bb3a4ebc018acf3f746f47 Mon Sep 17 00:00:00 2001
From a6d545cf9b6c46f2ea415d64fa81eb4771cfb51c Mon Sep 17 00:00:00 2001
From: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Date: Tue, 10 Nov 2020 12:31:04 +0530
Date: Thu, 28 May 2020 16:19:12 +0530
Subject: [PATCH] product/n1sdp: set CCIX speed to GEN3 to work with interposer
C2C setup
@@ -11,22 +15,23 @@ 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 | 30 ++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
.../module/n1sdp_pcie/src/mod_n1sdp_pcie.c | 33 +++++++++++++++----
1 file changed, 26 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 901e0464..ba02144f 100644
index 19fa5a5..a93e6cc 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,12 @@ static int n1sdp_pcie_phy_init(fwk_id_t id)
@@ -206,7 +206,13 @@ 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
@@ -35,12 +40,13 @@ index 901e0464..ba02144f 100644
lane_count = LAN_COUNT_IN_X_16;
FWK_LOG_INFO("[%s] Initializing PHY...", pcie_type[did]);
@@ -239,7 +244,12 @@ static int n1sdp_pcie_controller_init(fwk_id_t id, bool ep_mode)
@@ -239,7 +245,13 @@ 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
@@ -49,12 +55,13 @@ index 901e0464..ba02144f 100644
lane_count = LAN_COUNT_IN_X_16;
if (ep_mode) {
@@ -282,12 +292,18 @@ static int n1sdp_pcie_link_training(fwk_id_t id, bool ep_mode)
@@ -282,12 +294,19 @@ 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;
@@ -74,5 +81,5 @@ index 901e0464..ba02144f 100644
if (gen_speed >= PCIE_GEN_3 && !ep_mode) {
FWK_LOG_INFO(
--
2.25.1
2.25.0
@@ -1,817 +0,0 @@
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
@@ -1,125 +0,0 @@
From 492c5d094b5c9aaeffe076265840056a2b9d57ac Mon Sep 17 00:00:00 2001
From: Usama Arif <usama.arif@arm.com>
Date: Tue, 23 Feb 2021 15:06:46 +0000
Subject: [PATCH 2/2] module/cmn_booker: amend CFGM base address
The CFGM base address calculation depends on the number of ports
per XP.
Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: Iabb9e76b86ee80b345857deb86e9acd4cec5988c
Upstream-Status: Backport [https://github.com/ARM-software/SCP-firmware/commit/5abe1656f27216f633b3fc29e20ff64340f47bfe]
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
---
module/cmn_booker/include/mod_cmn_booker.h | 7 +++++++
module/cmn_booker/src/cmn_booker.c | 18 +++++++++++++++---
module/cmn_booker/src/cmn_booker.h | 5 +++--
module/cmn_booker/src/mod_cmn_booker.c | 2 +-
product/tc0/scp_romfw/config_cmn_booker.c | 1 +
5 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/module/cmn_booker/include/mod_cmn_booker.h b/module/cmn_booker/include/mod_cmn_booker.h
index 5d395521..a172b336 100644
--- a/module/cmn_booker/include/mod_cmn_booker.h
+++ b/module/cmn_booker/include/mod_cmn_booker.h
@@ -127,6 +127,13 @@ struct mod_cmn_booker_config {
* to a CAL port, node id of HN-F will be a odd number).
*/
bool hnf_cal_mode;
+
+ /*! \
+ * \brief Number of device ports per XP
+ * \details The calculation for CFGM base address depends on the number of
+ * ports per cross point
+ */
+ unsigned int ports_per_xp;
};
/*!
diff --git a/module/cmn_booker/src/cmn_booker.c b/module/cmn_booker/src/cmn_booker.c
index d6e90964..277415ef 100644
--- a/module/cmn_booker/src/cmn_booker.c
+++ b/module/cmn_booker/src/cmn_booker.c
@@ -196,7 +196,7 @@ unsigned int get_node_pos_y(void *node_base)
struct cmn_booker_cfgm_reg *get_root_node(uintptr_t base,
unsigned int hnd_node_id, unsigned int mesh_size_x,
- unsigned int mesh_size_y)
+ unsigned int mesh_size_y, unsigned int ports_per_xp)
{
unsigned int node_pos_x;
unsigned int node_pos_y;
@@ -217,11 +217,23 @@ struct cmn_booker_cfgm_reg *get_root_node(uintptr_t base,
node_port = (hnd_node_id >> CMN_BOOKER_NODE_ID_PORT_POS) &
CMN_BOOKER_NODE_ID_PORT_MASK;
+ /* Calculate node address offset */
+ if(ports_per_xp > 4)
+ {
+ // Single XP configuration, upto 6 device ports allowed
+ offset = ((node_port & 0x3) << CMN_BOOKER_ROOT_NODE_OFFSET_PORT_POS);
+ } else if(ports_per_xp > 2)
+ {
+ // XPs which have more than 2 device ports
+ offset = (((node_port)>>1) << CMN_BOOKER_ROOT_NODE_OFFSET_PORT_POS);
+ }else
+ {
+ offset = (node_port << CMN_BOOKER_ROOT_NODE_OFFSET_PORT_POS);
+ }
/* Calculate node address offset */
offset = (node_pos_y << CMN_BOOKER_ROOT_NODE_OFFSET_Y_POS) |
(node_pos_x << (CMN_BOOKER_ROOT_NODE_OFFSET_Y_POS +
- encoding_bits)) |
- (node_port << CMN_BOOKER_ROOT_NODE_OFFSET_PORT_POS);
+ encoding_bits)) | offset;
return (struct cmn_booker_cfgm_reg *)(base + offset);
}
diff --git a/module/cmn_booker/src/cmn_booker.h b/module/cmn_booker/src/cmn_booker.h
index 9a89f173..b0d59804 100644
--- a/module/cmn_booker/src/cmn_booker.h
+++ b/module/cmn_booker/src/cmn_booker.h
@@ -417,12 +417,13 @@ unsigned int get_node_pos_y(void *node_base);
* \param base CMN BOOKER peripheral base address
* \param hnd_node_id HN-D node identifier containing the global configuration
* \param mesh_size_x Size of the mesh along the x-axis
- * \param mesh_size_y Size of the mesh along the x-axis
+ * \param mesh_size_y Size of the mesh along the y-axis
+ * \param mesh_size_y Device ports per XP
*
* \return Pointer to the root node descriptor
*/
struct cmn_booker_cfgm_reg *get_root_node(uintptr_t base,
unsigned int hnd_node_id, unsigned int mesh_size_x,
- unsigned int mesh_size_y);
+ unsigned int mesh_size_y, unsigned int ports_per_xp);
#endif /* CMN_BOOKER_H */
diff --git a/module/cmn_booker/src/mod_cmn_booker.c b/module/cmn_booker/src/mod_cmn_booker.c
index cbff273e..09fc8884 100644
--- a/module/cmn_booker/src/mod_cmn_booker.c
+++ b/module/cmn_booker/src/mod_cmn_booker.c
@@ -536,7 +536,7 @@ static int cmn_booker_init(fwk_id_t module_id, unsigned int element_count,
return FWK_E_DATA;
ctx->root = get_root_node(config->base, config->hnd_node_id,
- config->mesh_size_x, config->mesh_size_y);
+ config->mesh_size_x, config->mesh_size_y, config->ports_per_xp);
ctx->config = config;
diff --git a/product/tc0/scp_romfw/config_cmn_booker.c b/product/tc0/scp_romfw/config_cmn_booker.c
index a076d8d7..d13138b2 100644
--- a/product/tc0/scp_romfw/config_cmn_booker.c
+++ b/product/tc0/scp_romfw/config_cmn_booker.c
@@ -116,5 +116,6 @@ const struct fwk_module_config config_cmn_booker = {
.clock_id =
FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_INTERCONNECT),
.hnf_cal_mode = false,
+ .ports_per_xp = 4,
}),
};
--
2.29.2
@@ -0,0 +1,37 @@
# Corstone700 specific SCP configurations and build instructions
SUMMARY = "Boot Processor firmware"
DESCRIPTION = "Boot Processor firmware"
DEPENDS += "virtual/trusted-firmware-a"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
COMPATIBLE_MACHINE = "(corstone700-*)"
SCP_PLATFORM = "corstone-700"
# boot-firmware project is a fork of scp-firmware
SRC_URI = "gitsm://git.linaro.org/landing-teams/working/arm/boot-firmware.git;protocol=https;branch=master"
SRCREV = "a4dd1b60218b5172a94e6f44c96384b84a77588c"
PV = "0.1.0~git${SRCPV}"
B = "${WORKDIR}/build"
EXTRA_OEMAKE = "PRODUCT='${SCP_PLATFORM}' \
BUILD_PATH=${B} \
CROSS_COMPILE='arm-none-eabi-' \
"
do_compile_append() {
oe_runmake -C ${S}/tools/spitoc CC=${BUILD_CC} clean all
}
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
}
@@ -1,5 +1,6 @@
# N1SDP specific SCP configurations and build instructions
SRCREV = "350be71a2ecef588b8ff5a095a0840de23506e45"
SCP_PLATFORM = "n1sdp"
SCP_LOG_LEVEL = "INFO"
@@ -11,6 +12,8 @@ SRC_URI_append = " \
COMPATIBLE_MACHINE_n1sdp = "n1sdp"
PV = "2.6.0+git${SRCPV}"
DEPENDS += "fiptool-native"
DEPENDS += "virtual/trusted-firmware-a"
@@ -1,5 +1,7 @@
# SGI575 specific SCP configurations and build instructions
#its a tested tag post-2.6.0
SRCREV = "7a025658d8318e95dbab4259a8ff7834ae6d8061"
SCP_PLATFORM = "sgi575"
SCP_LOG_LEVEL = "INFO"
@@ -11,3 +13,7 @@ do_install() {
install -D "${B}/product/${SCP_PLATFORM}/scp_ramfw/release/bin/scp_ramfw.bin" "${D}/firmware/"
install -D "${B}/product/${SCP_PLATFORM}/mcp_romfw/release/bin/mcp_romfw.bin" "${D}/firmware/"
}
PV = "2.6.0+git${SRCPV}"
@@ -1,17 +1,12 @@
# TC0 specific SCP configuration
# Intermediate SHA with 2.7 baseline version, required for Theodul DSU
SRCREV = "a841e17b9a11784cddd96f3becdd7e4c54cfb44b"
PV = "2.7+git${SRCPV}"
FILESEXTRAPATHS_prepend_tc0 := "${THISDIR}/files/tc0:"
SRC_URI_append = " \
file://0001-product-tc0-add-clock-and-dvfs-support-for-all-cores.patch \
file://0002-module-cmn_booker-amend-CFGM-base-address.patch \
"
# Intermediate SHA with 2.6 baseline version
SRC_URI = "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https"
SRCREV = "6fad1d3e2f82b2ef51e55928ac3a678a75f64ef4"
COMPATIBLE_MACHINE = "tc0"
SCP_PLATFORM = "tc0"
FW_TARGETS = "scp"
PV = "2.6.0+git${SRCPV}"
@@ -3,7 +3,9 @@
MACHINE_SCP_REQUIRE ?= ""
MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
MACHINE_SCP_REQUIRE_sgi575 = "scp-firmware-sgi575.inc"
MACHINE_SCP_REQUIRE_tc0 = "scp-firmware-tc0.inc"
MACHINE_SCP_REQUIRE_juno = "scp-firmware-juno.inc"
MACHINE_SCP_REQUIRE_sgi575 = "scp-firmware-sgi575.inc"
MACHINE_SCP_REQUIRE_corstone700 = "scp-firmware-corstone700.inc"
require ${MACHINE_SCP_REQUIRE}
@@ -1,7 +0,0 @@
# Include machine specific SCP configurations
MACHINE_SCP_REQUIRE ?= ""
MACHINE_SCP_REQUIRE_juno = "scp-firmware-juno.inc"
require ${MACHINE_SCP_REQUIRE}
@@ -26,7 +26,6 @@ software running on N1 SDP, including those that do not require mitigation.
This patch is meant for performance evaluation purposes ONLY and should not
be used for software that requires a seccomp computing environment.
Upstream-Status: Inappropriate
Signed-off-by: James Yang <James.Yang@arm.com>
---
plat/arm/board/n1sdp/platform.mk | 2 ++
@@ -1,199 +0,0 @@
From bda42d4e1c56022692b60447279d5321f872aa2b Mon Sep 17 00:00:00 2001
From: Davidson K <davidson.kumaresan@arm.com>
Date: Wed, 10 Mar 2021 12:07:15 +0530
Subject: [PATCH 1/2] product/tc0: Add support for Trusted Services Secure
Partitions
This patch adds support for the crypto and secure storage secure
partitions for the Total Compute platform. These secure partitions
have to be managed by Hafnium executing at S-EL2
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I2df690e3a99bf6bf50e2710994a905914a07026e
Upstream-Status: Pending [Not submitted to upstream yet]
---
Makefile | 4 +
docs/plat/arm/arm-build-options.rst | 4 +
.../fdts/tc0_spmc_ts_optee_sp_manifest.dts | 118 ++++++++++++++++++
plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts | 10 ++
4 files changed, 136 insertions(+)
create mode 100644 plat/arm/board/tc0/fdts/tc0_spmc_ts_optee_sp_manifest.dts
diff --git a/Makefile b/Makefile
index b6c8b210c..d85c52bb4 100644
--- a/Makefile
+++ b/Makefile
@@ -514,6 +514,10 @@ ifneq (${SPD},none)
ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp)
DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG
endif
+
+ ifeq ($(findstring ts_optee_sp,$(ARM_SPMC_MANIFEST_DTS)),ts_optee_sp)
+ DTC_CPPFLAGS += -DTS_SP_FW_CONFIG
+ endif
else
# All other SPDs in spd directory
SPD_DIR := spd
diff --git a/docs/plat/arm/arm-build-options.rst b/docs/plat/arm/arm-build-options.rst
index a1d231357..32cf19291 100644
--- a/docs/plat/arm/arm-build-options.rst
+++ b/docs/plat/arm/arm-build-options.rst
@@ -98,6 +98,10 @@ Arm Platform Build Options
device tree. This flag is defined only when ``ARM_SPMC_MANIFEST_DTS`` manifest
file name contains pattern optee_sp.
+ - ``TS_SP_FW_CONFIG``: DTC build flag to include Trusted Services (Crypto and
+ secure-storage) as SP in tb_fw_config device tree. This flag is defined only
+ when ``ARM_SPMC_MANIFEST_DTS`` manifest file name contains pattern ts_optee_sp.
+
For a better understanding of these options, the Arm development platform memory
map is explained in the :ref:`Firmware Design`.
diff --git a/plat/arm/board/tc0/fdts/tc0_spmc_ts_optee_sp_manifest.dts b/plat/arm/board/tc0/fdts/tc0_spmc_ts_optee_sp_manifest.dts
new file mode 100644
index 000000000..ac91db238
--- /dev/null
+++ b/plat/arm/board/tc0/fdts/tc0_spmc_ts_optee_sp_manifest.dts
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+/dts-v1/;
+
+/ {
+ compatible = "arm,ffa-core-manifest-1.0";
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ attribute {
+ spmc_id = <0x8000>;
+ maj_ver = <0x1>;
+ min_ver = <0x0>;
+ exec_state = <0x0>;
+ load_address = <0x0 0xfd000000>;
+ entrypoint = <0x0 0xfd000000>;
+ binary_size = <0x80000>;
+ };
+
+ hypervisor {
+ compatible = "hafnium,hafnium";
+ vm1 {
+ is_ffa_partition;
+ debug_name = "op-tee";
+ load_address = <0xfd280000>;
+ vcpu_count = <8>;
+ mem_size = <0x1980000>; /* 25MB TZC DRAM */
+ };
+ vm2 {
+ is_ffa_partition;
+ debug_name = "secure-storage";
+ load_address = <0xfee00000>;
+ vcpu_count = <1>;
+ mem_size = <0x200000>; /* 2MB TZC DRAM */
+ };
+ vm3 {
+ is_ffa_partition;
+ debug_name = "crypto";
+ load_address = <0xfec00000>;
+ vcpu_count = <1>;
+ mem_size = <0x200000>; /* 2MB TZC DRAM */
+ };
+ };
+
+ cpus {
+ #address-cells = <0x2>;
+ #size-cells = <0x0>;
+
+ CPU0:cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ };
+
+ /*
+ * SPMC (Hafnium) requires secondary cpu nodes are declared in
+ * descending order
+ */
+ CPU7:cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x700>;
+ enable-method = "psci";
+ };
+
+ CPU6:cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x600>;
+ enable-method = "psci";
+ };
+
+ CPU5:cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x500>;
+ enable-method = "psci";
+ };
+
+ CPU4:cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x400>;
+ enable-method = "psci";
+ };
+
+ CPU3:cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ };
+
+ CPU2:cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ };
+
+ CPU1:cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ };
+ };
+
+ /* 32MB of TC0_TZC_DRAM1_BASE */
+ memory@fd000000 {
+ device_type = "memory";
+ reg = <0x0 0xfd000000 0x2000000>;
+ };
+};
diff --git a/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts b/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
index de5f95d5e..82c6ccb27 100644
--- a/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
+++ b/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
@@ -27,6 +27,16 @@
secure-partitions {
compatible = "arm,sp";
+#if TS_SP_FW_CONFIG
+ secure-storage {
+ uuid = <0xdc1eef48 0x4ccfb17a 0xcfdf8bac 0x141b71f7>;
+ load-address = <0xfee00000>;
+ };
+ crypto {
+ uuid = <0xd9df52d5 0x4bb216a2 0x6dd2a49a 0xc0e8843b>;
+ load-address = <0xfec00000>;
+ };
+#endif
#if OPTEE_SP_FW_CONFIG
op-tee {
uuid = <0x486178e0 0xe7f811e3 0xbc5e0002 0xa5d5c51b>;
--
2.29.2
@@ -1,59 +0,0 @@
From bc31cd2454854ab44aa9861b98f13848c2b474aa Mon Sep 17 00:00:00 2001
From: Usama Arif <usama.arif@arm.com>
Date: Tue, 30 Mar 2021 16:39:19 +0100
Subject: [PATCH 2/2] tc0: update GICR base address
The number of ITS have changed from 4 to 1, resulting
in GICR base address change.
Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I28101f0d1faf9f3c58591b642033c3fd49a275e7
Upstream-Status: Pending [Not submitted to upstream yet]
---
fdts/tc0.dts | 4 ++--
plat/arm/board/tc0/include/platform_def.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fdts/tc0.dts b/fdts/tc0.dts
index 2d7611cf2..382860d9d 100644
--- a/fdts/tc0.dts
+++ b/fdts/tc0.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -236,7 +236,7 @@
ranges;
interrupt-controller;
reg = <0x0 0x30000000 0 0x10000>, /* GICD */
- <0x0 0x30140000 0 0x200000>; /* GICR */
+ <0x0 0x30080000 0 0x200000>; /* GICR */
interrupts = <0x1 0x9 0x4>;
};
diff --git a/plat/arm/board/tc0/include/platform_def.h b/plat/arm/board/tc0/include/platform_def.h
index 30b5ab716..b169d7720 100644
--- a/plat/arm/board/tc0/include/platform_def.h
+++ b/plat/arm/board/tc0/include/platform_def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -220,7 +220,7 @@
/* GIC related constants */
#define PLAT_ARM_GICD_BASE UL(0x30000000)
#define PLAT_ARM_GICC_BASE UL(0x2C000000)
-#define PLAT_ARM_GICR_BASE UL(0x30140000)
+#define PLAT_ARM_GICR_BASE UL(0x30080000)
/*
* PLAT_CSS_MAX_SCP_BL2_SIZE is calculated using the current
--
2.29.2
@@ -1,16 +0,0 @@
{
"secure-storage" : {
"image": "secure-storage.bin",
"pm": "secure-storage.dts"
},
"crypto" : {
"image": "crypto-sp.bin",
"pm": "crypto.dts"
},
"op-tee" : {
"image": "tee-pager_v2.bin",
"pm": "optee_manifest.dts"
}
}
@@ -1,6 +1,6 @@
# Corstone-500 specific TFA support
# Cortex-A5 Designstart specific TFA support
COMPATIBLE_MACHINE = "corstone500"
COMPATIBLE_MACHINE = "a5ds"
TFA_PLATFORM = "a5ds"
TFA_DEBUG = "1"
TFA_UBOOT = "1"
@@ -13,9 +13,6 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
# fdts: corstone700: add NXP isp1763 node to device tree
SRCREV_tfa = "a6f65b11529b618ff04017f64054dc661c489068"
# This is incorporated into the SRCREV above
SRC_URI_remove = "file://0001-fdts-a5ds-Fix-for-the-system-timer-issue.patch"
PV = "2.3+git${SRCPV}"
EXTRA_OEMAKE_append = " \
@@ -1,10 +1,11 @@
# FVP specific TFA parameters
#
# Armv8-A Base Platform FVP
# Armv8-A Base Platform FVP and Armv8-A Foundation Platform uses the same
# TFAs.
#
COMPATIBLE_MACHINE = "fvp-base"
COMPATIBLE_MACHINE = "fvp-base|foundation-armv8"
TFA_PLATFORM = "fvp"
TFA_DEBUG = "1"
TFA_MBEDTLS = "1"
@@ -11,3 +11,7 @@ TFA_UBOOT = "0"
SRC_URI_append = " \
file://0001-n1sdp-arm-tf-disable-workaround-for-N1-Erratum-13157.patch \
"
SRCREV_tfa = "dffd5192df41e77e27bb524bfe64d747c1c43522"
PV = "2.3+git${SRCPV}"
@@ -1,17 +1,8 @@
# TC0 specific TFA configuration
# TCO specific TFA configuration
# Intermediate SHA with 2.4 baseline version, required for Theodul DSU
# --- This SRC_URI will be removed once below SRCREV_tfa gets merged to TF-A master
SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;branch=integration;name=tfa"
SRCREV_tfa = "8078b5c5a0c2a47710df96412d88df53486e2b29"
PV = "2.4+git${SRCPV}"
# Intermediate SHA with 2.3 baseline version
SRCREV_tfa = "16796a25fefc4ecf780211bf554d3b8dc5436fa4"
FILESEXTRAPATHS_prepend_tc0 := "${THISDIR}/files/tc0:"
SRC_URI_append = " \
file://0001-product-tc0-Add-support-for-Trusted-Services-Secure-.patch \
file://0002-tc0-update-GICR-base-address.patch \
"
DEPENDS += "scp-firmware"
COMPATIBLE_MACHINE = "tc0"
@@ -23,27 +14,6 @@ TFA_INSTALL_TARGET = "bl1 fip"
TFA_MBEDTLS = "1"
TFA_DEBUG = "1"
TFA_SPD = "spmd"
TFA_SPMD_SPM_AT_SEL2 = "1"
# Set optee, crypto-sp and secure-storage as the SP.
# Set spmc manifest and sp layout file to match.
DEPENDS += "optee-os crypto-sp secure-storage"
SRC_URI_append = " file://sp_layout.json;subdir=sp_layout"
TFA_SP_LAYOUT_FILE = "${WORKDIR}/sp_layout/sp_layout.json"
TFA_ARM_SPMC_MANIFEST_DTS = "plat/arm/board/tc0/fdts/tc0_spmc_ts_optee_sp_manifest.dts"
EXTRA_OEMAKE += "SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_ramfw.bin"
EXTRA_OEMAKE += "TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \
ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem"
do_compile_prepend() {
cp -t ${WORKDIR}/sp_layout \
${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/tee-pager_v2.bin \
${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/optee_manifest.dts \
${RECIPE_SYSROOT}/firmware/secure-storage.bin \
${RECIPE_SYSROOT}/firmware/secure-storage.dts \
${RECIPE_SYSROOT}/firmware/crypto-sp.bin \
${RECIPE_SYSROOT}/firmware/crypto.dts
}
@@ -1,6 +1,7 @@
# Machine specific TFAs
MACHINE_TFA_REQUIRE ?= ""
MACHINE_TFA_REQUIRE_fvp-base-arm32 = "trusted-firmware-a-fvp-arm32.inc"
MACHINE_TFA_REQUIRE_sgi575 = "trusted-firmware-a-sgi575.inc"
require ${MACHINE_TFA_REQUIRE}
@@ -1,7 +1,11 @@
# Machine specific TFAs
MACHINE_TFA_REQUIRE ?= ""
MACHINE_TFA_REQUIRE_corstone500 = "trusted-firmware-a-corstone500.inc"
MACHINE_TFA_REQUIRE_tc0 = "trusted-firmware-a-tc0.inc"
MACHINE_TFA_REQUIRE_a5ds = "trusted-firmware-a-a5ds.inc"
MACHINE_TFA_REQUIRE_foundation-armv8 = "trusted-firmware-a-fvp.inc"
MACHINE_TFA_REQUIRE_fvp-base = "trusted-firmware-a-fvp.inc"
MACHINE_TFA_REQUIRE_n1sdp = "trusted-firmware-a-n1sdp.inc"
MACHINE_TFA_REQUIRE_juno = "trusted-firmware-a-juno.inc"
MACHINE_TFA_REQUIRE_corstone700 = "trusted-firmware-a-corstone700.inc"
@@ -1,9 +0,0 @@
# Machine specific TFAs
MACHINE_TFA_REQUIRE ?= ""
MACHINE_TFA_REQUIRE_fvp-base = "trusted-firmware-a-fvp.inc"
MACHINE_TFA_REQUIRE_fvp-base-arm32 = "trusted-firmware-a-fvp-arm32.inc"
MACHINE_TFA_REQUIRE_n1sdp = "trusted-firmware-a-n1sdp.inc"
MACHINE_TFA_REQUIRE_tc0 = "trusted-firmware-a-tc0.inc"
require ${MACHINE_TFA_REQUIRE}
@@ -0,0 +1,4 @@
COMPATIBLE_MACHINE = "musca-b1|musca-s1"
TFM_PLATFORM_musca-b1 = "MUSCA_B1"
TFM_PLATFORM_musca-s1 = "MUSCA_S1"
@@ -1,33 +1,21 @@
Upstream-Status: Pending [Not submitted to upstream yet]
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
From b6879fc62b5ec01e3c87c2772d3a5e0f51c35f1c Mon Sep 17 00:00:00 2001
From 4449a6c2de38bdeb09e3158f6d9318812966243a Mon Sep 17 00:00:00 2001
From: Rui Miguel Silva <rui.silva@linaro.org>
Date: Wed, 18 Dec 2019 21:52:34 +0000
Subject: [PATCH] armv7: adding generic timer access through MMIO
Subject: [PATCH 1/2] armv7: add mmio timer
This driver enables the ARMv7 generic timer.
The access to the timer registers is through memory mapping (MMIO).
This driver can be used by u-boot to access to the timer through MMIO
when arch_timer is not available in the core (access using system
instructions not possible), for example, in case of Cortex-A5.
This driver configures and enables the generic timer at
the u-boot initcall level (timer_init) before u-boot relocation.
This timer can be used by u-boot when arch-timer is not available in
core, for example, Cortex-A5.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
arch/arm/cpu/armv7/Makefile | 1 +
arch/arm/cpu/armv7/mmio_timer.c | 64 +++++++++++++++++++++++++++++++++
arch/arm/cpu/armv7/mmio_timer.c | 56 +++++++++++++++++++++++++++++++++
scripts/config_whitelist.txt | 1 +
3 files changed, 66 insertions(+)
3 files changed, 58 insertions(+)
create mode 100644 arch/arm/cpu/armv7/mmio_timer.c
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 8c955d0d52..82af9c0312 100644
index 8c955d0d5284..82af9c031277 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_ARMV7_PSCI) += psci.o psci-common.o
@@ -40,10 +28,10 @@ index 8c955d0d52..82af9c0312 100644
obj-y += s5p-common/
diff --git a/arch/arm/cpu/armv7/mmio_timer.c b/arch/arm/cpu/armv7/mmio_timer.c
new file mode 100644
index 0000000000..82ff3937b6
index 000000000000..5d6f66172398
--- /dev/null
+++ b/arch/arm/cpu/armv7/mmio_timer.c
@@ -0,0 +1,64 @@
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
@@ -59,30 +47,22 @@ index 0000000000..82ff3937b6
+
+#define CNTCTLBASE 0x1a020000UL
+#define CNTREADBASE 0x1a030000UL
+#define CNTEN (1 << 0)
+#define CNTFCREQ (1 << 8)
+
+static inline uint32_t mmio_read32(uintptr_t addr)
+{
+ return *(volatile uint32_t*)addr;
+}
+
+static inline void mmio_write32(uintptr_t addr, uint32_t data)
+{
+ *(volatile uint32_t*)addr = data;
+}
+
+int timer_init(void)
+{
+ gd->arch.timer_rate_hz = COUNTER_FREQUENCY / CONFIG_SYS_HZ; /* calculating the frequency in ms */
+ mmio_write32(CNTCTLBASE + 0x20, COUNTER_FREQUENCY); /* configuring CNTFID0 register: setting the base frequency */
+ mmio_write32(CNTCTLBASE, CNTFCREQ | CNTEN); /* configuring CNTCR register: enabling the generic counter and selecting the first frequency entry */
+ gd->arch.timer_rate_hz = mmio_read32(CNTCTLBASE);
+
+ return 0;
+}
+
+unsigned long long get_ticks(void)
+{
+ return ((mmio_read32(CNTREADBASE + 0x4) << 32) |
+ return ((mmio_read32(CNTCTLBASE + 0x4) << 32) |
+ mmio_read32(CNTREADBASE));
+}
+
@@ -109,7 +89,7 @@ index 0000000000..82ff3937b6
+ return gd->arch.timer_rate_hz;
+}
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 916768f361..c8fd8c6e35 100644
index 916768f361d9..c8fd8c6e355a 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3075,6 +3075,7 @@ CONFIG_SYS_MMC_U_BOOT_DST
@@ -121,5 +101,5 @@ index 916768f361..c8fd8c6e35 100644
CONFIG_SYS_MONITOR_BASE
CONFIG_SYS_MONITOR_BASE_EARLY
--
2.17.1
2.28.0
@@ -1,7 +1,4 @@
Upstream-Status: Pending [Not submitted to upstream yet]
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
From f58e263f575c0520926e4737694e11da31cb4886 Mon Sep 17 00:00:00 2001
From eed15d394137616a18add204a85b0e9dd5b00e0b Mon Sep 17 00:00:00 2001
From: Rui Miguel Silva <rui.silva@linaro.org>
Date: Wed, 8 Jan 2020 09:48:11 +0000
Subject: [PATCH 2/2] board: arm: add designstart cortex-a5 board
@@ -25,7 +22,7 @@ Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
create mode 100644 include/configs/designstart_ca5.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 54d65f8488..7bc12f0b43 100644
index 54d65f84889f..7bc12f0b4300 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -665,6 +665,12 @@ config ARCH_BCM6858
@@ -51,7 +48,7 @@ index 54d65f8488..7bc12f0b43 100644
source "board/broadcom/bcm28155_ap/Kconfig"
diff --git a/board/armltd/designstart/Kconfig b/board/armltd/designstart/Kconfig
new file mode 100644
index 0000000000..a9564e8655
index 000000000000..a9564e8655e2
--- /dev/null
+++ b/board/armltd/designstart/Kconfig
@@ -0,0 +1,12 @@
@@ -69,7 +66,7 @@ index 0000000000..a9564e8655
+endif
diff --git a/board/armltd/designstart/Makefile b/board/armltd/designstart/Makefile
new file mode 100644
index 0000000000..d2dc2b74ed
index 000000000000..d2dc2b74ed85
--- /dev/null
+++ b/board/armltd/designstart/Makefile
@@ -0,0 +1,8 @@
@@ -83,7 +80,7 @@ index 0000000000..d2dc2b74ed
+obj-y := designstart.o
diff --git a/board/armltd/designstart/designstart.c b/board/armltd/designstart/designstart.c
new file mode 100644
index 0000000000..658057a003
index 000000000000..658057a00330
--- /dev/null
+++ b/board/armltd/designstart/designstart.c
@@ -0,0 +1,49 @@
@@ -138,7 +135,7 @@ index 0000000000..658057a003
+
diff --git a/configs/designstart_ca5_defconfig b/configs/designstart_ca5_defconfig
new file mode 100644
index 0000000000..a2a7567402
index 000000000000..a2a756740295
--- /dev/null
+++ b/configs/designstart_ca5_defconfig
@@ -0,0 +1,37 @@
@@ -181,7 +178,7 @@ index 0000000000..a2a7567402
+
diff --git a/include/configs/designstart_ca5.h b/include/configs/designstart_ca5.h
new file mode 100644
index 0000000000..6db5b1cf4a
index 000000000000..6db5b1cf4ac2
--- /dev/null
+++ b/include/configs/designstart_ca5.h
@@ -0,0 +1,122 @@
@@ -308,5 +305,5 @@ index 0000000000..6db5b1cf4a
+#define CONFIG_ENV_IS_IN_FLASH 1
+#endif
--
2.17.1
2.28.0
@@ -13,7 +13,7 @@ vexpress_armv8a.h.
This patch is co-authored with Soby Mathew <Soby.Mathew@arm.com>.
Upstream-Status: Denied
Upstream-status: Denied
For upstream discussion, please visit
https://www.mail-archive.com/u-boot@lists.denx.de/msg233429.html
@@ -1,5 +1,4 @@
Upstream-Status: Inappropriate [OE config specific]
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index f0ac2f9da3..93fcd3026a 100644

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