mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-07-18 04:27:08 +00:00
Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c4f04f3fb6 | |||
| 35d3511266 | |||
| 104364df48 | |||
| 9b6a88dada | |||
| efcd8b225a | |||
| a0d4477bc2 | |||
| 6a0b2b0ebf | |||
| 84dc212d9d | |||
| e4c3de8a0a | |||
| 3d97786ae4 | |||
| 00e3238f87 | |||
| 69ac575db4 | |||
| 00fa6ce4e8 | |||
| 7904e364c3 | |||
| 8bb6d1b595 | |||
| 5b2d456093 | |||
| 8b7ec0affa | |||
| 96248a0eac | |||
| dcbabb25dd | |||
| 9fed81cd52 | |||
| 3055c179c4 | |||
| 3e8602af6f | |||
| 9ec7bd7866 | |||
| c576382359 | |||
| 8f82b6fce1 | |||
| b35308f607 | |||
| ada90a6cd3 | |||
| 2b8cd1b1c9 | |||
| 51d310c4ef | |||
| e9645fe03e | |||
| 8bd3600046 | |||
| ac0e929880 | |||
| 9af4348fa0 | |||
| d5bc2633f2 | |||
| dfafcf9ec2 | |||
| 24181d4708 | |||
| e6ff4eb1d6 | |||
| d13eb333bf | |||
| 9386db13df | |||
| 59ad28effc | |||
| 3e11c65ede | |||
| ce613023d2 | |||
| d7487f96d9 | |||
| 7df67747d5 | |||
| 0465b4c1e3 | |||
| 4ef8eae21c | |||
| 042b6c7aea | |||
| 43daf992a5 | |||
| d79ae6f8dd | |||
| 3eb27429fe | |||
| 530bd40794 | |||
| 426de565c3 | |||
| 0bd9c74026 | |||
| f8ea9ac3a0 | |||
| fa9abd9a6e |
@@ -25,26 +25,14 @@ Currently, we only accept patches from the meta-arm mailing list. For general
|
||||
information on how to submit a patch, please read
|
||||
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
|
||||
|
||||
E-mail meta-arm@lists.yoctoproject.org with patches created using this process. You can configure git-send-email to automatically use this address for the meta-arm repository with the following git command:
|
||||
|
||||
$ git config --local --add sendemail.to meta-arm@lists.yoctoproject.org
|
||||
|
||||
Commits and patches added should follow the OpenEmbedded patch guidelines:
|
||||
|
||||
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
|
||||
|
||||
The component being changed in the shortlog should be prefixed with the layer name (without the meta- prefix), for example:
|
||||
|
||||
arm-bsp/trusted-firmware-a: decrease frobbing level
|
||||
|
||||
arm-toolchain/gcc: enable foobar v2
|
||||
E-mail meta-arm@lists.yoctoproject.org with patches created using this process
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
E-mail meta-arm@lists.yoctoproject.org with the error encountered and the steps
|
||||
to reproduce the issue.
|
||||
to reproduce the issue
|
||||
|
||||
|
||||
Maintainer(s)
|
||||
-------------
|
||||
* Jon Mason <jon.mason@arm.com>
|
||||
* Ross Burton <ross.burton@arm.com>
|
||||
|
||||
@@ -88,5 +88,5 @@ would like to contribute, please contact the maintainers
|
||||
|
||||
Maintainer(s)
|
||||
-------------
|
||||
* Diego Sueiro <diego.sueiro@arm.com>
|
||||
* Bertrand Marquis <bertrand.marquis@arm.com>
|
||||
* Filipe Rinaldi <filipe.rinaldi@arm.com>
|
||||
|
||||
@@ -12,11 +12,6 @@ inherit xenguest-image
|
||||
# recipes, the last recipe setting it will prevail.
|
||||
XENGUEST_EXTRA_DTB ??= ""
|
||||
|
||||
# Add a ramdisk file for the guest
|
||||
# Only one file should be added, if this is set multiple times or in several
|
||||
# recipes, the last recipe setting it will prevail.
|
||||
XENGUEST_EXTRA_RAMDISK ??= ""
|
||||
|
||||
# Append something to the guest xen configuration
|
||||
# All files here will be merged together in the final xen configuration
|
||||
# This can contain several files or be used in several recipes
|
||||
@@ -54,13 +49,6 @@ do_deploy_append() {
|
||||
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
|
||||
fi
|
||||
|
||||
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
|
||||
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
|
||||
die "xenguest-image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
|
||||
fi
|
||||
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
|
||||
fi
|
||||
|
||||
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
|
||||
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
|
||||
if [ ! -f $f ]; then
|
||||
|
||||
@@ -58,14 +58,10 @@ XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0
|
||||
# and containing the root filesystem produced by Yocto
|
||||
XENGUEST_IMAGE_DISK_PARTITIONS ??= "1:${XENGUEST_IMAGE_DISK_SIZE}:ext4:rootfs.tar.gz"
|
||||
|
||||
# XENGUEST_IMAGE_NETWORK_TYPE can be set to "bridge", "nat" or "none".
|
||||
# The "bridge" type will share the physical eth interface from dom0 with the
|
||||
# domU. This will allow the domU to have access to the external network.
|
||||
# The "nat" type will setup a virtual network between dom0 and domU and also
|
||||
# configure and run the kea dhcp4 server on dom0 to serve the domU.
|
||||
# The "none" type will not affect any networking setting between on dom0 and
|
||||
# domU.
|
||||
XENGUEST_IMAGE_NETWORK_TYPE ??= "bridge"
|
||||
# XENGUEST_IMAGE_NETWORK_BRIDGE can be set to 1 to have a network interface
|
||||
# on the guest connected to host bridged network. This will provide the guest
|
||||
# with a network interface connected directly to the external network
|
||||
XENGUEST_IMAGE_NETWORK_BRIDGE ??= "1"
|
||||
|
||||
# Sub-directory in wich the guest is created. This is create in deploy as a
|
||||
# subdirectory and must be coherent between all components using this class so
|
||||
@@ -151,10 +147,10 @@ xenguest_image_create() {
|
||||
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=0
|
||||
fi
|
||||
|
||||
if [ -n "${XENGUEST_IMAGE_NETWORK_TYPE}" ]; then
|
||||
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="${XENGUEST_IMAGE_NETWORK_TYPE}"
|
||||
if [ "${XENGUEST_IMAGE_NETWORK_BRIDGE}" = "1" ]; then
|
||||
call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=1
|
||||
else
|
||||
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="none"
|
||||
call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,3 @@ IMAGE_FSTYPES += "xenguest"
|
||||
|
||||
# xenguest kernel extension to handle initramfs
|
||||
KERNEL_CLASSES += "kernel-xenguest"
|
||||
|
||||
IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'docker', \
|
||||
' packagegroup-docker-runtime-minimal', \
|
||||
'', d)}"
|
||||
|
||||
@@ -8,14 +8,3 @@ DISTRO_FEATURES_NATIVE_append = " arm-autonomy-host"
|
||||
# If the kernel image is needed in the rootfs the following should be set from
|
||||
# a bbappend: RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image"
|
||||
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= ""
|
||||
|
||||
# Require extra machine specific settings from meta-arm-bsp dynamic-layers only
|
||||
# if meta-arm-bsp is in the bblayers.conf
|
||||
# Directory for meta-arm-autonomy/dynamic-layers/meta-arm-bsp machine extra settings
|
||||
ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR = "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/conf/machine"
|
||||
ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE ?= \
|
||||
"${ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR}/arm-autonomy-machine-extra-settings.inc"
|
||||
|
||||
require ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-arm-bsp', \
|
||||
'${ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE}' , \
|
||||
'', d)}
|
||||
|
||||
@@ -16,23 +16,19 @@ LAYERDEPENDS_meta-arm-autonomy = " \
|
||||
openembedded-layer \
|
||||
virtualization-layer \
|
||||
"
|
||||
LAYERSERIES_COMPAT_meta-arm-autonomy = "gatesgarth"
|
||||
LAYERSERIES_COMPAT_meta-arm-autonomy = "dunfell"
|
||||
|
||||
# We don't activate virtualization feature from meta-virtualization as it
|
||||
# brings in lots of stuff we don't need. We need to disable the sanity check
|
||||
# otherwise the user will see a warning on each build.
|
||||
SKIP_META_VIRT_SANITY_CHECK = "1"
|
||||
|
||||
ARM_AUTONOMY_LAYERDIR := "${LAYERDIR}"
|
||||
# Directory of our distro config files
|
||||
ARM_AUTONOMY_DISTRO_CFGDIR = "${ARM_AUTONOMY_LAYERDIR}/conf/distro/include/"
|
||||
ARM_AUTONOMY_DISTRO_CFGDIR = "${LAYERDIR}/conf/distro/include/"
|
||||
|
||||
# Add class to handle arm-autonomy distro extensions
|
||||
USER_CLASSES_append = " arm-autonomy-features"
|
||||
|
||||
BBFILES_DYNAMIC += " \
|
||||
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
|
||||
meta-gem5:${LAYERDIR}/dynamic-layers/meta-gem5/*/*/*.bbappend \
|
||||
"
|
||||
# Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
|
||||
ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
|
||||
|
||||
@@ -26,7 +26,6 @@ First you must download the Yocto layers needed:
|
||||
- [poky](https://git.yoctoproject.org/poky)
|
||||
- [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)
|
||||
- [meta-arm](https://git.yoctoproject.org/meta-arm)
|
||||
- [meta-kernel](https://gitlab.com/openembedded/community/meta-kernel.git)
|
||||
- all other layers you might want to use
|
||||
|
||||
For each of the downloaded layer make sure you checkout the release of Yocto
|
||||
@@ -57,9 +56,8 @@ Here are the main steps to create an arm-autonomy project:
|
||||
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
|
||||
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
|
||||
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
|
||||
$LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-kernel \
|
||||
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
|
||||
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
|
||||
$LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
|
||||
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-bsp
|
||||
```
|
||||
|
||||
Example of a `conf/bblayers.conf`:
|
||||
@@ -73,17 +71,12 @@ Here are the main steps to create an arm-autonomy project:
|
||||
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
|
||||
/home/user/arm-autonomy/meta-openembedded/meta-networking \
|
||||
/home/user/arm-autonomy/meta-virtualization \
|
||||
/home/user/arm-autonomy/meta-kernel \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm-autonomy \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm \
|
||||
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
|
||||
"
|
||||
```
|
||||
|
||||
Be aware that changing the order may break some dependencies if editing the
|
||||
config file manually.
|
||||
|
||||
Those steps will have to be done for each project you will have to create.
|
||||
|
||||
Host project
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
Customizing Arm Autonomy Host image layout for N1SDP
|
||||
====================================================
|
||||
|
||||
When buiding with `DISTRO_FEATURES += "arm-autonomy-host"` the user can
|
||||
perform a couple of customizations in the generated wic image:
|
||||
|
||||
1. Set the guest partition size (default: 4iG) via `GUEST_PART_SIZE` and
|
||||
`GUEST_PART_SIZE_UNIT` (M or G) variables to be set in any conf file. The
|
||||
value of these variables should be aligned with the sum of all
|
||||
XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
|
||||
1 MiB per physical volume, hence it needs to be taken into account when
|
||||
setting GUEST_PART_SIZE.
|
||||
|
||||
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 and GRUB_CFG_FILE variables).
|
||||
|
||||
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.
|
||||
|
||||
The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
|
||||
are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
|
||||
|
||||
Other variables can also be custmized to set what files need to be included
|
||||
in the wic image boot partition. Please refer to
|
||||
`meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
|
||||
for more details.
|
||||
@@ -48,16 +48,16 @@ project compilation (those can be set in your project local.conf, for example).
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
|
||||
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
|
||||
xenguest-manager on the device to create LVM disks when guests have a disk
|
||||
configuration.
|
||||
This is set by default to "/dev/sda2".
|
||||
|
||||
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
|
||||
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
|
||||
xenguest-manager will create and use to create guest LVM disks.
|
||||
This is set by default to "vg-xen".
|
||||
|
||||
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
|
||||
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
|
||||
xenguest-manager will look for xenguest images to create during init. That's
|
||||
the place where xenguest images can be added to have them automatically
|
||||
created during next Dom0 boot. The xenguests found there will only be created
|
||||
@@ -65,37 +65,3 @@ The following parameters are available:
|
||||
name).
|
||||
This is set by default to "/usr/share/guests".
|
||||
|
||||
Init scripts
|
||||
------------
|
||||
|
||||
Shell scripts can be executed on the host when a guest is started. Depending on
|
||||
when the script should be executed it should be installed in a different
|
||||
directory on the target:
|
||||
|
||||
- /etc/xenguest/init.pre : Executed first, prior to guest creation
|
||||
|
||||
- /etc/xenguest/init.d : Executed after guest creation, but before it is started
|
||||
|
||||
- /etc/xenguest/init.post : Executed after starting the guest
|
||||
|
||||
Inside the directory, scripts will be executed in alphabetical order.
|
||||
|
||||
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
|
||||
|
||||
- ${guestdir} : The path to the guest directory
|
||||
|
||||
- ${guestcfgfile} : The name of the config file for the starting guest
|
||||
|
||||
- ${LOGFILE} : The file to append any logging to, e.g.
|
||||
echo "Hello, World" >> ${LOGFILE}
|
||||
|
||||
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
|
||||
Where network-bridge.sh is installed from network-bridge.sh.in
|
||||
|
||||
@@ -99,8 +99,6 @@ For a detailed help on available operations, please use:
|
||||
times to add several command line options.
|
||||
- --xen-device-tree=FILE: add dtb FILE as device tree. This both adding the
|
||||
file to the image and modifying the xen configuration to use it.
|
||||
- --xen-ramdisk=FILE: add ramdisk FILE as guest ramdisk. This both adding the
|
||||
file to the image and modifying the xen configuration to use it.
|
||||
- --init-script=FILE: add guest init script. The script is embedded inside the
|
||||
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
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
xenguest network bridge
|
||||
=======================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
xenguest-network-bridge is creating a network bridge to allow some guests to
|
||||
have a direct connection to the external network.
|
||||
To do this, a bridge is created on the host using brctl with the network
|
||||
interfaces added to it so that the bridge is connected to the external network.
|
||||
It is also adding a guest init script which will, for guests configured to use
|
||||
it, create a virtual network interface for the guest and connect it to the
|
||||
network bridge on the host.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
On the host the package xenguest-network-bridge must be included in your image.
|
||||
|
||||
On the xenguest image of your guest, the parameter NETWORK_BRIDGE must be set
|
||||
to 1 (using xenguest-mkimage --set-param=NETWORK_BRIDGE=1).
|
||||
|
||||
Bitbake parameters
|
||||
------------------
|
||||
Several parameters are available to configure the xenguest network bridge
|
||||
during Yocto project compilation (those can be set in your project local.conf,
|
||||
for example).
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network
|
||||
bridge that is created on the host during init.
|
||||
This is set by default to "xenbr0".
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of network
|
||||
interfaces that are added to the bridge when it is created on the host during
|
||||
init.
|
||||
This is set by default to "eth0".
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file
|
||||
to use to configure the bridge network. By default it points to have file
|
||||
configuring the network using dhcp.
|
||||
You can provide a different file using a bbappend and make this variable
|
||||
point to it if you want to customize your network configuration.
|
||||
|
||||
- XENGUEST_IMAGE_NETWORK_BRIDGE: This variable can be set to 0 or 1 on guest
|
||||
projects to enable or not the connection of the guest to the host bridge.
|
||||
This is set by default to "1".
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
Xenguest Network
|
||||
================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The xenguest-network package is primarly creating a network bridge to share
|
||||
the host eth physical interfaces with the guests virtual interfaces (vif).
|
||||
This way the guests can have access to the external network.
|
||||
|
||||
At the moment 3 types of network arrangements are provided:
|
||||
|
||||
- Bridge: where the guest vif is added to the created bridge interface;
|
||||
|
||||
- NAT: where a private subnet is created for the guest,
|
||||
a kea dhcp4 server is started on the host to serve the guest
|
||||
and the proper iptables rules are created
|
||||
to allow the guest to access the external network;
|
||||
|
||||
- None: the guest vif is not connected to the bridge.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
On the host project the package xenguest-network must be included in your
|
||||
image, and on the guest project the XENGUEST_NETWORK_TYPE needs to be set to
|
||||
"bridge", "nat" or "none".
|
||||
|
||||
Bitbake parameters
|
||||
------------------
|
||||
|
||||
Several parameters are available to configure the xenguest network bridge
|
||||
during Yocto project compilation (those can be set in your project local.conf
|
||||
or xenguest-network.bbappend, for example).
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network
|
||||
bridge that is created on the host during init.
|
||||
This is set by default to "xenbr0".
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of the
|
||||
physical network interfaces that are added to the bridge when it is created
|
||||
on the host during init.
|
||||
By default no physical interfaces are added.
|
||||
|
||||
- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file
|
||||
to use to configure the bridge network. By default it points to have file
|
||||
configuring the network using dhcp.
|
||||
You can provide a different file using a bbappend and make this variable
|
||||
point to it if you want to customize your network configuration.
|
||||
|
||||
- XENGUEST_IMAGE_NETWORK_TYPE: This variable can be set to "bridge" (default),
|
||||
"nat" or "none".
|
||||
The **bridge** type will add the domU vif interface to a bridge which also
|
||||
contains the dom0 physical interface giving the guest direct access to the
|
||||
external network.
|
||||
The **nat** type will setup a private network between dom0 and domU, setup
|
||||
the appropriate routing table, configure and run the kea dhcp4 server
|
||||
on dom0 to serve the domU and apply the iptables rules to allow the guest
|
||||
to acess the external network. The kea dhcp4 server configuration for
|
||||
the guest can be customised by replacing the
|
||||
"meta-arm-autonomy/recipes-extended/xenguest/files/kea-subnet4.json" file
|
||||
in a xenguest-network.bbappend. The kea-subnet4.json file is installed in
|
||||
the xenguest image and copied to
|
||||
"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json" when the guest
|
||||
image is created. It will be consumed by the
|
||||
"/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" script which is called by
|
||||
"/etc/xen/scripts/vif-nat" script when starting/stopping the xenguest.
|
||||
After guest start, "/etc/xenguest/init.post/xenguest-network-init-post.sh"
|
||||
script is called to reload kea dhcp4 server with updated configuration,
|
||||
after virtual network interface is ready.
|
||||
In the guest project, the NAT port forward can be customised by changing
|
||||
the XENGUEST_IMAGE_HOST_PORT (default: "1000 + ${domid}") and
|
||||
XENGUEST_IMAGE_GUEST_PORT (default: "22") variables in local.conf or
|
||||
xenguest-base-image.bbappend. This configuration is implemented and installed
|
||||
in "/etc/xenguest/guests/${guestname}/files/00-xenguest-nat-port-forward.hook"
|
||||
script which is called by "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook".
|
||||
The **none** type will not affect any networking setting between on dom0 and
|
||||
domU.
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
# Require extra machine specific settings
|
||||
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE ?= ""
|
||||
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_n1sdp = "n1sdp-extra-settings.inc"
|
||||
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_fvp-base = "fvp-base-extra-settings.inc"
|
||||
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_juno = "juno-extra-settings.inc"
|
||||
|
||||
require ${ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Extra machine settings for fvp-base
|
||||
|
||||
# FVP uses vda as hard drive and partition 2 is the
|
||||
# default rootfs, so use vda3 for guest lvm
|
||||
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/vda3"
|
||||
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
|
||||
@@ -1,4 +0,0 @@
|
||||
# Extra machine settings for juno
|
||||
|
||||
# Juno board has 2 network interfaces, add both of them to the bridge
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
|
||||
@@ -1,40 +0,0 @@
|
||||
# Extra machine settings for n1sdp
|
||||
|
||||
# We need to extent the wks search path to be able to find the wks file set in
|
||||
# ARM_AUTONOMY_WKS_FILE.
|
||||
WKS_SEARCH_PATH_prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
|
||||
|
||||
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-n1sdp-efidisk.wks.in"
|
||||
WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
|
||||
|
||||
# Set the wks guest partition size and unit. It must be aligned with the sum of
|
||||
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
|
||||
# 1 MiB per physical volume, hence it needs to be taken into account when
|
||||
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
|
||||
GUEST_PART_SIZE ?= "4097"
|
||||
GUEST_PART_SIZE_UNIT ?= "M"
|
||||
|
||||
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
|
||||
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
|
||||
|
||||
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
|
||||
# the "/" partition is /dev/sda2.
|
||||
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda3"
|
||||
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
|
||||
|
||||
# The XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables aftect the
|
||||
# xen-devicetree.bb recipe
|
||||
XEN_DEVICETREE_DEPEND = "virtual/trusted-firmware-a:do_deploy"
|
||||
XEN_DEVICETREE_DTBS ?= "n1sdp-single-chip.dtb"
|
||||
# XEN_MOD_DEVICETREE_DTBS are the generated devicetrees for Xen. By default the
|
||||
# xen-devicetree.bb recipe adds '-xen' suffix to it
|
||||
XEN_MOD_DEVICETREE_DTBS ?= "n1sdp-single-chip-xen.dtb"
|
||||
|
||||
# When generating the wic image we need to have the xen deployed
|
||||
do_image_wic[depends] += "xen:do_deploy"
|
||||
|
||||
# Select the extra files to be included in the boot partition
|
||||
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
|
||||
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
|
||||
|
||||
+22
-24
@@ -11,31 +11,29 @@
|
||||
/delete-node/ pmu;
|
||||
/delete-node/ spe-pmu;
|
||||
|
||||
soc {
|
||||
/*
|
||||
* disable IOMMU until we have a proper support in xen
|
||||
*/
|
||||
/delete-node/ iommu@4f000000;
|
||||
/delete-node/ iommu@4f400000;
|
||||
/*
|
||||
* disable IOMMU until we have a proper support in xen
|
||||
*/
|
||||
/delete-node/ iommu@4f000000;
|
||||
/delete-node/ iommu@4f400000;
|
||||
|
||||
/*
|
||||
* Set extra registers required for PCI quirks to communicate with SCP
|
||||
* and remove invalid properties due to removal
|
||||
*/
|
||||
pcie@68000000 {
|
||||
reg = <0 0x68000000 0 0x1200000>,
|
||||
<0 0x06000000 0 0x80000>,
|
||||
<0 0x62000000 0 0x80000>;
|
||||
/delete-property/ msi-map;
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
/*
|
||||
* Set extra registers required for PCI quirks to communicate with SCP
|
||||
* and remove invalid properties due to removal
|
||||
*/
|
||||
pcie@68000000 {
|
||||
reg = <0 0x68000000 0 0x1200000>,
|
||||
<0 0x06000000 0 0x80000>,
|
||||
<0 0x62000000 0 0x80000>;
|
||||
/delete-property/ msi-map;
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
|
||||
pcie@70000000 {
|
||||
reg = <0 0x70000000 0 0x1200000>,
|
||||
<0 0x06000000 0 0x80000>,
|
||||
<0 0x60000000 0 0x80000>;
|
||||
/delete-property/ msi-map;
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
pcie@70000000 {
|
||||
reg = <0 0x70000000 0 0x1200000>,
|
||||
<0 0x06000000 0 0x80000>,
|
||||
<0 0x60000000 0 0x80000>;
|
||||
/delete-property/ msi-map;
|
||||
/delete-property/ iommu-map;
|
||||
};
|
||||
};
|
||||
|
||||
+5
-3
@@ -9,15 +9,17 @@ XEN_DEVICETREE_DTSI_MERGE_append_juno = " xen-juno.dtsi"
|
||||
# Add a dtb snippet to remove pmu and iommu in dom0 on N1SDP
|
||||
SRC_URI_append_n1sdp = " file://xen-n1sdp.dtsi"
|
||||
XEN_DEVICETREE_DTSI_MERGE_append_n1sdp = " xen-n1sdp.dtsi"
|
||||
# For N1SDP, the XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables are
|
||||
# being set in meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
|
||||
|
||||
# Board specific configs
|
||||
XEN_DEVICETREE_DOM0_BOOTARGS_append_juno = " root=/dev/sda1 rootwait"
|
||||
XEN_DEVICETREE_XEN_BOOTARGS_append_juno = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
|
||||
|
||||
XEN_DEVICETREE_DOM0_BOOTARGS_append_n1sdp = " root=/dev/sda2 rootwait"
|
||||
XEN_DEVICETREE_DOM0_BOOTARGS_append_n1sdp = " root=/dev/sda1 rootwait"
|
||||
XEN_DEVICETREE_XEN_BOOTARGS_append_n1sdp = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
|
||||
|
||||
XEN_DEVICETREE_DOM0_BOOTARGS_append_fvp-base = " root=/dev/vda2"
|
||||
XEN_DEVICETREE_XEN_BOOTARGS_append_fvp-base = " console=dtuart dtuart=serial0 bootscrub=0"
|
||||
|
||||
XEN_DEVICETREE_DOM0_BOOTARGS_append_foundation-armv8 = " root=/dev/vda2"
|
||||
XEN_DEVICETREE_XEN_BOOTARGS_append_foundation-armv8 = " console=dtuart dtuart=serial0 bootscrub=0"
|
||||
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From a41feccdb6c03f12bddb4fb650a0465f0ed6eeca Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Juenger <juenger@ice.rwth-aachen.de>
|
||||
Date: Fri, 5 Apr 2019 15:54:04 +0200
|
||||
Subject: [PATCH] xen/arm: Cap the number of interrupt lines for dom0
|
||||
|
||||
Dom0 vGIC will use the same number of interrupt lines as the hardware GIC.
|
||||
While the hardware GIC can support up to 1020 interrupt lines,
|
||||
the vGIC is only supporting up to 992 interrupt lines.
|
||||
This means that Xen will not be able to boot on platforms where the hardware
|
||||
GIC supports more than 992 interrupt lines.
|
||||
While it would make sense to increase the limits in the vGICs, this is not
|
||||
trivial because of the design choices.
|
||||
At the moment, only models seem to report the maximum of interrupt lines.
|
||||
They also do not have any interrupt wired above the 992 limit.
|
||||
So it should be fine to cap the number of interrupt lines for dom0 to 992 lines.
|
||||
|
||||
Signed-off-by: Lukas Juenger <juenger@ice.rwth-aachen.de>
|
||||
Acked-by: Julien Grall <julien.grall@arm.com>
|
||||
---
|
||||
xen/arch/arm/setup.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
|
||||
index 444857a967..ccb0f181ea 100644
|
||||
--- a/xen/arch/arm/setup.c
|
||||
+++ b/xen/arch/arm/setup.c
|
||||
@@ -888,7 +888,13 @@ void __init start_xen(unsigned long boot_phys_offset,
|
||||
/* Create initial domain 0. */
|
||||
/* The vGIC for DOM0 is exactly emulating the hardware GIC */
|
||||
dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
|
||||
- dom0_cfg.arch.nr_spis = gic_number_lines() - 32;
|
||||
+ /*
|
||||
+ * Xen vGIC supports a maximum of 992 interrupt lines.
|
||||
+ * 32 are substracted to cover local IRQs.
|
||||
+ */
|
||||
+ dom0_cfg.arch.nr_spis = min(gic_number_lines(), (unsigned int) 992) - 32;
|
||||
+ if ( gic_number_lines() > 992 )
|
||||
+ printk(XENLOG_WARNING "Maximum number of vGIC IRQs exceeded.\n");
|
||||
dom0_cfg.max_vcpus = dom0_max_vcpus();
|
||||
|
||||
dom0 = domain_create(0, &dom0_cfg, true);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_EARLY_PRINTK_FASTMODEL=y
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Xen/arm 4.12.0 Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARM_64=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Architecture Features
|
||||
#
|
||||
CONFIG_NR_CPUS=128
|
||||
CONFIG_GICV3=y
|
||||
CONFIG_HVM=y
|
||||
# CONFIG_NEW_VGIC is not set
|
||||
CONFIG_SBSA_VUART_CONSOLE=y
|
||||
CONFIG_ARM_SSBD=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
|
||||
#
|
||||
# ARM errata workaround via the alternative framework
|
||||
#
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_ALL_PLAT=y
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_RCAR3 is not set
|
||||
# CONFIG_MPSOC is not set
|
||||
# CONFIG_NO_PLAT is not set
|
||||
CONFIG_ALL64_PLAT=y
|
||||
# CONFIG_ALL32_PLAT is not set
|
||||
CONFIG_MPSOC_PLATFORM=y
|
||||
|
||||
#
|
||||
# Common Features
|
||||
#
|
||||
CONFIG_HAS_ALTERNATIVE=y
|
||||
CONFIG_HAS_DEVICE_TREE=y
|
||||
CONFIG_MEM_ACCESS=y
|
||||
CONFIG_HAS_PDX=y
|
||||
# CONFIG_XSM is not set
|
||||
CONFIG_SCHED_CREDIT=y
|
||||
CONFIG_SCHED_CREDIT2=y
|
||||
CONFIG_SCHED_RTDS=y
|
||||
# CONFIG_SCHED_ARINC653 is not set
|
||||
CONFIG_SCHED_NULL=y
|
||||
CONFIG_SCHED_DEFAULT="credit2"
|
||||
# CONFIG_LIVEPATCH is not set
|
||||
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
|
||||
CONFIG_CMDLINE=""
|
||||
CONFIG_DOM0_MEM=""
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
CONFIG_HAS_NS16550=y
|
||||
CONFIG_HAS_CADENCE_UART=y
|
||||
CONFIG_HAS_MVEBU=y
|
||||
CONFIG_HAS_PL011=y
|
||||
CONFIG_HAS_SCIF=y
|
||||
CONFIG_HAS_PASSTHROUGH=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Xen/arm 4.12.0 Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARM_64=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Architecture Features
|
||||
#
|
||||
CONFIG_NR_CPUS=128
|
||||
CONFIG_GICV3=y
|
||||
CONFIG_HVM=y
|
||||
# CONFIG_NEW_VGIC is not set
|
||||
CONFIG_SBSA_VUART_CONSOLE=y
|
||||
CONFIG_ARM_SSBD=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
|
||||
#
|
||||
# ARM errata workaround via the alternative framework
|
||||
#
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_ALL_PLAT=y
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_RCAR3 is not set
|
||||
# CONFIG_MPSOC is not set
|
||||
# CONFIG_NO_PLAT is not set
|
||||
CONFIG_ALL64_PLAT=y
|
||||
# CONFIG_ALL32_PLAT is not set
|
||||
CONFIG_MPSOC_PLATFORM=y
|
||||
|
||||
#
|
||||
# Common Features
|
||||
#
|
||||
CONFIG_HAS_ALTERNATIVE=y
|
||||
CONFIG_HAS_DEVICE_TREE=y
|
||||
CONFIG_MEM_ACCESS=y
|
||||
CONFIG_HAS_PDX=y
|
||||
# CONFIG_XSM is not set
|
||||
CONFIG_SCHED_CREDIT=y
|
||||
CONFIG_SCHED_CREDIT2=y
|
||||
CONFIG_SCHED_RTDS=y
|
||||
# CONFIG_SCHED_ARINC653 is not set
|
||||
CONFIG_SCHED_NULL=y
|
||||
CONFIG_SCHED_DEFAULT="credit2"
|
||||
# CONFIG_LIVEPATCH is not set
|
||||
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
|
||||
CONFIG_CMDLINE=""
|
||||
CONFIG_DOM0_MEM=""
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
CONFIG_HAS_NS16550=y
|
||||
CONFIG_HAS_CADENCE_UART=y
|
||||
CONFIG_HAS_MVEBU=y
|
||||
CONFIG_HAS_PL011=y
|
||||
CONFIG_HAS_SCIF=y
|
||||
CONFIG_HAS_PASSTHROUGH=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_EARLY_PRINTK_JUNO=y
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Xen/arm 4.12.2 Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARM_64=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Architecture Features
|
||||
#
|
||||
CONFIG_NR_CPUS=128
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_GICV3=y
|
||||
CONFIG_HAS_ITS=y
|
||||
CONFIG_HVM=y
|
||||
# CONFIG_NEW_VGIC is not set
|
||||
CONFIG_SBSA_VUART_CONSOLE=y
|
||||
CONFIG_ARM_SSBD=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
|
||||
#
|
||||
# ARM errata workaround via the alternative framework
|
||||
#
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_ALL_PLAT=y
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_RCAR3 is not set
|
||||
# CONFIG_MPSOC is not set
|
||||
# CONFIG_NO_PLAT is not set
|
||||
CONFIG_ALL64_PLAT=y
|
||||
# CONFIG_ALL32_PLAT is not set
|
||||
CONFIG_MPSOC_PLATFORM=y
|
||||
|
||||
#
|
||||
# Common Features
|
||||
#
|
||||
CONFIG_HAS_ALTERNATIVE=y
|
||||
CONFIG_HAS_DEVICE_TREE=y
|
||||
# CONFIG_MEM_ACCESS is not set
|
||||
CONFIG_HAS_PDX=y
|
||||
# CONFIG_TMEM is not set
|
||||
CONFIG_XSM=y
|
||||
CONFIG_XSM_FLASK=y
|
||||
CONFIG_XSM_FLASK_AVC_STATS=y
|
||||
# CONFIG_XSM_FLASK_POLICY is not set
|
||||
CONFIG_XSM_SILO=y
|
||||
# CONFIG_XSM_DUMMY_DEFAULT is not set
|
||||
# CONFIG_XSM_FLASK_DEFAULT is not set
|
||||
CONFIG_XSM_SILO_DEFAULT=y
|
||||
# CONFIG_ARGO is not set
|
||||
|
||||
#
|
||||
# Schedulers
|
||||
#
|
||||
CONFIG_SCHED_CREDIT=y
|
||||
CONFIG_SCHED_CREDIT2=y
|
||||
CONFIG_SCHED_RTDS=y
|
||||
# CONFIG_SCHED_ARINC653 is not set
|
||||
CONFIG_SCHED_NULL=y
|
||||
# CONFIG_SCHED_CREDIT_DEFAULT is not set
|
||||
CONFIG_SCHED_CREDIT2_DEFAULT=y
|
||||
# CONFIG_SCHED_RTDS_DEFAULT is not set
|
||||
# CONFIG_SCHED_NULL_DEFAULT is not set
|
||||
CONFIG_SCHED_DEFAULT="credit2"
|
||||
# CONFIG_LIVEPATCH is not set
|
||||
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
|
||||
CONFIG_CMDLINE=""
|
||||
CONFIG_DOM0_MEM=""
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
CONFIG_HAS_NS16550=y
|
||||
CONFIG_HAS_CADENCE_UART=y
|
||||
CONFIG_HAS_MVEBU=y
|
||||
CONFIG_HAS_PL011=y
|
||||
CONFIG_HAS_SCIF=y
|
||||
CONFIG_HAS_PASSTHROUGH=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_FRAME_POINTER is not set
|
||||
# CONFIG_COVERAGE is not set
|
||||
# CONFIG_LOCK_PROFILE is not set
|
||||
# CONFIG_PERF_COUNTERS is not set
|
||||
CONFIG_VERBOSE_DEBUG=y
|
||||
# CONFIG_DEVICE_TREE_DEBUG is not set
|
||||
# CONFIG_SCRUB_DEBUG is not set
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_EARLY_UART_CHOICE_PL011=y
|
||||
CONFIG_EARLY_UART_BASE_ADDRESS=0x2a400000
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
CONFIG_EXPERT=y
|
||||
# Enable ACPI support
|
||||
CONFIG_ACPI=y
|
||||
# Enable ARM Interrupt Translation Service (ITS) emulation
|
||||
CONFIG_HAS_ITS=y
|
||||
@@ -1,15 +1,32 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
# Machine specific settings
|
||||
XEN_CONFIG_EARLY_PRINTK_juno = "juno"
|
||||
XEN_CONFIG_EARLY_PRINTK_gem5-arm64 = "vexpress"
|
||||
XEN_CONFIG_EARLY_PRINTK_fvp-base = "fastmodel"
|
||||
XEN_CONFIG_EARLY_PRINTK_foundation-armv8 = "fastmodel"
|
||||
XEN_CONFIG_EARLY_PRINTK_n1sdp = "pl011,0x2a400000"
|
||||
|
||||
# Foundation-armv8 support
|
||||
COMPATIBLE_MACHINE_foundation-armv8 = "foundation-armv8"
|
||||
|
||||
SRC_URI_append_foundation-armv8 = " file://fvp/defconfig"
|
||||
|
||||
# FVP Base support
|
||||
COMPATIBLE_MACHINE_fvp-base = "fvp-base"
|
||||
FILESEXTRAPATHS_prepend_fvp-base := "${THISDIR}/files:"
|
||||
SRC_URI_append_fvp-base = " file://early-printk.cfg"
|
||||
|
||||
SRC_URI_append_fvp-base = " file://fvp/defconfig"
|
||||
|
||||
# Juno support
|
||||
COMPATIBLE_MACHINE_juno = "juno"
|
||||
FILESEXTRAPATHS_prepend_juno := "${THISDIR}/files:"
|
||||
SRC_URI_append_juno = " file://early-printk.cfg"
|
||||
|
||||
SRC_URI_append_juno = " file://juno/defconfig"
|
||||
|
||||
# Gem5 support
|
||||
# Fix problem with number of interrupts on gem5
|
||||
SRC_URI_append_gem5-arm64 = " file://4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch"
|
||||
|
||||
# N1SDP support
|
||||
COMPATIBLE_MACHINE_n1sdp = "n1sdp"
|
||||
FILESEXTRAPATHS_prepend_n1sdp := "${THISDIR}/files:"
|
||||
SRC_URI_append_n1sdp = " file://n1sdp.cfg \
|
||||
file://early-printk.cfg"
|
||||
|
||||
SRC_URI_append_n1sdp = " file://n1sdp/defconfig"
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
# Board specific configuration for the manager
|
||||
|
||||
# FVP and Foundation are using vda as hard drive and partition 2 is the
|
||||
# default rootfs, so use vda3 for guest lvm
|
||||
XENGUEST_MANAGER_VOLUME_DEVICE_foundation-armv8 ?= "/dev/vda3"
|
||||
XENGUEST_MANAGER_VOLUME_DEVICE_fvp-base ?= "/dev/vda3"
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_n1sdp ?= "eth0"
|
||||
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_fvp-base ?= "eth0"
|
||||
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_foundation-armv8 ?= "eth0"
|
||||
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
|
||||
|
||||
# Juno board has 2 network interfaces, add both of them to the bridge
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_juno ?= "eth0 eth1"
|
||||
@@ -12,4 +12,6 @@ LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE = "${@bb.utils.contains_any('DISTRO_FEATURE
|
||||
'arm-autonomy-host arm-autonomy-guest', \
|
||||
' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
|
||||
|
||||
KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
|
||||
KERNEL_FEATURES_append_fvp-base = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
|
||||
KERNEL_FEATURES_append_foundation-armv8 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# short-description: Create an EFI disk image
|
||||
# long-description: Creates a partitioned EFI disk image that the user
|
||||
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
|
||||
|
||||
# First boot partition normally populated as /dev/sda1
|
||||
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
|
||||
|
||||
# Second rootfs partition normally populated as /dev/sda2
|
||||
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
||||
|
||||
# Third partition to accomodate guests images normally populated as /dev/sda3 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
|
||||
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
|
||||
|
||||
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
|
||||
@@ -1,28 +0,0 @@
|
||||
set term="vt100"
|
||||
set default="3"
|
||||
set timeout="5"
|
||||
|
||||
set kernel_cmdline="earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=/dev/sda2 rootwait"
|
||||
|
||||
menuentry 'N1SDP ACPI Boot' {
|
||||
linux /Image $kernel_cmdline acpi=force
|
||||
}
|
||||
|
||||
menuentry 'N1SDP Single-Chip Boot (Device Tree)' {
|
||||
devicetree /n1sdp-single-chip.dtb
|
||||
linux /Image $kernel_cmdline
|
||||
}
|
||||
|
||||
menuentry 'N1SDP Multi-Chip Boot (Device Tree)' {
|
||||
devicetree /n1sdp-multi-chip.dtb
|
||||
linux /Image $kernel_cmdline
|
||||
}
|
||||
|
||||
menuentry 'N1SDP 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
|
||||
devicetree /n1sdp-single-chip-xen.dtb
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_EARLY_PRINTK_VEXPRESS=y
|
||||
@@ -1,4 +0,0 @@
|
||||
# gem5-arm64 support
|
||||
COMPATIBLE_MACHINE_gem5-arm64 = "gem5-arm64"
|
||||
FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}/files:"
|
||||
SRC_URI_append_gem5-arm64 = " file://early-printk.cfg"
|
||||
-1
@@ -1 +0,0 @@
|
||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
|
||||
# Linux kernel with a coredump while trying to access ZEN bit of CPACR1 core
|
||||
# register.
|
||||
# CONFIG_ARM64_SVE is not set
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
define KFEATURE_DESCRIPTION "Disable SVE support"
|
||||
|
||||
kconf non-hardware disable-arm64-sve.cfg
|
||||
@@ -1,15 +0,0 @@
|
||||
FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
|
||||
|
||||
#
|
||||
# arm-autonomy kmeta extra
|
||||
#
|
||||
SRC_URI_append_gem5-arm64 = " file://arm-autonomy-kmeta-extra-gem5;type=kmeta;name=arm-autonomy-kmeta-extra-gem5;destsuffix=arm-autonomy-kmeta-extra-gem5"
|
||||
|
||||
# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
|
||||
# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
|
||||
# register.
|
||||
LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
|
||||
'arm-autonomy-host arm-autonomy-guest', \
|
||||
' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
|
||||
|
||||
KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
|
||||
@@ -1 +0,0 @@
|
||||
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen_boot', '', d)}"
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# Copyright (c) 2020 Arm Limited
|
||||
#
|
||||
|
||||
SUMMARY = "Docker runtime minimal requirements"
|
||||
DESCRIPTION = "The minimal set of packages required for running Docker"
|
||||
|
||||
inherit packagegroup
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
docker-ce \
|
||||
docker-ce-contrib \
|
||||
kernel-module-xt-nat \
|
||||
kernel-module-xt-masquerade \
|
||||
kernel-module-xt-addrtype \
|
||||
kernel-module-xt-conntrack \
|
||||
kernel-module-xt-ipvs \
|
||||
"
|
||||
@@ -39,9 +39,9 @@ ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS ??= ""
|
||||
IMAGE_INSTALL += " \
|
||||
packagegroup-core-boot \
|
||||
packagegroup-core-ssh-openssh \
|
||||
qemu-system-i386 \
|
||||
qemu-xen \
|
||||
xenguest-manager \
|
||||
xenguest-network \
|
||||
xenguest-network-bridge \
|
||||
"
|
||||
|
||||
# Build xen binary
|
||||
@@ -106,14 +106,7 @@ python add_extern_guests () {
|
||||
_, _, path, _, _, parm = bb.fetch.decodeurl(entry)
|
||||
if 'guestname' in parm:
|
||||
if os.path.islink(path):
|
||||
realpath = os.path.realpath(path)
|
||||
|
||||
if not os.path.exists(realpath):
|
||||
bb.fatal("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS link does not resolve: " + path)
|
||||
|
||||
bb.note("Guest file is a symlink:\n " + path + "\nResolved to:\n " + realpath)
|
||||
path = realpath
|
||||
|
||||
bb.fatal("Guest file is a symlink: " + path)
|
||||
bb.utils.mkdirhier(guestdir)
|
||||
dstname = parm['guestname']
|
||||
# Add file extension if not there
|
||||
|
||||
@@ -6,7 +6,13 @@ OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d
|
||||
QEMU_TARGETS_xen = "i386"
|
||||
|
||||
PACKAGECONFIG[noaudio] = "--audio-drv-list='',,"
|
||||
PACKAGECONFIG_append_xen = " noaudio"
|
||||
PACKAGECONFIG_remove_xen = "fdt sdl kvm"
|
||||
PACKAGECONFIG_append_xen = " virtfs noaudio"
|
||||
PACKAGECONFIG_remove_xen = "sdl"
|
||||
|
||||
require ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'recipes-devtools/qemu/${BPN}-package-split.inc', '', d)}
|
||||
# Reduce the qemu package size by splitting it into
|
||||
# qemu and qemu-xen packages
|
||||
PACKAGES_prepend_xen := "${PN}-xen"
|
||||
RDEPENDS_${PN}_xen += "${PN}-xen"
|
||||
FILES_${PN}-xen_xen = "${bindir}/qemu-system-i386"
|
||||
RDEPENDS_${PN}-xen_xen += "xen-tools-libxenstore xen-tools-libxenctrl \
|
||||
xen-tools-libxenguest"
|
||||
|
||||
@@ -38,10 +38,10 @@ do_deploy() {
|
||||
die "xen.dtsi.in does not exist"
|
||||
fi
|
||||
cat ${WORKDIR}/xen.dtsi.in \
|
||||
| sed -e "s?###XEN_DOM0_BOOTARGS###?${XEN_DEVICETREE_DOM0_BOOTARGS}?" \
|
||||
| sed -e "s?###XEN_XEN_BOOTARGS###?${XEN_DEVICETREE_XEN_BOOTARGS}?" \
|
||||
| sed -e "s?###XEN_DOM0_ADDR###?${XEN_DEVICETREE_DOM0_ADDR}?" \
|
||||
| sed -e "s?###XEN_DOM0_SIZE###?${XEN_DEVICETREE_DOM0_SIZE}?" \
|
||||
| sed -e "s,###XEN_DOM0_BOOTARGS###,${XEN_DEVICETREE_DOM0_BOOTARGS}," \
|
||||
| sed -e "s,###XEN_XEN_BOOTARGS###,${XEN_DEVICETREE_XEN_BOOTARGS}," \
|
||||
| sed -e "s,###XEN_DOM0_ADDR###,${XEN_DEVICETREE_DOM0_ADDR}," \
|
||||
| sed -e "s,###XEN_DOM0_SIZE###,${XEN_DEVICETREE_DOM0_SIZE}," \
|
||||
> ${WORKDIR}/xen.dtsi
|
||||
|
||||
# Generate final dtbs
|
||||
|
||||
-40
@@ -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
|
||||
|
||||
-42
@@ -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
|
||||
|
||||
-35
@@ -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
|
||||
|
||||
-51
@@ -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
|
||||
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
From f4c1a541fa351e4f613471bbf397931f9e1ddd27 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f4c1a541fa351e4f613471bbf397931f9e1ddd27.1602683707.git.diego.sueiro@arm.com>
|
||||
From: Wei Chen <wei.chen@arm.com>
|
||||
Date: Fri, 28 Aug 2020 02:34:04 +0000
|
||||
Subject: [PATCH] xen/arm: Throw messages for unknown FP/SIMD implement ID
|
||||
|
||||
Arm ID_AA64PFR0_EL1 register provides two fields to describe CPU
|
||||
FP/SIMD implementations. Currently, we exactly know the meaning of
|
||||
0x0, 0x1 and 0xf of these fields. Xen treats value < 8 as FP/SIMD
|
||||
features presented. If there is a value 0x2 bumped in the future,
|
||||
Xen behaviors for value <= 0x1 can also take effect. But what Xen
|
||||
done for value <= 0x1 may not always cover new value 0x2 required.
|
||||
We throw these messages to break the silence when Xen detected
|
||||
unknown FP/SIMD IDs to notice user to check.
|
||||
|
||||
Signed-off-by: Wei Chen <wei.chen@arm.com>
|
||||
Reviewed-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/setup.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
|
||||
index 7968cee..f16b33f 100644
|
||||
--- a/xen/arch/arm/setup.c
|
||||
+++ b/xen/arch/arm/setup.c
|
||||
@@ -133,6 +133,18 @@ static void __init processor_id(void)
|
||||
cpu_has_simd ? " AdvancedSIMD" : "",
|
||||
cpu_has_gicv3 ? " GICv3-SysReg" : "");
|
||||
|
||||
+ /* Warn user if we find unknown floating-point features */
|
||||
+ if ( cpu_has_fp && (boot_cpu_feature64(fp) >= 2) )
|
||||
+ printk(XENLOG_WARNING "WARNING: Unknown Floating-point ID:%d, "
|
||||
+ "this may result in corruption on the platform\n",
|
||||
+ boot_cpu_feature64(fp));
|
||||
+
|
||||
+ /* Warn user if we find unknown AdvancedSIMD features */
|
||||
+ if ( cpu_has_simd && (boot_cpu_feature64(simd) >= 2) )
|
||||
+ printk(XENLOG_WARNING "WARNING: Unknown AdvancedSIMD ID:%d, "
|
||||
+ "this may result in corruption on the platform\n",
|
||||
+ boot_cpu_feature64(simd));
|
||||
+
|
||||
printk(" Debug Features: %016"PRIx64" %016"PRIx64"\n",
|
||||
boot_cpu_data.dbg64.bits[0], boot_cpu_data.dbg64.bits[1]);
|
||||
printk(" Auxiliary Features: %016"PRIx64" %016"PRIx64"\n",
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
|
||||
|
||||
Setting the hostname is failing because the "$XENBUS_PATH/domain"
|
||||
doesn't exist anymore. To fix this we set it to dom$domid
|
||||
|
||||
Index: git/tools/hotplug/Linux/vif-nat
|
||||
===================================================================
|
||||
--- git.orig/tools/hotplug/Linux/vif-nat
|
||||
+++ git/tools/hotplug/Linux/vif-nat
|
||||
@@ -86,6 +86,7 @@ router_ip=$(routing_ip "$ip")
|
||||
vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
|
||||
|
||||
hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
|
||||
+[ -z "${hostname}" ] && hostname=dom$domid
|
||||
if [ "$vifid" != "1" ]
|
||||
then
|
||||
hostname="$hostname-$vifid"
|
||||
@@ -1,9 +0,0 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI += "file://0001-vif-nat-fix-hostname.patch \
|
||||
"
|
||||
|
||||
PACKAGECONFIG_remove = "\
|
||||
${@bb.utils.contains('DISTRO_FEATURES', \
|
||||
'arm-autonomy-host', \
|
||||
'sdl', '', d)}"
|
||||
@@ -1,9 +1,14 @@
|
||||
#
|
||||
# Define early console based on board parameters
|
||||
#
|
||||
|
||||
XEN_CONFIG_EARLY_PRINTK ??= "disable"
|
||||
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('XEN_CONFIG_EARLY_PRINTK', 'disable', \
|
||||
'', ' CONFIG_DEBUG=y CONFIG_EARLY_PRINTK=${XEN_CONFIG_EARLY_PRINTK}',d)}"
|
||||
|
||||
# Make Xen machine specific
|
||||
# This ensures that sstate is properly handled and that each machine can have
|
||||
# its own configuration
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
PACKAGECONFIG_remove = "\
|
||||
${@bb.utils.contains('DISTRO_FEATURES', \
|
||||
'arm-autonomy-host', \
|
||||
'sdl', '', d)}"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
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 \
|
||||
"
|
||||
@@ -1,138 +0,0 @@
|
||||
#============================================================================
|
||||
# ${XEN_SCRIPT_DIR}/vif-post.d/00-vif-xenguest.hook
|
||||
#
|
||||
# Script for performing local configuration of a vif.
|
||||
# This script will be sourced by, e.g., vif-bridge after the hotplugging
|
||||
# system calls vif-bridge. The script is here and not simply executed as
|
||||
# a udev rule because this allows simple access to several environment
|
||||
# variables set by the calling vif-* script.
|
||||
#
|
||||
# Environment vars:
|
||||
# command (add|remove|online|offline)
|
||||
# dev vif interface name (required).
|
||||
# main_ip IP address of Dom0
|
||||
# ip list of IP networks for the vif, space-separated
|
||||
# XENBUS_PATH path to this device's details in the XenStore (required).
|
||||
#============================================================================
|
||||
|
||||
domid=$(xenstore_read "${XENBUS_PATH}/frontend-id")
|
||||
guestname=$(xenstore_read "/local/domain/${domid}/name")
|
||||
bridge=$(xenstore_read "${XENBUS_PATH}/bridge")
|
||||
mac=$(xenstore_read "$XENBUS_PATH/mac")
|
||||
kea_conf_file="/etc/kea/kea-dhcp4.conf"
|
||||
|
||||
if [ ! -f /etc/xenguest/guests/${guestname}/params.cfg ]; then
|
||||
log debug "No /etc/xenguest/guests/${guestname}/params.cfg. Exiting."
|
||||
return
|
||||
fi
|
||||
|
||||
# Source the params file to get the choosen XENGUEST_NETWORK_TYPE
|
||||
. /etc/xenguest/guests/${guestname}/params.cfg
|
||||
|
||||
# We need to get the xenguest subnet prefix to set the subnet and
|
||||
# the fixed ip to assing to the guest.
|
||||
get_subnet_prefix() {
|
||||
# ${vif_ip} is set in the vif-nat script
|
||||
echo ${vif_ip} | awk -F. '{print $1"."$2"."$3}'
|
||||
}
|
||||
|
||||
subnetprefix=$(get_subnet_prefix)
|
||||
|
||||
kea_remove_conf_entry()
|
||||
{
|
||||
log debug "kea_remove_conf_entry"
|
||||
claim_lock "vif-nat-kea"
|
||||
|
||||
# Remove the the xenguest kea config file inclusion in the kea main config
|
||||
sed -i "/${kea_guest_config//'/'/'\/'}/d" "${kea_conf_file}"
|
||||
|
||||
# Remove interface entry 1st case: [ "dev1", "dev_to_remove" ]
|
||||
sed -i "s/,\ \"$dev\"//" "${kea_conf_file}"
|
||||
# Remove interface entry 2nd case: [ "dev_to_remove", "dev1" ]
|
||||
sed -i "s/\"$dev\",\ //" "${kea_conf_file}"
|
||||
# Remove interface entry 3rd case: [ "dev_to_remove" ]
|
||||
sed -i "s/\[\ \"$dev\"\ \]/\[\ \]/" "${kea_conf_file}"
|
||||
|
||||
# Remove the generated the xenguest kea subnet conf file
|
||||
rm ${XENGUEST_KEA_SUBNET_CONFIG}
|
||||
|
||||
keactrl reload
|
||||
|
||||
release_lock "vif-nat-kea"
|
||||
}
|
||||
|
||||
kea_add_conf_entries()
|
||||
{
|
||||
log debug "kea_add_conf_entries"
|
||||
claim_lock "vif-nat-kea"
|
||||
|
||||
# Include vif in the interfaces 1st case - no other entries:
|
||||
search_for='\"interfaces\": \[ '
|
||||
sed -i "/${search_for}\"*\"\ */ s/\ \]/,\ \"${dev}\"\ \]/g" "${kea_conf_file}"
|
||||
sed -i "s/${search_for}]/${search_for}\"${dev}\"\ \]/g" "${kea_conf_file}"
|
||||
|
||||
# Include the xenguest kea subnet conf file in the kea main config
|
||||
search_for='\"subnet4\": \['
|
||||
sed -i "/$search_for/a $kea_guest_config" "${kea_conf_file}"
|
||||
|
||||
# Generate the xenguest kea subnet conf file
|
||||
echo -e "$(eval "echo -e \"$(cat ${XENGUEST_KEA_SUBNET_TEMPLATE})\"")" \
|
||||
> "${XENGUEST_KEA_SUBNET_CONFIG}"
|
||||
|
||||
release_lock "vif-nat-kea"
|
||||
}
|
||||
|
||||
call_extra_hooks() {
|
||||
for f in /etc/xenguest/guests/${guestname}/files/*.hook; do
|
||||
if [ -x "$f" ]; then
|
||||
log info "Executing $f"
|
||||
. "$f"
|
||||
if [ $? -ne 0 ]; then
|
||||
log err "$f failed."
|
||||
fi
|
||||
else
|
||||
log info "$f is not executable. Skipping."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
case "${XENGUEST_NETWORK_TYPE}" in
|
||||
nat)
|
||||
XENGUEST_KEA_SUBNET_TEMPLATE=${XENGUEST_KEA_SUBNET_TEMPLATE:-"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json"}
|
||||
if [ ! -f ${XENGUEST_KEA_SUBNET_TEMPLATE} ]; then
|
||||
log debug "No ${XENGUEST_KEA_SUBNET_TEMPLATE} file. Aborting"
|
||||
return
|
||||
fi
|
||||
|
||||
XENGUEST_KEA_SUBNET_CONFIG="/etc/kea/kea-subnet4.dom$domid.json"
|
||||
if [ ! -d "$(dirname ${XENGUEST_KEA_SUBNET_CONFIG})" ]; then
|
||||
log debug "No kea configuration directory. Aborting"
|
||||
return
|
||||
fi
|
||||
kea_guest_config="\ \ \ \ <?include \"${XENGUEST_KEA_SUBNET_CONFIG}\"?>"
|
||||
|
||||
case "$command" in
|
||||
online)
|
||||
kea_add_conf_entries
|
||||
|
||||
# Enable ip forwarding and NAT for the ${bridge} interface
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
iptables_w -t nat -A POSTROUTING -o ${bridge} -j MASQUERADE -m comment --comment "dom${domid}"
|
||||
;;
|
||||
offline)
|
||||
kea_remove_conf_entry
|
||||
|
||||
# Remove the NAT iptables rules created for the dom${domid}
|
||||
guest_ipt_rule=$(iptables_w -t nat -vL POSTROUTING -n --line-number | grep -w dom${domid} | awk '{print $1}' | tac)
|
||||
for rule in ${guest_ipt_rule}; do iptables_w -t nat --delete POSTROUTING ${rule}; done
|
||||
|
||||
# If there is no more NAT iptables rules we disable ip forwarding
|
||||
ipt_nat_rules=$(iptables_w -t nat -vL POSTROUTING -n --line-number | grep MASQUERADE | awk '{print $1}')
|
||||
[ -z "${ipt_nat_rules##*[!0-9]*}" ] && sysctl -w net.ipv4.ip_forward=0
|
||||
;;
|
||||
esac
|
||||
|
||||
# We might have extra configs to be applied (e.g.: NAT port forward).
|
||||
call_extra_hooks
|
||||
;;
|
||||
esac
|
||||
@@ -1,48 +0,0 @@
|
||||
#============================================================================
|
||||
# /etc/xenguest/guests/${guestname}/files/00-xenguest-nat-port-forward.hook
|
||||
#
|
||||
# Script for performing local configuration related to NAT port forwarding of
|
||||
# a vif.
|
||||
# This script will be sourced by
|
||||
# /etc/xen/scripts/vif-post.d/00-vif-xenguest.hook when
|
||||
# XENGUEST_IMAGE_NETWORK_TYPE="nat".
|
||||
# The ${bridge} and ${domid} are set in the 00-vif-xenguest.hook context,
|
||||
# and ${vip_if} in the vif-nat script context.
|
||||
#
|
||||
# Environment vars:
|
||||
# command (add|remove|online|offline)
|
||||
# dev vif interface name (required).
|
||||
# main_ip IP address of Dom0
|
||||
# ip list of IP networks for the vif, space-separated
|
||||
# XENBUS_PATH path to this device's details in the XenStore (required).
|
||||
#============================================================================
|
||||
|
||||
host_port="###HOST_PORT###"
|
||||
guest_port="###GUEST_PORT###"
|
||||
|
||||
port_num_check() {
|
||||
if [ ${host_port} -gt 65535 -o ${guest_port} -gt 65535 ]; then
|
||||
log error "host_port=${host_port} or guest_port=${guest_port} greater than 65535."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
case "${command}" in
|
||||
online)
|
||||
port_num_check
|
||||
if [ $? -eq 0 ]; then
|
||||
iptables_w -t nat -A PREROUTING -i ${bridge} -p tcp \
|
||||
--dport ${host_port} -j DNAT \
|
||||
--to-destination ${vif_ip}:${guest_port} \
|
||||
-m comment --comment "dom${domid}"
|
||||
fi
|
||||
;;
|
||||
offline)
|
||||
# Remove the NAT iptables rules created for the dom${domid}
|
||||
guest_ipt_rule=$(iptables_w -t nat -vL PREROUTING -n --line-number \
|
||||
| grep -w dom${domid} | awk '{print $1}' | tac)
|
||||
for rule in ${guest_ipt_rule}; \
|
||||
do iptables_w -t nat --delete PREROUTING ${rule}; done
|
||||
;;
|
||||
esac
|
||||
@@ -1,30 +0,0 @@
|
||||
# This file holds the minimal kea dhcp4 server configuration.
|
||||
# It replaces existing kea dhcp configuration file via
|
||||
# "/etc/init.d/kea-restore-default-config" on every system boot.
|
||||
# The "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" called in the end of
|
||||
# the vif-nat script will append each xenguest configuration to this file,
|
||||
# to generate the final dhcp configuration.
|
||||
# This file can be replaced with xenguest-network.bbappend.
|
||||
{
|
||||
"Dhcp4": {
|
||||
"interfaces-config": {
|
||||
"interfaces": [ ]
|
||||
},
|
||||
"lease-database": {
|
||||
"type": "memfile",
|
||||
"persist": false
|
||||
},
|
||||
"subnet4": [
|
||||
{
|
||||
"subnet": "192.0.2.0/24"
|
||||
}
|
||||
],
|
||||
"loggers": [
|
||||
{
|
||||
"name": "kea-dhcp4",
|
||||
"output_options": [ { "output": "/var/log/kea-dhcp4.log" } ],
|
||||
"severity": "INFO"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Xenguest Restore default kea dhcp4 configuration
|
||||
# This script restores a dhcp4 server configuration, to prevent
|
||||
# kea startup failures after random board hangs or powercuts.
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
ret=$(keactrl status | grep -i "dhcpv4 server" | cut -d ' ' -f 3)
|
||||
if [ "$ret" = "active" ]; then
|
||||
echo "WARNING: cowardly refusing to replace dhcp4 configuration"
|
||||
echo "kea dhcp4 server is up and running!"
|
||||
else
|
||||
echo "Resetting kea dhcp4 configuration."
|
||||
cp -f /etc/kea/kea-dhcp4.conf.original /etc/kea/kea-dhcp4.conf
|
||||
fi
|
||||
;;
|
||||
status|stop|reload|force-reload|restart)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
# do not advertise unreasonable commands that there is no reason
|
||||
# to use with this device
|
||||
echo $"Usage: $0 {start|stop|status|restart|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -1,35 +0,0 @@
|
||||
# This file holds the guest kea dhcp4 server options running on Dom0.
|
||||
# The "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" called in the end of
|
||||
# the vif-nat script will use this file to generate the final dhcp
|
||||
# configuration.
|
||||
|
||||
# This file is added in the xenguest image and installed in dom0 under
|
||||
# /etc/xenguest/guests/${guestname}/files/kea-subnet4.json when the guest
|
||||
# image is created.
|
||||
# Any customizations to it should be performed by replacing it via a bbappend.
|
||||
|
||||
# The \${vif_ip} and \${router_ip} variables are set in
|
||||
# the vif-nat script context. The \${subnetprefix} and \${mac} variable are set in the
|
||||
# 00-vif-xenguest.hook script context.
|
||||
|
||||
# The "subnet" configuration node is mandatory in order to have the dhcp
|
||||
# properly running.
|
||||
{
|
||||
\"subnet\": \"${subnetprefix}.0/24\",
|
||||
\"option-data\": [
|
||||
{
|
||||
\"name\": \"routers\",
|
||||
\"data\": \"${router_ip}\"
|
||||
},
|
||||
{
|
||||
\"name\": \"domain-name-servers\",
|
||||
\"data\": \"8.8.8.8, 8.8.4.4\"
|
||||
}
|
||||
],
|
||||
\"reservations\": [
|
||||
{
|
||||
\"hw-address\": \"${mac}\",
|
||||
\"ip-address\": \"${vif_ip}\"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1,21 +1,15 @@
|
||||
#!/bin/sh
|
||||
# This script is setting up a virtual network interface connected to the
|
||||
# xenguest-network-bridge if NETWORK_BRIDGE is set to 1 in the guest params
|
||||
#
|
||||
# Since this script is sourced by xenguest-manager, it can access variables
|
||||
# such as ${guestname} from the parent file's scope, as well as those in
|
||||
# params.cfg, for example XENGUEST_NETWORK_TYPE
|
||||
|
||||
guestname="${1}"
|
||||
|
||||
BRIDGE_NAME="###BRIDGE_NAME###"
|
||||
|
||||
case "${XENGUEST_NETWORK_TYPE:=}" in
|
||||
nat)
|
||||
echo "vif = ['script=vif-nat']" >> ${guestcfgfile}
|
||||
;;
|
||||
bridge)
|
||||
echo "vif = ['script=vif-bridge,bridge=${BRIDGE_NAME}']" >> ${guestcfgfile}
|
||||
;;
|
||||
*)
|
||||
echo "${@}: XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
|
||||
;;
|
||||
esac
|
||||
# get guest parameters
|
||||
. ./params.cfg
|
||||
|
||||
if [ "${NETWORK_BRIDGE:-}" = "1" ]; then
|
||||
echo "vif = ['${BRIDGE_NAME}']" >> ${guestname}.cfg
|
||||
fi
|
||||
|
||||
|
||||
@@ -465,21 +465,16 @@ function xenguest_guest_start()
|
||||
guestname="${1}"
|
||||
guestdir=${XENGUEST_CONF_BASE}/guests/${guestname}
|
||||
|
||||
guestcfgfile=$(mktemp -u "${guestname}.XXXXXX" --tmpdir="${guestdir}" --suffix=".cfg")
|
||||
|
||||
# Get guest configuration
|
||||
source ${guestdir}/params.cfg
|
||||
|
||||
pushd ${guestdir} > /dev/null 2>&1
|
||||
|
||||
# create config by merging all configurations together
|
||||
cat guest.cfg $(find guest.d -type f 2> /dev/null) > ${guestcfgfile}
|
||||
cat guest.cfg $(find guest.d -type f 2> /dev/null) > ${guestname}.cfg
|
||||
|
||||
# Build init script lists (ignore non existing dirs errors,
|
||||
# sort alphabetically and run global scripts first)
|
||||
#
|
||||
# These scripts are sourced throughout the start operation if they
|
||||
# are executable
|
||||
init_pre="$(find ${XENGUEST_CONF_BASE}/init.pre -type f 2> /dev/null | \
|
||||
sort) $(find ${guestdir}/init.pre -type f 2> /dev/null | sort)"
|
||||
init_d="$(find ${XENGUEST_CONF_BASE}/init.d -type f 2> /dev/null | \
|
||||
@@ -489,26 +484,21 @@ function xenguest_guest_start()
|
||||
|
||||
# call pre init scripts
|
||||
for f in ${init_pre}; do
|
||||
if [ -x "$f" ]; then
|
||||
echo "( . $f )" >> ${LOGFILE} 2>&1
|
||||
( . $f ) >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestcfgfile}
|
||||
popd > /dev/null 2>&1
|
||||
echo "Error in init script $f" >> ${LOGFILE} 2>&1
|
||||
echo "${PREF} Error during pre init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$f is not executable. Skipping." >> ${LOGFILE}
|
||||
echo "$f ${guestname}" >> ${LOGFILE} 2>&1
|
||||
$f ${guestname} >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestname}.cfg
|
||||
popd > /dev/null 2>&1
|
||||
echo "${PREF} Error during pre init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Create non started guest
|
||||
echo "xl create -p ${guestcfgfile}" >> ${LOGFILE} 2>&1
|
||||
xl create -p ${guestcfgfile} >> ${LOGFILE} 2>&1
|
||||
echo "xl create -p ${guestname}.cfg" >> ${LOGFILE} 2>&1
|
||||
xl create -p ${guestname}.cfg >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestcfgfile}
|
||||
rm -f ${guestname}.cfg
|
||||
popd > /dev/null 2>&1
|
||||
echo "${PREF} Error starting ${guestname}"
|
||||
exit 1
|
||||
@@ -516,20 +506,15 @@ function xenguest_guest_start()
|
||||
|
||||
# call init scripts
|
||||
for f in ${init_d}; do
|
||||
if [ -x "$f" ]; then
|
||||
echo "( . $f )" >> ${LOGFILE} 2>&1
|
||||
( . $f ) >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestcfgfile}
|
||||
echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl destroy ${guestname} >> ${LOGFILE} 2>&1
|
||||
popd > /dev/null 2>&1
|
||||
echo "Error in init script $f" >> ${LOGFILE} 2>&1
|
||||
echo "${PREF} Error during init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$f is not executable. Skipping." >> ${LOGFILE}
|
||||
echo "$f ${guestname}" >> ${LOGFILE} 2>&1
|
||||
$f ${guestname} >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestname}.cfg
|
||||
echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl destroy ${guestname} >> ${LOGFILE} 2>&1
|
||||
popd > /dev/null 2>&1
|
||||
echo "${PREF} Error during init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -537,7 +522,7 @@ function xenguest_guest_start()
|
||||
echo "xl unpause ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl unpause ${guestname} >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestcfgfile}
|
||||
rm -f ${guestname}.cfg
|
||||
popd > /dev/null 2>&1
|
||||
echo "${PREF} Error starting ${guestname}"
|
||||
exit 1
|
||||
@@ -545,24 +530,19 @@ function xenguest_guest_start()
|
||||
|
||||
# call post init scripts
|
||||
for f in ${init_post}; do
|
||||
if [ -x "$f" ]; then
|
||||
echo "( . $f )" >> ${LOGFILE} 2>&1
|
||||
( . $f ) >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestcfgfile}
|
||||
echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl destroy ${guestname} >> ${LOGFILE} 2>&1
|
||||
popd > /dev/null 2>&1
|
||||
echo "Error in init script $f" >> ${LOGFILE} 2>&1
|
||||
echo "${PREF} Error during post init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$f is not executable. Skipping." >> ${LOGFILE}
|
||||
echo "$f ${guestname}" >> ${LOGFILE} 2>&1
|
||||
$f ${guestname} >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -f ${guestname}.cfg
|
||||
echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl destroy ${guestname} >> ${LOGFILE} 2>&1
|
||||
popd > /dev/null 2>&1
|
||||
echo "${PREF} Error during post init script of ${guestname}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f ${guestcfgfile}
|
||||
rm -f ${guestname}.cfg
|
||||
popd > /dev/null 2>&1
|
||||
}
|
||||
|
||||
@@ -597,22 +577,11 @@ function check_guest_exist()
|
||||
fi
|
||||
}
|
||||
|
||||
function xl_list_contains()
|
||||
{
|
||||
guestname="${1}"
|
||||
# Select first column of xl list, and find guestname exactly using regex
|
||||
running=$(xl list | awk 'NR > 1 {print $1}' | grep "^${guestname}$" || echo)
|
||||
if [ "${running}" = "${guestname}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function check_guest_running()
|
||||
{
|
||||
guestname="${1}"
|
||||
if ! xl_list_contains $guestname; then
|
||||
running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" || echo)
|
||||
if [ ! "${running}" = "${guestname}" ]; then
|
||||
echo "${PREF} Guest ${guestname} is not running"
|
||||
exit 1
|
||||
fi
|
||||
@@ -621,7 +590,8 @@ function check_guest_running()
|
||||
function check_guest_not_running()
|
||||
{
|
||||
guestname="${1}"
|
||||
if xl_list_contains $guestname; then
|
||||
running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" || echo)
|
||||
if [ "${running}" = "${guestname}" ]; then
|
||||
echo "${PREF} Guest ${guestname} is running"
|
||||
exit 1
|
||||
fi
|
||||
@@ -678,8 +648,10 @@ case ${cmd} in
|
||||
guestname="${arg1:-}"
|
||||
check_guest_arg ${cmd} ${guestname}
|
||||
check_guest_exist ${guestname}
|
||||
# We need to stop the guest first if it is running
|
||||
if xl_list_contains $guestname; then
|
||||
# We need to stop the guest first
|
||||
running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" \
|
||||
|| echo)
|
||||
if [ "${running}" = "${guestname}" ]; then
|
||||
echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1
|
||||
xl destroy ${guestname} >> ${LOGFILE} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -727,25 +699,20 @@ case ${cmd} in
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
|
||||
single_status() (
|
||||
guestname="${1}"
|
||||
guestname="${arg1}"
|
||||
if [ -n "${guestname}" ]; then
|
||||
check_guest_exist ${guestname}
|
||||
if xl_list_contains $guestname; then
|
||||
if xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" > \
|
||||
/dev/null 2>&1; then
|
||||
echo "${guestname}: Running"
|
||||
else
|
||||
echo "${guestname}: Stopped"
|
||||
fi
|
||||
)
|
||||
|
||||
guestname="${arg1}"
|
||||
if [ -n "${guestname}" ]; then
|
||||
single_status ${guestname}
|
||||
else
|
||||
guestlist=$($this list)
|
||||
if [ -n "${guestlist}" ]; then
|
||||
for f in ${guestlist}; do
|
||||
single_status $f
|
||||
$this status $f
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -82,9 +82,6 @@ Xen configuration for the guest
|
||||
--xen-device-tree= disable device tree parameter in xen configuration
|
||||
--xen-device-tree=FILE set guest device tree in xen configuration and add
|
||||
file to xen files
|
||||
--xen-ramdisk= disable ramdisk parameter in xen configuration
|
||||
--xen-ramdisk=FILE set guest ramdisk in xen configuration and add
|
||||
file to xen files
|
||||
--xen-disk= disable disk parameter in xen configuration
|
||||
--xen-disk=DEV set guest disk to device DEV (phy:DEV,xvda,w is set)
|
||||
--xen-append=FILE append FILE content to xen configuration
|
||||
@@ -671,20 +668,6 @@ for arg in "${@}"; do
|
||||
install -m 644 ${optarg} ${IMAGE_TMPDIR}/files/guest.dtb
|
||||
fi
|
||||
;;
|
||||
--xen-ramdisk=*)
|
||||
if [ -z "${optarg}" ]; then
|
||||
xen_config_disable_param "ramdisk"
|
||||
rm -f ${IMAGE_TMPDIR}/files/ramdisk.img
|
||||
else
|
||||
if [ ! -f ${optarg} ]; then
|
||||
echo "Error: invalid ramdisk file ${optarg}"
|
||||
exit 1
|
||||
fi
|
||||
xen_config_set_string "ramdisk" "files/ramdisk.img"
|
||||
mkdir -p ${IMAGE_TMPDIR}/files
|
||||
install -m 644 ${optarg} ${IMAGE_TMPDIR}/files/ramdisk.img
|
||||
fi
|
||||
;;
|
||||
--xen-disk=*)
|
||||
if [ -z "${optarg}" ]; then
|
||||
xen_config_disable_param "disk"
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This script is to reload kea dhcp4 server when guest interface will be ready
|
||||
|
||||
# include locking functions
|
||||
. /etc/xen/scripts/locking.sh
|
||||
set +u
|
||||
|
||||
# $1 is vif name, e.g. "vif/15/0"
|
||||
# returns 0 on success,
|
||||
# 1 otherwize
|
||||
#
|
||||
|
||||
check_if_vif_is_ready() {
|
||||
ret=($(xl network-list "${guestname}" | grep "${1}"))
|
||||
# ${ret[4]} is network interface status value
|
||||
# 1 means vif is not ready
|
||||
# 4 means vif is ready
|
||||
[ "${ret[4]}" = "4" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
case "${XENGUEST_NETWORK_TYPE:-}" in
|
||||
nat)
|
||||
vif_name="$(xl network-list ${guestname} | grep -o vif.*)"
|
||||
|
||||
for try in {1..20}
|
||||
do
|
||||
if check_if_vif_is_ready "${vif_name}"; then
|
||||
claim_lock "vif-nat-kea"
|
||||
keactrl reload
|
||||
release_lock "vif-nat-kea"
|
||||
exit 0
|
||||
fi
|
||||
echo "Waiting for ${vif_name} - network interface is not ready..."\
|
||||
" try #${try}" >> "${LOGFILE}" 2>&1
|
||||
sleep 1
|
||||
done
|
||||
echo "ERROR: Failed to get ${vif_name} "\
|
||||
"network interface ready!" >> "${LOGFILE}" 2>&1
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "No action needed" >> "${LOGFILE}" 2>&1
|
||||
;;
|
||||
esac
|
||||
@@ -23,16 +23,6 @@ LICENSE = "MIT"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
# When XENGUEST_IMAGE_NETWORK_TYPE="nat", the "00-xenguest-nat-port-forward.hook"
|
||||
# is called by "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" to apply NAT
|
||||
# port forwarding. Both dom0 and domU ports can be be set by changing the
|
||||
# XENGUEST_IMAGE_HOST_PORT and XENGUEST_IMAGE_GUEST_PORT variables in local.conf
|
||||
# or xenguest-base-image.bbappend. The XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT
|
||||
# can also be replaced in a xenguest-base-image.bbappend
|
||||
XENGUEST_IMAGE_HOST_PORT ?= "\$( expr 1000 + \${domid} )"
|
||||
XENGUEST_IMAGE_GUEST_PORT ?= "22"
|
||||
XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT ?= "00-xenguest-nat-port-forward.hook"
|
||||
|
||||
#
|
||||
# The following variables can contain SRC_URI compatible entries to add
|
||||
# files to the xenguest image.
|
||||
@@ -45,18 +35,7 @@ XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT ?= "00-xenguest-nat-port-forward.hook"
|
||||
XENGUEST_IMAGE_SRC_URI_DISK_FILES ??= ""
|
||||
|
||||
# Add xen files
|
||||
# Any extrafiles files to be added to XENGUEST_IMAGE_SRC_URI_XEN_FILES should
|
||||
# be performed via XENGUEST_IMAGE_SRC_URI_XEN_FILES_append.
|
||||
# The kea-subnet4.json holds the kea dhcp4 subnet configuration for Dom0.
|
||||
# And it is used when XENGUEST_IMAGE_NETWORK_TYPE="nat".
|
||||
# Any customizations to it should be performed by replacing it
|
||||
# via a xenguest-network.bbappend.
|
||||
# The XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT file is only added if the
|
||||
# variable is set.
|
||||
XENGUEST_IMAGE_SRC_URI_XEN_FILES = "file://kea-subnet4.json \
|
||||
${@ "file://" + d.getVar('XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT') \
|
||||
if d.getVar('XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT') else "" } \
|
||||
"
|
||||
XENGUEST_IMAGE_SRC_URI_XEN_FILES ??= ""
|
||||
|
||||
# Add xen configuration elements
|
||||
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG ??= ""
|
||||
@@ -98,8 +77,8 @@ python __anonymous() {
|
||||
|
||||
# Make sure we are removing old files before redoing a fetch
|
||||
do_fetch[cleandirs] += "${WORKDIR}/extend"
|
||||
do_fetch[vardeps] += "XENGUEST_IMAGE_HOST_PORT XENGUEST_IMAGE_GUEST_PORT"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
do_install[noexec] = "1"
|
||||
|
||||
@@ -123,15 +102,6 @@ add_extend_files() {
|
||||
fi
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
if [ -f ${WORKDIR}/extend/files/${XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT} ]; then
|
||||
sed -i "s,###HOST_PORT###,${XENGUEST_IMAGE_HOST_PORT}," \
|
||||
${WORKDIR}/extend/files/${XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT}
|
||||
sed -i "s,###GUEST_PORT###,${XENGUEST_IMAGE_GUEST_PORT}," \
|
||||
${WORKDIR}/extend/files/${XENGUEST_IMAGE_NAT_PORT_FORWARD_SCRIPT}
|
||||
fi
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
# Create a new image
|
||||
xenguest_image_create
|
||||
|
||||
+5
-44
@@ -1,5 +1,5 @@
|
||||
# Recipe to handle xenguest network configuration
|
||||
DESCRIPTION = "Xenguest Network"
|
||||
DESCRIPTION = "XenGuest Network Bridge"
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
@@ -20,23 +20,12 @@ SRC_URI = " \
|
||||
file://xenguest-network-bridge.in \
|
||||
file://xenguest-network-bridge-dhcp.cfg.in \
|
||||
file://network-bridge.sh.in \
|
||||
file://00-vif-xenguest.hook \
|
||||
file://xenguest-network-init-post.sh \
|
||||
file://kea-dhcp4.conf \
|
||||
file://kea-restore-default-config \
|
||||
"
|
||||
PACKAGES =+ "${PN}-kea-dhcp4"
|
||||
|
||||
# Bridge configurator needs to run before S01networking init script
|
||||
# Prefix with a_ to make sure it is executed in runlevel 01 before others
|
||||
INITSCRIPT_PACKAGES = "${PN} ${PN}-kea-dhcp4"
|
||||
INITSCRIPT_NAME_${PN} = "a_xenguest-network-bridge"
|
||||
INITSCRIPT_PARAMS_${PN} = "defaults 01"
|
||||
|
||||
# Kea configuration needs to be restored before kea init scripts:
|
||||
# Kea dhcp4 server is 30, so lets use 20, to have higher priority
|
||||
INITSCRIPT_NAME_${PN}-kea-dhcp4 = "kea-restore-default-config"
|
||||
INITSCRIPT_PARAMS_${PN}-kea-dhcp4 = "defaults 20"
|
||||
INITSCRIPT_NAME = "a_xenguest-network-bridge"
|
||||
INITSCRIPT_PARAMS = "defaults 01"
|
||||
|
||||
inherit update-rc.d
|
||||
|
||||
@@ -53,43 +42,15 @@ do_install() {
|
||||
> ${WORKDIR}/network-bridge.sh
|
||||
install -d -m 755 ${D}${sysconfdir}/init.d
|
||||
install -m 755 ${WORKDIR}/xenguest-network-bridge \
|
||||
${D}${sysconfdir}/init.d/${INITSCRIPT_NAME_${PN}}
|
||||
${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
install -d -m 755 ${D}${sysconfdir}/network/interfaces.d
|
||||
install -m 755 ${WORKDIR}/xenguest-network-bridge.cfg \
|
||||
${D}${sysconfdir}/network/interfaces.d/.
|
||||
install -d -m 755 ${D}${sysconfdir}/xenguest/init.pre
|
||||
install -m 755 ${WORKDIR}/network-bridge.sh \
|
||||
${D}${sysconfdir}/xenguest/init.pre/.
|
||||
|
||||
install -d ${D}${sysconfdir}/xen/scripts/vif-post.d
|
||||
install -m 755 ${WORKDIR}/00-vif-xenguest.hook \
|
||||
${D}${sysconfdir}/xen/scripts/vif-post.d/.
|
||||
|
||||
install -d -m 755 ${D}${sysconfdir}/xenguest/init.post
|
||||
install -m 755 ${WORKDIR}/xenguest-network-init-post.sh \
|
||||
${D}${sysconfdir}/xenguest/init.post/.
|
||||
|
||||
install -m 755 ${WORKDIR}/kea-restore-default-config \
|
||||
${D}${sysconfdir}/init.d/.
|
||||
install -d -m 755 ${D}${sysconfdir}/kea/
|
||||
install -m 755 ${WORKDIR}/kea-dhcp4.conf \
|
||||
${D}${sysconfdir}/kea/kea-dhcp4.conf.original
|
||||
}
|
||||
|
||||
RDEPENDS_${PN} += "bridge-utils \
|
||||
iptables \
|
||||
kea \
|
||||
${PN}-kea-dhcp4 \
|
||||
kernel-module-xt-tcpudp \
|
||||
kernel-module-xt-physdev \
|
||||
kernel-module-xt-comment \
|
||||
kernel-module-xt-nat \
|
||||
kernel-module-xt-masquerade \
|
||||
"
|
||||
RDEPENDS_${PN} += "bridge-utils"
|
||||
FILES_${PN} += "${sysconfdir}/network/interfaces.d/xenguest-network-bridge.cfg"
|
||||
FILES_${PN} += "${sysconfdir}/xenguest/init.pre/network-bridge.sh"
|
||||
FILES_${PN} += "${sysconfdir}/xen/scripts/vif-post.d/00-vif-xenguest.hook"
|
||||
|
||||
FILES_${PN}-kea-dhcp4 = "${sysconfdir}/kea/kea-dhcp4.conf.original"
|
||||
FILES_${PN}-kea-dhcp4 += "${sysconfdir}/init.d/${INITSCRIPT_NAME_${PN}-kea-dhcp4}"
|
||||
FILES_${PN}-kea-dhcp4 += "${sysconfdir}/xenguest/init.post/xenguest-network-init-post.sh"
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
From f88af7229f6f22ce7313c11a0bbb9c88317b7c5e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f88af7229f6f22ce7313c11a0bbb9c88317b7c5e.1602759709.git.diego.sueiro@arm.com>
|
||||
From: Stefano Stabellini <stefano.stabellini@xilinx.com>
|
||||
Date: Thu, 24 Sep 2020 16:49:55 -0700
|
||||
Subject: [PATCH] xen/arm: do not setup the runstate info page if kpti is
|
||||
enabled
|
||||
|
||||
The VCPUOP_register_runstate_memory_area hypercall takes a virtual
|
||||
address of a buffer as a parameter. The semantics of the hypercall are
|
||||
such that the virtual address should always be valid.
|
||||
|
||||
When KPTI is enabled and we are running userspace code, the virtual
|
||||
address is not valid, thus, Linux is violating the semantics of
|
||||
VCPUOP_register_runstate_memory_area.
|
||||
|
||||
Do not call VCPUOP_register_runstate_memory_area when KPTI is enabled.
|
||||
|
||||
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
|
||||
CC: Bertrand Marquis <Bertrand.Marquis@arm.com>
|
||||
CC: boris.ostrovsky@oracle.com
|
||||
CC: jgross@suse.com
|
||||
Link: https://lore.kernel.org/r/20200924234955.15455-1-sstabellini@kernel.org
|
||||
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
|
||||
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
|
||||
---
|
||||
arch/arm/include/asm/xen/page.h | 5 +++++
|
||||
arch/arm/xen/enlighten.c | 6 ++++--
|
||||
arch/arm64/include/asm/xen/page.h | 6 ++++++
|
||||
3 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
|
||||
index 31bbc80..dc7f6e9 100644
|
||||
--- a/arch/arm/include/asm/xen/page.h
|
||||
+++ b/arch/arm/include/asm/xen/page.h
|
||||
@@ -1 +1,6 @@
|
||||
#include <xen/arm/page.h>
|
||||
+
|
||||
+static inline bool xen_kernel_unmapped_at_usr(void)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
|
||||
index e93145d..ea76562 100644
|
||||
--- a/arch/arm/xen/enlighten.c
|
||||
+++ b/arch/arm/xen/enlighten.c
|
||||
@@ -158,7 +158,8 @@ static int xen_starting_cpu(unsigned int cpu)
|
||||
BUG_ON(err);
|
||||
per_cpu(xen_vcpu, cpu) = vcpup;
|
||||
|
||||
- xen_setup_runstate_info(cpu);
|
||||
+ if (!xen_kernel_unmapped_at_usr())
|
||||
+ xen_setup_runstate_info(cpu);
|
||||
|
||||
after_register_vcpu_info:
|
||||
enable_percpu_irq(xen_events_irq, 0);
|
||||
@@ -387,7 +388,8 @@ static int __init xen_guest_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- xen_time_setup_guest();
|
||||
+ if (!xen_kernel_unmapped_at_usr())
|
||||
+ xen_time_setup_guest();
|
||||
|
||||
if (xen_initial_domain())
|
||||
pvclock_gtod_register_notifier(&xen_pvclock_gtod_notifier);
|
||||
diff --git a/arch/arm64/include/asm/xen/page.h b/arch/arm64/include/asm/xen/page.h
|
||||
index 31bbc80..dffdc77 100644
|
||||
--- a/arch/arm64/include/asm/xen/page.h
|
||||
+++ b/arch/arm64/include/asm/xen/page.h
|
||||
@@ -1 +1,7 @@
|
||||
#include <xen/arm/page.h>
|
||||
+#include <asm/mmu.h>
|
||||
+
|
||||
+static inline bool xen_kernel_unmapped_at_usr(void)
|
||||
+{
|
||||
+ return arm64_kernel_unmapped_at_el0();
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_PID_NS=y
|
||||
CONFIG_IPC_NS=y
|
||||
CONFIG_UTS_NS=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_VETH=y
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_NETFILTER=y
|
||||
CONFIG_IP_NF_FILTER=m
|
||||
CONFIG_IP_NF_NAT=m
|
||||
CONFIG_NF_NAT=m
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||
CONFIG_IP_VS=y
|
||||
CONFIG_NETFILTER_XT_MATCH_IPVS=m
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
define KFEATURE_DESCRIPTION "Minimal Kernel configs for Docker runtime"
|
||||
|
||||
include features/netfilter/netfilter.scc
|
||||
|
||||
kconf non-hardware docker-minimal.cfg
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_XEN=y
|
||||
|
||||
CONFIG_BLOCK=y
|
||||
|
||||
CONFIG_SCSI=y
|
||||
|
||||
CONFIG_NET=y
|
||||
|
||||
CONFIG_HVC_IRQ=y
|
||||
|
||||
CONFIG_HVC_XEN=y
|
||||
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XEN_WDT=y
|
||||
|
||||
CONFIG_XEN_BALLOON=y
|
||||
|
||||
CONFIG_XEN_DEV_EVTCHN=y
|
||||
|
||||
CONFIG_XENFS=y
|
||||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
|
||||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
|
||||
CONFIG_XEN_GNTDEV=y
|
||||
CONFIG_XEN_GRANT_DEV_ALLOC=y
|
||||
CONFIG_SWIOTLB_XEN=y
|
||||
|
||||
CONFIG_XEN_EFI=y
|
||||
CONFIG_XEN_AUTO_XLATE=y
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
define KFEATURE_DESCRIPTION "Common XEN (Host and Guest) configs and patches on autonomy systems"
|
||||
|
||||
kconf non-hardware xen-common.cfg
|
||||
|
||||
patch 0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch
|
||||
+26
@@ -1,15 +1,27 @@
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_XEN=y
|
||||
|
||||
CONFIG_BLOCK=y
|
||||
CONFIG_XEN_BLKDEV_FRONTEND=y
|
||||
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_XEN_SCSI_FRONTEND=y
|
||||
|
||||
CONFIG_NET=y
|
||||
CONFIG_XEN_NETDEV_FRONTEND=y
|
||||
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
||||
|
||||
CONFIG_HVC_IRQ=y
|
||||
|
||||
CONFIG_HVC_XEN=y
|
||||
CONFIG_HVC_XEN_FRONTEND=y
|
||||
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XEN_WDT=y
|
||||
|
||||
CONFIG_FB_SYS_FILLRECT=y
|
||||
CONFIG_FB_SYS_COPYAREA=y
|
||||
CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
@@ -17,7 +29,21 @@ CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_XEN_FBDEV_FRONTEND=y
|
||||
|
||||
CONFIG_XEN_BALLOON=y
|
||||
|
||||
CONFIG_XEN_DEV_EVTCHN=y
|
||||
|
||||
CONFIG_XENFS=y
|
||||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
|
||||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
CONFIG_XEN_XENBUS_FRONTEND=y
|
||||
CONFIG_XEN_GNTDEV=y
|
||||
CONFIG_XEN_GRANT_DEV_ALLOC=y
|
||||
CONFIG_SWIOTLB_XEN=y
|
||||
|
||||
CONFIG_XEN_EFI=y
|
||||
CONFIG_XEN_AUTO_XLATE=y
|
||||
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_XEN=y
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
define KFEATURE_DESCRIPTION "Enable XEN Guest Frontend Drivers"
|
||||
|
||||
kconf non-hardware xen-guest.cfg
|
||||
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
#
|
||||
# Not directly sourced via a kernel type but via an external bb
|
||||
#
|
||||
|
||||
define KFEATURE_DESCRIPTION "Enable netfilter + conn tracking + extras"
|
||||
define KFEATURE_COMPATIBILITY all
|
||||
|
||||
include features/netfilter/netfilter.scc
|
||||
kconf non-hardware netfilter-extra.cfg
|
||||
+28
@@ -1,10 +1,38 @@
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_XEN=y
|
||||
|
||||
CONFIG_BLOCK=y
|
||||
CONFIG_XEN_BLKDEV_BACKEND=y
|
||||
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_TARGET_CORE=y
|
||||
CONFIG_XEN_SCSI_BACKEND=y
|
||||
|
||||
CONFIG_NET=y
|
||||
CONFIG_XEN_NETDEV_BACKEND=y
|
||||
|
||||
CONFIG_HVC_IRQ=y
|
||||
|
||||
CONFIG_HVC_XEN=y
|
||||
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_XEN_WDT=y
|
||||
|
||||
CONFIG_XEN_BALLOON=y
|
||||
|
||||
CONFIG_XEN_DEV_EVTCHN=y
|
||||
|
||||
CONFIG_XENFS=y
|
||||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
|
||||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
CONFIG_XEN_GNTDEV=y
|
||||
CONFIG_XEN_GRANT_DEV_ALLOC=y
|
||||
CONFIG_SWIOTLB_XEN=y
|
||||
|
||||
CONFIG_XEN_EFI=y
|
||||
CONFIG_XEN_AUTO_XLATE=y
|
||||
|
||||
# For LVM2 we need Multiple Devices and Device Mapper support
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
define KFEATURE_DESCRIPTION "Enable XEN Host Drivers on autonomy systems"
|
||||
|
||||
kconf non-hardware xen-host.cfg
|
||||
|
||||
|
||||
@@ -7,29 +7,16 @@ FILESEXTRAPATHS_prepend := "${THISDIR}:"
|
||||
#
|
||||
SRC_URI_append = " file://arm-autonomy-kmeta;type=kmeta;name=arm-autonomy-kmeta;destsuffix=arm-autonomy-kmeta"
|
||||
|
||||
# Add common Xen (host and guest) configs and patches
|
||||
KERNEL_FEATURES += "${@bb.utils.contains_any('DISTRO_FEATURES', \
|
||||
'arm-autonomy-host arm-autonomy-guest', \
|
||||
'features/arm-autonomy/xen-common.scc', '', d)}"
|
||||
|
||||
|
||||
# Add xen host drivers to kernel if arm-autonomy-host is activated
|
||||
KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \
|
||||
'arm-autonomy-host', \
|
||||
'features/arm-autonomy/xen-host.scc \
|
||||
features/arm-autonomy/xen-host-iptables.scc', \
|
||||
'', d)}"
|
||||
|
||||
'arm-autonomy-host', 'features/arm-autonomy/xen-host.scc', '', d)}"
|
||||
|
||||
# Add xen guest drivers to kernel if arm-autonomy-guest is activated
|
||||
KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \
|
||||
'arm-autonomy-guest', 'features/arm-autonomy/xen-guest.scc', '', d)}"
|
||||
|
||||
|
||||
# Add support for arm64-autonomy-guest machine
|
||||
COMPATIBLE_MACHINE_arm64-autonomy-guest = "arm64-autonomy-guest"
|
||||
KMACHINE_arm64-autonomy-guest = "arm64-autonomy-guest"
|
||||
|
||||
# Add Minimal Kernel Configs for Docker runtime
|
||||
KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \
|
||||
'docker', 'features/arm-autonomy/docker-minimal.scc', '', d)}"
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# The empty wic plugin is used to create unformatted empty partitions for wic
|
||||
# images.
|
||||
# To use it you must pass "empty" as argument for the "--source" parameter in
|
||||
# the wks file. For example:
|
||||
# part foo --source empty --ondisk sda --size="1024" --align 1024
|
||||
|
||||
import logging
|
||||
|
||||
from wic.pluginbase import SourcePlugin
|
||||
|
||||
logger = logging.getLogger('wic')
|
||||
|
||||
class EmptyPartitionPlugin(SourcePlugin):
|
||||
"""
|
||||
Populate unformatted empty partition.
|
||||
"""
|
||||
|
||||
name = 'empty'
|
||||
|
||||
@classmethod
|
||||
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||
oe_builddir, bootimg_dir, kernel_dir,
|
||||
rootfs_dir, native_sysroot):
|
||||
"""
|
||||
Called to do the actual content population for a partition i.e. it
|
||||
'prepares' the partition to be incorporated into the image.
|
||||
"""
|
||||
return
|
||||
@@ -9,12 +9,5 @@ BBFILE_COLLECTIONS += "meta-arm-bsp"
|
||||
BBFILE_PATTERN_meta-arm-bsp = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-arm-bsp = "6"
|
||||
|
||||
LAYERSERIES_COMPAT_meta-arm-bsp = "gatesgarth"
|
||||
|
||||
LAYERDEPENDS_meta-arm-bsp = "core meta-arm meta-kernel"
|
||||
# This won't be used by layerindex-fetch, but works everywhere else
|
||||
LAYERDEPENDS_meta-arm-bsp_append_musca-b1 = " meta-python"
|
||||
LAYERDEPENDS_meta-arm-bsp_append_musca-s1 = " meta-python"
|
||||
|
||||
# Additional license directories.
|
||||
LICENSE_PATH += "${LAYERDIR}/custom-licenses"
|
||||
LAYERDEPENDS_meta-arm-bsp = "core openembedded-layer meta-arm meta-kernel"
|
||||
LAYERSERIES_COMPAT_meta-arm-bsp = "warrior zeus dunfell"
|
||||
|
||||
@@ -16,6 +16,8 @@ SERIAL_CONSOLES = "115200;ttyAMA0"
|
||||
|
||||
IMAGE_FSTYPES += "tar.bz2 cpio.gz"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "u-boot"
|
||||
|
||||
# Cortex-a5 u-boot configuration
|
||||
UBOOT_MACHINE = "designstart_ca5_defconfig"
|
||||
UBOOT_IMAGE_ENTRYPOINT = "0x84000000"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: corstone700-fvp machine
|
||||
#@DESCRIPTION: Machine configuration for Corstone700 FVP
|
||||
|
||||
require conf/machine/include/corstone700.inc
|
||||
|
||||
# default feature used: eth_lan91c111
|
||||
# add the following line to local.conf to disable the feature:
|
||||
# MACHINE_FEATURES_remove = "eth_lan91c111"
|
||||
MACHINE_FEATURES += "eth_lan91c111"
|
||||
|
||||
TFA_TARGET_PLATFORM = "fvp"
|
||||
@@ -1,17 +0,0 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: corstone700-mps3 machine
|
||||
#@DESCRIPTION: Machine configuration for Corstone700 MPS3
|
||||
|
||||
require conf/machine/include/corstone700.inc
|
||||
|
||||
# default feature used: eth_lan9115
|
||||
# add the following line to local.conf to disable the feature:
|
||||
# MACHINE_FEATURES_remove = "eth_lan9115"
|
||||
MACHINE_FEATURES += "eth_lan9115"
|
||||
|
||||
# default feature used: usb_host
|
||||
# add the following line to local.conf to disable the feature:
|
||||
# MACHINE_FEATURES_remove = "usb_host"
|
||||
MACHINE_FEATURES += "usb_host"
|
||||
|
||||
TFA_TARGET_PLATFORM = "fpga"
|
||||
@@ -4,14 +4,11 @@
|
||||
#@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"
|
||||
require conf/machine/fvp-common/fvp.inc
|
||||
|
||||
KERNEL_DEVICETREE = "arm/foundation-v8-gicv3-psci.dtb"
|
||||
|
||||
# Use haveged as a source of entropy instead of rng-tools (Needed for ssh).
|
||||
# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time.
|
||||
PACKAGE_EXCLUDE_append = " rng-tools"
|
||||
IMAGE_INSTALL_append = " haveged"
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Configuration for Armv7-A Base Platform FVP
|
||||
|
||||
#@TYPE: Machine
|
||||
#@NAME: Armv7-A Base Platform FVP machine
|
||||
#@DESCRIPTION: Machine configuration for Armv7-A Base Platform FVP model
|
||||
|
||||
require conf/machine/fvp-common.inc
|
||||
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"
|
||||
|
||||
KERNEL_DEVICETREE = "arm/fvp-base-gicv3-psci-custom.dtb"
|
||||
@@ -4,14 +4,11 @@
|
||||
#@NAME: Armv8-A Base Platform FVP machine
|
||||
#@DESCRIPTION: Machine configuration for Armv8-A Base Platform FVP 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"
|
||||
require conf/machine/fvp-common/fvp.inc
|
||||
|
||||
KERNEL_DEVICETREE = "arm/fvp-base-gicv3-psci-custom.dtb"
|
||||
|
||||
# Use haveged as a source of entropy instead of rng-tools (Needed for ssh).
|
||||
# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time.
|
||||
PACKAGE_EXCLUDE_append = " rng-tools"
|
||||
IMAGE_INSTALL_append = " haveged"
|
||||
|
||||
+10
-7
@@ -1,12 +1,18 @@
|
||||
# FVP common parameters
|
||||
|
||||
#
|
||||
# Capturing FVP common configurations (Armv8-A Base Platform FVP,
|
||||
# Armv8-A Foundation Platform and Armv7-A Base Platform FVP).
|
||||
# Capturing FVP common configurations (Armv8-A Base Platform FVP and
|
||||
# Armv8-A Foundation Platform).
|
||||
#
|
||||
|
||||
TUNE_FEATURES = "aarch64"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8a.inc
|
||||
|
||||
MACHINE_FEATURES = "optee"
|
||||
|
||||
KERNEL_IMAGETYPE = "Image"
|
||||
|
||||
IMAGE_CLASSES += "image_types_disk_img"
|
||||
IMAGE_FSTYPES += "disk.img"
|
||||
|
||||
@@ -33,8 +39,5 @@ PREFERRED_VERSION_linux-yocto ?= "5.4%"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
|
||||
|
||||
# As this is a virtual target that will not be used in the real world there is
|
||||
# no need for real SSH keys. Disable rng-tools (which takes too long to
|
||||
# initialise) and install the pre-generated keys.
|
||||
PACKAGECONFIG_remove_pn-openssh = "rng-tools"
|
||||
MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys"
|
||||
# FVP u-boot configuration
|
||||
UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
|
||||
@@ -47,8 +47,7 @@ GEM5_RUN_CMDLINE = ""
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "gem5-aarch64-native"
|
||||
|
||||
# As this is a virtual target that will not be used in the real world there is
|
||||
# no need for real SSH keys. Disable rng-tools (which takes too long to
|
||||
# initialise) and install the pre-generated keys.
|
||||
PACKAGECONFIG_remove_pn-openssh = "rng-tools"
|
||||
MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys"
|
||||
# Use haveged as a source of entropy instead of rng-tools (Needed for ssh).
|
||||
# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time.
|
||||
PACKAGE_EXCLUDE_append = " rng-tools"
|
||||
IMAGE_INSTALL_append = " haveged"
|
||||
@@ -1,19 +0,0 @@
|
||||
# Tuning for ARMV6-m defined in ARM v6-M ArchitectureReference Manual
|
||||
# at https://static.docs.arm.com/ddi0419/d/DDI0419D_armv6m_arm.pdf
|
||||
DEFAULTTUNE ?= "armv6m"
|
||||
|
||||
TUNEVALID[armv6m] = "Enable instructions for ARMv6-m"
|
||||
TUNECONFLICTS[armv6m] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
# Use armv6s-m instead of armv6-m to avoid gcc bug "SVC is not permitted on this architecture".
|
||||
# SVC is a valid instruction.
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', ' -march=armv6s-m', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', 'armv6m:', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv5.inc
|
||||
|
||||
# Little Endian
|
||||
AVAILTUNES += "armv6m"
|
||||
ARMPKGARCH_tune-armv6m = "armv6m"
|
||||
TUNE_FEATURES_tune-armv6m = "armv6m"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv6m = "armv6m"
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Defaults for ARMv7e-m
|
||||
#
|
||||
DEFAULTTUNE ?= "armv7em"
|
||||
|
||||
TUNEVALID[armv7em] = "Enable instructions for ARMv7e-m"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7em', ' -march=armv7e-m', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7em', 'armv7em:', '', d)}"
|
||||
|
||||
TUNECONFLICTS[armv7em] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
require conf/machine/include/arm/arch-armv7m.inc
|
||||
|
||||
AVAILTUNES += "armv7em"
|
||||
ARMPKGARCH_tune-armv7em = "armv7em"
|
||||
TUNE_FEATURES_tune-armv7em = "armv7em"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7em = "armv7em"
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Defaults for ARMv7-m
|
||||
#
|
||||
DEFAULTTUNE ?= "armv7m"
|
||||
|
||||
TUNEVALID[armv7m] = "Enable instructions for ARMv7-m"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7-m', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '', d)}"
|
||||
|
||||
TUNECONFLICTS[armv7m] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
require conf/machine/include/arm/arch-armv6m.inc
|
||||
|
||||
AVAILTUNES += "armv7m"
|
||||
ARMPKGARCH_tune-armv7m = "armv7m"
|
||||
TUNE_FEATURES_tune-armv7m = "armv7m"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7m = "armv7m"
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
#
|
||||
# Defaults for ARMv8.1-M.main
|
||||
#
|
||||
DEFAULTTUNE ?= "armv8-1m-main"
|
||||
|
||||
TUNEVALID[armv8-1m-main] = "Enable instructions for ARMv8.1-m.main"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-1m-main', ' -march=armv8.1-m.main', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-1m-main', 'armv8-1m-main:', '', d)}"
|
||||
|
||||
TUNECONFLICTS[armv8-1m-main] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8m-main.inc
|
||||
|
||||
AVAILTUNES += "armv8-1m-main"
|
||||
ARMPKGARCH_tune-armv8-1m-main = "armv8-1m-main"
|
||||
TUNE_FEATURES_tune-armv8-1m-main = "armv8-1m-main"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8-1m-main = "armv8-1m-main"
|
||||
@@ -1,18 +0,0 @@
|
||||
DEFAULTTUNE ?= "armv8-2a"
|
||||
|
||||
TUNEVALID[armv8-2a] = "Enable instructions for ARMv8-a"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-2a', ' -march=armv8.2-a', '', d)}"
|
||||
# TUNE crypto will be handled by arch-armv8a.inc below
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-2a', 'armv8-2a:', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8a.inc
|
||||
|
||||
AVAILTUNES += "armv8-2a armv8-2a-crypto"
|
||||
ARMPKGARCH_tune-armv8-2a ?= "armv8-2a"
|
||||
ARMPKGARCH_tune-armv8-2a-crypto ?= "armv8-2a"
|
||||
TUNE_FEATURES_tune-armv8-2a = "aarch64 armv8-2a"
|
||||
TUNE_FEATURES_tune-armv8-2a-crypto = "${TUNE_FEATURES_tune-armv8-2a} crypto"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8-2a = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-2a"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8-2a-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8-2a} armv8-2a-crypto"
|
||||
BASE_LIB_tune-armv8-2a = "lib64"
|
||||
BASE_LIB_tune-armv8-2a-crypto = "lib64"
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Defaults for ARMv8-m.base
|
||||
#
|
||||
DEFAULTTUNE ?= "armv8m-base"
|
||||
|
||||
TUNEVALID[armv8m-base] = "Enable instructions for ARMv8-m.base"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-base', ' -march=armv8-m.base', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-base', 'armv8m-base:', '', d)}"
|
||||
|
||||
TUNECONFLICTS[armv8m-base] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
require conf/machine/include/arm/arch-armv7m.inc
|
||||
|
||||
AVAILTUNES += "armv8m-base"
|
||||
ARMPKGARCH_tune-armv8m-base = "armv8m-base"
|
||||
TUNE_FEATURES_tune-armv8m-base = "armv8m-base"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8m-base = "armv8m-base"
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Defaults for ARMv8-m.main
|
||||
#
|
||||
DEFAULTTUNE ?= "armv8m-main"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8m-base.inc
|
||||
|
||||
TUNEVALID[armv8m-main] = "Enable instructions for ARMv8-m.main"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-main', ' -march=armv8-m.main${MARCH_DSP}${MARCH_FPU}', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-main', 'armv8m-main:', '', d)}"
|
||||
|
||||
TUNECONFLICTS[armv8m-main] = "armv4 armv5 armv6 armv7a"
|
||||
|
||||
# FIXME - below taken from meta/conf/machine/include/arm/arch-armv5-dsp.inc and should be put into something more generic
|
||||
TUNEVALID[dsp] = "ARM DSP functionality"
|
||||
ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], 'e', '', d)}"
|
||||
MARCH_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], '+dsp', '+nodsp', d)}"
|
||||
|
||||
# FIXME - Below belongs in meta/conf/machine/include/arm/feature-arm-neon.inc
|
||||
TUNEVALID[vfpv5spd16] = "Enable Vector Floating Point Version 5, Single Precision. with 16 registers (fpv5-sp-d16) unit."
|
||||
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv5spd16', 'fpv5-sp-d16', '', d)}"
|
||||
MARCH_FPU = "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv5spd16' ], '+fp', '+nofp', d)}"
|
||||
|
||||
AVAILTUNES += "armv8m-main armv8m-mainearmv8m-main-vfpv5spd16 armv8m-maine-vfpv5spd16"
|
||||
ARMPKGARCH_tune-armv8m-main = "armv8m-main"
|
||||
ARMPKGARCH_tune-armv8m-maine = "armv8m-main"
|
||||
ARMPKGARCH_tune-armv8m-main-vfpv5spd16 = "armv8m-main"
|
||||
ARMPKGARCH_tune-armv8m-maine-vfpv5spd16 = "armv8m-main"
|
||||
TUNE_FEATURES_tune-armv8m-main = "armv8m-main"
|
||||
TUNE_FEATURES_tune-armv8m-maine = "${TUNE_FEATURES_tune-armv8m-main} dsp"
|
||||
TUNE_FEATURES_tune-armv8m-main-vfpv5spd16 = "${TUNE_FEATURES_tune-armv8m-main} vfpv5spd16"
|
||||
TUNE_FEATURES_tune-armv8m-maine-vfpv5spd16 = "${TUNE_FEATURES_tune-armv8m-main-vfpv5spd16} dsp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8m-main = "armv8m-main"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8m-maine = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-maine"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8m-main-vfpv5spd16 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-main-fpv5-spd16"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv8m-maine-vfpv5spd16 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-maine-fpv5-spd16"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Common configuration for all Corstone700 machines
|
||||
|
||||
require conf/machine/include/tune-cortexa32.inc
|
||||
|
||||
MACHINEOVERRIDES =. "corstone700:"
|
||||
|
||||
TFA_PLATFORM = "corstone700"
|
||||
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel_corstone700 = "linux-stable"
|
||||
PREFERRED_VERSION_linux-stable ?= "5.6%"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
|
||||
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "scp-firmware"
|
||||
PREFERRED_VERSION_control-processor-firmware ?= "2.6.0"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += " \
|
||||
virtual/trusted-firmware-a \
|
||||
external-system \
|
||||
u-boot \
|
||||
virtual/control-processor-firmware \
|
||||
"
|
||||
|
||||
WKS_FILE_DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}"
|
||||
|
||||
WKS_FILE ?= "arm-reference-image.corstone700.wks"
|
||||
|
||||
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
|
||||
|
||||
UBOOT_MACHINE ?= "corstone700_defconfig"
|
||||
PREFERRED_VERSION_u-boot ?= "2020.04"
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Tune Settings for Cortex-M0
|
||||
#
|
||||
DEFAULTTUNE ?= "cortexm0"
|
||||
|
||||
TUNEVALID[cortexm0] = "Enable Cortex-M0 specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm0', ' -mcpu=cortex-m0', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv6m.inc
|
||||
|
||||
AVAILTUNES += "cortexm0"
|
||||
ARMPKGARCH_tune-cortexm0 = "cortexm0"
|
||||
TUNE_FEATURES_tune-cortexm0 = "${TUNE_FEATURES_tune-armv6m} cortexm0"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm0 = "${PACKAGE_EXTRA_ARCHS_tune-armv6m} cortexm0"
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Tune Settings for Cortex-M0+
|
||||
#
|
||||
DEFAULTTUNE ?= "cortexm0-plus"
|
||||
|
||||
TUNEVALID[cortexm0-plus] = "Enable Cortex-M0 Plus specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm0-plus', ' -mcpu=cortex-m0plus', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv6m.inc
|
||||
|
||||
AVAILTUNES += "cortexm0-plus"
|
||||
ARMPKGARCH_tune-cortexm0-plus = "cortexm0-plus"
|
||||
TUNE_FEATURES_tune-cortexm0-plus = "${TUNE_FEATURES_tune-armv6m} cortexm0-plus"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm0-plus = "${PACKAGE_EXTRA_ARCHS_tune-armv6m} cortexm0-plus"
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Tune Settings for Cortex-M1
|
||||
#
|
||||
DEFAULTTUNE ?= "cortexm1"
|
||||
|
||||
TUNEVALID[cortexm1] = "Enable Cortex-M1 specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm1', ' -mcpu=cortex-m1', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv6m.inc
|
||||
|
||||
AVAILTUNES += "cortexm1"
|
||||
ARMPKGARCH_tune-cortexm1 = "cortexm1"
|
||||
TUNE_FEATURES_tune-cortexm1 = "${TUNE_FEATURES_tune-armv6m} cortexm1"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm1 = "${PACKAGE_EXTRA_ARCHS_tune-armv6m} cortexm1"
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Tune Settings for Cortex-M23
|
||||
#
|
||||
DEFAULTTUNE ?= "cortexm23"
|
||||
|
||||
TUNEVALID[cortexm23] = "Enable Cortex-M23 specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm23', ' -mcpu=cortex-m23', '', d)}"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8m-base.inc
|
||||
|
||||
AVAILTUNES += "cortexm23"
|
||||
ARMPKGARCH_tune-cortexm23 = "cortexm23"
|
||||
TUNE_FEATURES_tune-cortexm23 = "${TUNE_FEATURES_tune-armv8m-base} cortexm23"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm23 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-base} cortexm23"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user