Commit Graph

537 Commits

Author SHA1 Message Date
Libin Yang 7f08ad8375 use 4 vqs
Signed-off-by: Libin Yang <libin.yang@intel.com>
Tracked-On: #1915
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-03 10:35:38 +08:00
Zhu Yingjiang 333629682a change the vq count and vendor id
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
Tracked-On: #1915
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-03 10:35:38 +08:00
Pawel Furtak 9bf7dd5ddc Enable audio virtualization for AaaG
Based on existence of /dev/vbs_k_audio file
launch AaaG with proper audio virtualization mode

Signed-off-by: Pawel Furtak <pawel.furtak@intel.com>
Tracked-On: #1915
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-11-30 15:16:16 +08:00
Junjie Mao 584f6b7255 doc: replace return with retval
`@return` is dedicated for brief description of return values, not for comments
stating actual return values. In addition, sphinx + breathe does not join
multiple adjacent `@return`. This results in multiple `Return` sections in the
generated document, which is confusing.

This patch replaces `@return` with `@retval` for the lists of return
values. Adjacent `@retval` can be joined into one list by breathe.

v1 -> v2:

* Replace return value descriptions like `negative` and `positive` with
  expressions like `<0` and `>0` in `@retval`.
* Keep the list of `@retval` comprehensive, even when there is a `@return` to
  generally describe what the return value means.
* Drop duplicated `@return` when it does not give more information than the
  `@retval` list.

Tracked-On: #1595
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-11-30 14:55:17 +08:00
Junjie Mao 97eb72a4a0 doc: always use 'None' for functions not returning a value
It is preferred to state the absence of a return value explicitly in the
doxygen-stile comments. Currently there are different styles of doing this,
including:

  @return None
  @return NULL
  @return void
  @return N/A

This patch unifies the above with `@return None`.

Tracked-On: #1595
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-11-30 14:55:17 +08:00
Zheng, Kankan cbe1b74eee HDCP virtio back-end driver
Initial HDCP back-end driver.

Signed-off-by: Romli, Khairul Anuar <khairul.anuar.romli@intel.com>
2018-11-30 14:45:24 +08:00
Yu Shiqiang fa012e6987 CoreU virtio back-end driver
v4 -> v5
    Replace strcpy with strncpy
    Refine resource free if error happens
    Remove meaningless *in_progress* label for pthread wait/signal
    Rename the coreu thread routine name (virtio_coreu_thread)

v3 -> v4
    Move setsocketopt to connect_to_daemon
    Cleanup coreu file descriptor after close
    Reconnect CoreU daemon if the socket descriptor is invalid

v2 -> v3
    Move the daemon connection to vdev_init
    Diagram the CoreU virtualization architecture
    Create a seperate thread for sending and receving the CoreU message
    Change the socket name

v1 -> v2
    No change

v1
    Initial CoreU back-end driver

Signed-off-by: Yu Shiqiang <shiqiang.yu@intel.com>
2018-11-30 14:45:24 +08:00
Geoffroy Van Cutsem aefe9168d1 Update 'launch_uos.sh' script for UEFI platforms
Update the 'launch_uos.sh' script for UEFI platforms to point at the latest
iot-lts2018 kernel installed by means of the
/usr/lib/kernel/default-default-iot-lts2018 symlink which is set-up by the
kernel-iot-lts2018 bundle.

Update the Getting Started Guide to reflect this minor change.

Tracked-On: #1927
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-11-29 10:57:13 +08:00
Qi Yadong 839680f09b DM: build TPM2 ACPI table when TPM device enabled
Add TPM2 ACPI table build function.

If virtual tpm device is initialized successfully, then create
corresponding TPM2 ACPI table.

Tracked-On: #1924
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-29 09:19:16 +08:00
Qi Yadong aae70db6b9 DM: Add support for virtual TPM enabling
Support TPM enable option when launch UOS.

