Commit Graph

1026 Commits

Author SHA1 Message Date
Yin Fengwei 1e13533ec0 DM: Enable vsbl boot path.
There are two things here:
1. Enable basic vsbl boot functionality.
2. add long option to DM to specific vsbl file. So DM could
   choice to boot guest with vsbl.

It's hard to find a suitable short option. So only long option
is supported for vsbl file name option.

If long option "--vsbl='vsbl_file_name'" is given in DM
commandline, the "vsbl_file_name" will be loaded by DM
first and running. vsbl will be response to lead guest to
next boot stage.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-05-15 17:19:38 +08:00
Yin Fengwei 860c2cab3e DM: export acpi table base address and length.
Will update e820 table to mark the address ACPI specific type.
Also need pass ACPI table start address and size to vsbl.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
2018-05-15 17:19:38 +08:00
Yin Fengwei 446297f96d DM: sw_load: sw_load function name update
To align with file name, acrn_sw_load_direct() is changed
to acrn_sw_load_bzimage().

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-05-15 17:19:38 +08:00
Yin Fengwei 01c8053dfb DM: fix build error with gcc-8.
gcc8 showed following errors when build DM:
  error: argument to ‘sizeof’ in ‘strncpy’ call is the same
  expression as the source; did you mean to use the size of the
  destination? [-Werror=sizeof-pointer-memaccess]

It looks like wrong parameter was given to strncpy.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-05-15 17:19:38 +08:00
Tianhua Sun edcd8f0243 Makefile cleanup
remove TARGET_YOCTO
replace "=" with "?=" if variable is defined, don't redefine.

Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
2018-05-15 17:19:38 +08:00
Yin Fengwei 6ee72d7df9 DM: split sw_load.c to sw_load.c and sw_load_direct.c
The common loader code is put to sw_load_common.c
The loader code for directly kernel loading is put to sw_load_bzimage.c
The further change for SBL will be put to sw_load_sbl.c

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-05-15 17:19:38 +08:00
Liu Shuo 544ec38b97 Fix string may be truncated issue with using snprintf
New compiler options introduced by commit
519c4285cf will cause DM compile failure
which caused by warnings from some snprintf usage might be truncated.

Expanding the string buffer to make compiler happy.

v3: change format string
v2: Address comment from Hao, shrink bident string size to satify
tname length in blockif_open.

Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
2018-05-15 17:19:38 +08:00
Shuo Liu 2205d5e0e8 virtio: config changed notify interface
Some virtio PCI devices can change the device configuration state, as
reflected in the device-specific configuration region of the device. In
this case:
 * If MSI-X capability is disabled:
    1. Set the second lower bit of the ISR Status field for the device
    2. Send the appropriate PCI interrupt for the device.
 * If MSI-X capability is enabled:
    1. If config_msix_vector is not NO_VECTOR, request the appropriate
       MSI-X interrupt message for the device, config_msix_vector sets
       the MSI-X Table entry number.

A single interrupt MAY indicate both that one or more virtqueue has been
used and that the configuration space has changed.

Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Hao Li <hao.l.li@intel.com>
2018-05-15 17:19:38 +08:00
Shiqing Gao 819845c9bd dm: add ACPI info for ipu pass-through
IPU devices are using I2C device with physical BDF 0:16.0.
The I2C controller has the dependency on ACPI info.
This patch is to add ACPI info for the I2C controller and the two IPU
devices that are under the scope of I2C.

Note:
This patch is specific for GP platform.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2018-05-15 17:19:37 +08:00
Yin Fengwei 23efb5a0e9 DM: reboot: clear the data of 0xcf9 if cold reboot
Linux kernel CF9 reboot is doing things like:
  - read value from 0xcf9
  - mask out the value according to the reboot type (warm vs cold)
  - BIT OR the value with reboot code
  - write the value to 0xcf9

If there are two reboot event and the first one is cold
reboot and the second one is warm reboot, vsbl query
reboot type after the second one and will get code reboot
instead of warm reboot.

We should clear the data of 0xcf9 if guest request cold reboot.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-05-15 17:19:37 +08:00
Yin Fengwei 66ddb67bdd DM: acpi: Update the reset value of FADT to trigger cold reboot
There are bootloaders require cold reboot as ACPI reboot
instead of warm reboot.

So we set 0xE to reset value of FADT to make ACPI reboot
cold reboot.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-05-15 17:19:37 +08:00
Yonghua Huang b6d73be1a6 Enable FORTIFY and FORMAT SECURITY compile flags
1. Enable below 2 defenses in Makefile
   "-O2 -D_FORTIFY_SOURCE=2"
   "-Wformat -Wformat-security"

2. Update related source code impacted by above 2 flags

Change-Id: Ib42214848f030b4cf508cd7c52a7e3cc809435d9
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2018-05-15 17:19:37 +08:00
David B. Kinder ed78db46ab update launch_uos.sh script
Documentation says to use CL version 21260, but sample script wasn't
updated.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-15 17:19:36 +08:00
Yin Fengwei 3775f29e3c vm: Pass uuid from DM commandline to vm as GUID.
Also save the uuid to ctx in case DM needs to access the
uuid.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-05-15 17:19:36 +08:00
David B. Kinder 81c47e776e add .gitignore
create a .gitignore that ignores build output created by make

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-15 17:19:36 +08:00
wenshelx d92f640829 security: data relocation and protection(RELRO)
RELRO rearranges the data sections inside an ELF
executable. It also marks certain areas as 'read-only'
so that these data structures cannot be overwritten while
the process is running.

Tracked-On: 224003
Signed-off-by: wenshelx <wenshengx.wang@intel.com>
2018-05-15 17:19:36 +08:00
wenshelx 156d61e20f security: enable stack protector
Enable stack-proctector-strong option for gcc emiting
extra code to check buffer overflow.

Enable noexecstack option for marking the object as not
requiring executable stack.

Tracked-On: 224003
Signed-off-by: wenshelx <wenshengx.wang@intel.com>
2018-05-15 17:19:36 +08:00
Yin Fengwei f86d91e1e1 dm: use getopt_long instead of getopt to parse dm cmdline
It will be easier if we want to add more command line options
with long options.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-05-15 17:19:36 +08:00
Shuo Liu 44b0ec0413 Ignore length of resource for PCI ROM request
Writing PCIR_BIOS is to get PCI ROM resource length. Ingore the request
as it's not support currently. Else, guest might get wrong information
about the PCI ROM resource.

Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
2018-05-15 17:19:35 +08:00
Jack Ren cf707cc62e version: v0.1-rc2
Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-05-15 17:19:22 +08:00
Jack Ren 955162bb3a minor fix on sample script bridge.sh
Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-05-11 14:44:30 +08:00
Geoffroy Van Cutsem 32fbc357bc README.rst: convert to ReST and add details
* Convert the README file to reStructuredText (ReST)
* Add more details (such as build dependencies) for Fedora 27

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-05-11 14:44:29 +08:00
Jason Chen CJ e404760cd2 add RC_VERSION for dm
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-05-11 14:44:29 +08:00
Miguel Bernal Marin 3b15f510c7 makefile: install the demo scripts
The demos scripts are not installed when "make install" is invoked.
This patch adds a rule to copy them to /usr/share/acrn

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2018-05-11 14:44:29 +08:00
Jack Ren 1f0fe2d15f update Maintainer list
Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-05-11 14:44:28 +08:00
Anthony Xu bd31b1c53e initial import
internal commit: 0ab1ea615e5cfbb0687a9d593a86a7b774386076

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2018-05-11 14:44:28 +08:00