New option: "--vtpm sock_path=$PATH_OF_SWTPM_SOCKET".
If valid option parsed, then init virtual tpm device.

Tracked-On: #1924
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-29 09:19:16 +08:00
Qi Yadong 7df90a2527 DM: Support TPM2 CRB device virtualization
Full virtualized TPM CRB device.

The TPM CRB module will handle TPM2 MMIO access. It will forward
the command/data to TPM emulator for command processing if there
is a valid TPM command.

Tracked-On: #1924
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-29 09:19:16 +08:00
Qi Yadong 4b83e37c7a DM: tpm emulator to communicate with swtpm
This patch will create control channel and command channel
so as to communicate with swtpm. Based on the 2 channels,
a set of APIs will be implemented and exposed.

Tracked-On: #1924
Signed-off-by: Deng Wei <wei.a.deng@intel.com>
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Signed-off-by: yingbinx <yingbinx.zeng@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-29 09:19:16 +08:00
Yuan Liu d043171de5 IOC mediator: Add VehicalSteeringWheelAngle signal to the whitelist
The signal is used to get camera right and left values.

Tracked-On: #1886
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-23 14:59:07 +08:00
Tomas Winkler 580579a392 dm: mei: Use compare and swap primitive for refcnt.
Simple atomic add/dec do no guarantee reference count full
synchronization without a lock. Compare and swap operations
are required for correct implementation.

Tracked-On: #1875
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-23 14:13:14 +08:00
Yin Fengwei 19b35f9730 acrn-dm: wait for monitor thread canceling finish
When thread_cancel() is called to exit pthread, we can't know
when the thread exit done unless pthread_join() is used to
wait for thread exit.

Tracked-On: #1868
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-22 12:52:12 +08:00
Tomas Winkler 031191dbcd dm: apl-mrb: launch_uos: remove mei debug flags
Tracked-On: #1849
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Alexander Usyskin 378afc5093 dm: mei: fix clients scan in sysfs
Fix the prefix comparison, we need to compare on prefix length, not
on devpath len, otherwise we always fail.

Tracked-On: #1848
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Alexander Usyskin 7bd2976f9c dm: mei: add zero termination to devpath
Reset directory name to receive clean prints.

Tracked-On: #1847
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Tomas Winkler 87fbb7003d dm: mei: fix double fw_reset on uos reboot
Edge triggered mevent on sysfs file is triggered
immediately after mevent_add(), hence this has to be ignored.
The issue that is resolved that the 'first' flag was
global and wasn't reset on each mevent_add().

Tracked-On: #1846
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Alexander Usyskin 844553ef23 dm: mei: check for state before link reset callback
Prevent intercepting reset callback if reset state
transition is already in progress.

Tracked-On: #1846
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-21 15:17:05 +08:00
Shuo Liu e8296dce05 hv: Add IO request completion polling feature
This patch introduce a new mode of IO request completion, polling mode.

Now, the sketch of ioreq process can be,
  A. UOS vcpu0 generate PIO/MMIO ->
   B. pcpu1(vcpu0 of UOS) trap into HV ->
    C. pcpu1 build ioreq, send IPI and enter idle ->
     D.1 pcpu0(vcpu0 of SOS) response IPI,
     D.2 pcpu0 handle the ioreq in HV, kernel, DM,
     D.3 pcpu0 mark ioreq as complete,
     D.4 pcpu0 hypercall to enter HV ->
       E.1 pcpu0 send IPI to wake pcpu1 up
       E.2 UOS vcpu0 continue running

With this change, it skips D.4, E.1 steps. In step C, pcpu1 will enter a
polling ioreq state idle after send out the IPI.
It can save about ~5000 cpu cycles.

In polling mode, we do the polling in idle instead of pause cpu all the
time. It will consume more power. A better way is to use monitor/mwait
instructions which can put cpu into a sleep state with monitoring a
memory address. Unfortunately, APL has bug with monitor. We can gather
all ioreqs state into one monitorable memory and take advantage of
monitor/mwait for future platform.

The way polling or notification is per VM. We can config VMs in
different mode. By default, IO request completion will use notification
mode for all VMs. We can switch it by Kconfig.

Tracked-On: #1821
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-21 14:35:12 +08:00
Geoffroy Van Cutsem 4ec4ddc0cc Documentation: clean-up of isolated README.rst files
Clean up of a couple of README.rst files located respectively under hypervisor/
and devicemodel/ to remove obsolete and unmaintained information. Both hold a
basic introduction about the folder content and refer to the official
documentation website for more detailed information.

Tracked-On: #1827
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-11-20 11:09:53 -08:00
Shuo Liu 611944c018 dm: Fix race between ioreq client destroy and access
vcpu thread need to exit when doing VM full reset and VM shutdown.
Change the code to align the logic. This also can fix race condition
between ioreq client destruction and accessing.

Tracked-On: #1857
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-20 13:26:33 +08:00
Yonghua Huang 2fa67a4471 HV: clear memory region used by UOS before it exit
this patch fixes such an information leaking issue:
in case that after a UOS is destroyed, its memroy
will be reclaimed and maybe re-allocated for a new UOS,
then the previous UOS sensitive data in memory may
be leaked to the new UOS.

Tracked-On: #1825
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-16 09:13:34 +08:00
Geoffroy Van Cutsem a03452794f DM: update User OS launch script with v0.3 CL and kernel numbers
Update the User (guest) OS launch script with the Clear Linux
version used with ACRN v0.3 as well as the corresponding kernel
version.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-11-12 10:43:03 -08:00
ailin,yang 5c8e4c38b7 DM: update clear Linux version
1, update Clear Linux version to 26120 
2, update kernel name to *iot-lts2018* 

Signed-off-by: Ailun258 ailin.yang@intel.com
2018-11-10 11:17:22 -08:00
Zhao Yakui 66f133bf45 DM: Fix the typo error in checking the /dev/vbs_ipu file
The /dev/vbs_ipu is used by the backend driver of IPU mediator on SOS kernel
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.
But the commit 969f7cf071 doesn't check the file of /dev/vbs_ipu correctly.
It should be -e instead of -f.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Wu, BinBin <binbin.wu@intel.com>
2018-11-09 11:26:59 +08:00
yuhong.tao@intel.com c4161c8784 dm: uart: fix UOS console output to stdin
At devicemodel/hw/uart_core.c, struct ttyfd has only one file
descriptor for uart backend device, that is OK if DM uart open
a tty characteor device under /dev/ for reading, writing and
terminal operating.

When use stdio as backend tty device, there are 2 fds, stdin/stdout.
DM should read from 'stdin' and output to 'stdout'. But ttyfd just
has one fd, and is only for 'stdin', so dm has to output to stdin,
too, not to stdout.

That cause a problem: if use stdio for uart backend, you can't
redirect UOS console to any other files. Because stdout is not used.

We hope to store information from VM console to system journal,
when UOS is launched by Acrnd automatically. The systemd need to
redirect stdout of dm to system journal files, but it can't be done.

So we can split the 'fd' of struct ttyfd to 'fd_in' & 'fd_out'.
they are same when use tty device; And they are different when use
stdio, 'fd_in' is for stdin and 'fd_out' is for stdout.

Tracked-On: #1759
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Like Yan <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-08 15:14:15 +08:00
Minggui Cao b58817273d DM: add interrupt storm monitor params in cmdline
To support expose "interrupt storm monitor" params setting to user;
it is easy to adjust the params in launch UOS script.

Tracked-On: #1724
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-08 14:43:05 +08:00
Minggui Cao ad1cbb7623 DM: add interface to set intr storm monitor params
modify and add interface to set interrupt monitor params;
it can be set by acrn-dm input arguments like following:
--intr_monitor 10000,10,1,100

the 4 params order is:
    interrupt storm theshold per second,
    probe period to get interrupt data,
    pass-through devices' interrupt injection delay time,
    delay duration, after it, stop injection & restore to normal

Tracked-On: #1724
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-08 14:43:05 +08:00
Zhi Jin 36aaaa1cfd DM NPK: unmap the MMIO in pci_npk_deinit
Otherwise, after UOS crashes, the PTE for the MMIO may be added
again.

Tracked-On: #1745
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
2018-11-08 09:06:17 +08:00
Binbin Wu 78dd92e4ed DM: sos_bootargs: split sos_bootargs into multiple lines
Difficult to review the changes of sos_bootargs when the args is a single line.
Split sos boot args into multiple lines.

Tracked-On: #1730
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-11-07 09:21:13 +08:00
Yuan Liu 65a2613ab6 IOC mediator: fix wakeup reason issue when UOS resuming
IOC mediator should keep sending acnrd boot reason until received
UOS heartbeat init message, then turn to send SOS wakeup reason
through read native cbc lifecycle cdev.

Tracked-On: #1727
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-06 16:18:35 +08:00
Xinyun Liu ad1e2ab678 DM/sos_bootargs: remove unused parameters for graphics
remove these options from legacy release:

i915.tsd_init=7 i915.tsd_delay=2000
i915.enable_preemption=1 i915.context_priority_mode=2

Tracked-On: #1697
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-06 13:13:36 +08:00
Zhao Yakui 969f7cf071 DM:Check the device file of /dev/vbs_ipu to determine IPU mode
The /dev/vbs_ipu is used as the backend driver of IPU mediator on SOS kernel.
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-11-05 14:45:38 +08:00
Shuo Liu d261b4bce2 doc: update virtio related functions doc comments
Update some virtio, VBS-K, vhost APIs documents.

Tracked-On: #1595
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
2018-11-04 20:32:50 -08:00
Shuo Liu ea801a1672 dm: Remove unused duplicated API dm_gpa2hva
paddr_guest2host has same function with dm_gpa2hva. And There is no
usage of dm_gpa2hva. Remove it.

Tracked-On: #1595
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Fengwei Yin <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-04 20:32:50 -08:00
Jian Jun Chen 94dadc1d14 dm: virtio-input: ignore MSC_TIMESTAMP from guest
(EV_MSC, MSC_TIMESTAMP) is added to each frame just before the
SYN event since kernel 4.15. EV_MSC is configured as
INPUT_PASS_TO_ALL. In the use case of virtio-input, there is
a loop as follows:
- A mt frame with (EV_MSC, MSC_TIMESTAMP) is passed to FE.
- FE will call virtinput_status to pass (EV_MSC, MSC_TIMESTAMP)
  back to BE.
- BE writes this event to evdev. Because (EV_MSC, MSC_TIMESTAMP)
  is configured as INPUT_PASS_TO_ALL, it will be written into
  the event buffer of evdev then be read out by BE without
  SYN followed.
- Each mt frame will introduce one (EV_MSC, MSC_TIMESTAMP).
  Later the frame becomes larger and larger...

This patch fixed above issue by ignoring MSC_TIMESTAMP from guest.
Besides that timestamp is added for every status event from guest
before writing to evdev.

Tracked-On: #1670
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-02 13:42:43 +08:00
Minggui Cao 74a5eec3a7 DM: change SOS bootargs console ttyS0 to ttyS2
change it to match with release version.

Tracked-On: #1690
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-11-02 13:00:54 +08:00
Yin Fengwei 6993fdb3e9 DM: set cs_limit from DM side for UOS
For CS of UOS, we would like to pass all related info (cs attribute,
limit, base) from DM.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
2018-11-01 13:11:40 +08:00
santoshkumar b0cac0e67c Samples:Added the Kernel console parameter in boot.
For GP-MRB ACRN using ttyS0 as console,
since this is release bootargs file so ttyS0
will be skipped in booting but needed kernel
console ttyS2 in bootargs to get the Kernel console.

Tracked-On: #1655

Signed-off-by: santoshkumar <santoshkumar.laxminarayan.rai@intel.com>
2018-11-01 09:49:40 +08:00
Binbin Wu 6150c0611f dm: bios: update to version 1.0.1
Bug fix:
- Fix AaaG user build boot failure with  memory size > 2GB and flash unlocked.

Tracked-On: #1659
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2018-10-31 11:30:45 +08:00
Aviad Nissel 9ba75c55a7 dm: mei: fix firmware reset race.
The FW reset is currently detected from two points upon
a read failure from native read and from the reset
handler.
The fix removes the detection from the mevent rx callback,
leaving a single detection point.
To prevent reset hiccup, hw_ready is not set if a full rescan is
performed, it will be set only when virtio FW will request the FW reset.

Tracked-On: #1632
Signed-off-by: Aviad Nissel <aviad.nissel@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2018-10-31 09:43:45 +08:00
Alexander Usyskin 5f41d4a8d3 dm: mei: check return value of vmei_host_client_to_vmei()
vmei_host_client_to_vmei() may return NULL we need to check
for the return value.

Tracked-On: #1630
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
2018-10-31 09:43:45 +08:00
Tomas Winkler b4fbef4659 dm: mei: destroy mutex attribute on error path
Simplify the flow by adding mutex_type variable
and call pthread_mutexattr_destroy() on the error path.

Tracked-On: #1630
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
2018-10-31 09:43:45 +08:00
Alexander Usyskin 8abc931791 dm: mei: set addresses in the hbm disconnect reply
MEI HBM the disconnect replay doesn't have the address set,
breaking the protocol, fix the issue.

Tracked-On: #1570
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2018-10-31 09:43:45 +08:00
Xiaoguang Wu a0ace7254d DM USB: xHCI: fix process logic of TRB which has zero data length
Accoring to xHCI spec, there are some TRBs with zero data length
which used to pass command to xHCI. In the DM, those TRBs should
not be sent to native device through libusb. The logic in the
current implentation fails to process some corner cases, this
patch is used to fix it.

Tracked-On: #1639
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-31 09:08:53 +08:00
Minggui Cao 6266dd014a DM: correct memory allocation size for UOS
on 8GB MRB: cat /proc/meminfo|head -n 1|awk '{print $2}'
it is: 7993388, it is not 8000000, so set it compare
with 7500000, then it can allocate 6GB to UOS.

Tracked-On: #1657
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-31 09:08:13 +08:00
Ming Liu 48d8123a21 devicemodel:nuc:launch_uos.sh: drop a useless clear parameter
This 'clear' parameter's never been referred in launch_clear
function, so drop it.

Tracked-On: #1599
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-10-30 14:25:51 +08:00
Ming Liu 62a42d5f5a devicemodel: Makefile: clean up/refactor some code
- Put version.h, vmcfg_config.h, .config into DM_OBJDIR like what's
  already done in hypervisor and tools, it does not have to stay in
  source or else a extra entry in .gitignore is needed.
- Change some implicit targets to explicit targets, include:
  vmcfg_header -> $(DM_OBJDIR)/include/vmcfg_config.h
  $(PROGRAM) -> $(DM_OBJDIR)/$(PROGRAM)

  then $(DM_OBJDIR)/include/vmcfg_config.h would be depended by
  $(DM_OBJDIR)/%.o without the need involving in a extra implicit
  target vmcfg_header. (And it's not set in .PHONY)
- These header targets vmcfg_config.h and version.h should be depended
  by $(DM_OBJDIR)/%.o target instead of by all target, and this is done
  since they are in HEADERS now.
- Drop redundant clean commands and fix some bad styled coding, like
  multiple blanks in a line.

Tracked-On: #1599
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-10-30 14:25:51 +08:00