That string was changed by accident and introduced the removed
items.
Tracked-On: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Enable pstore via the sos kernel cmdline, as ABL doesn't
reserve memory and pass parameters for pstore.
Tracked-On: #1024
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
New feature:
Update vFastboot to v1.0
Boot time optimization
Support Crash mode, which uses vFastboot in vSBL as Crash mode target.
Support Ramooops.
Tracked-On: #968, #1578, #1579, #1580
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
if acrnd or acrn_guest service enabled, launch_uos.sh will be called
early time during system boot up, while a pci driver module may be
insmod and disable cpu hotplug in short time, which could make
cpu offline fail, we need check it to make sure cpu offline real happen
before hypercall to disable vcpu.
Tracked-On: https://github.com/projectacrn/acrn-hypervisor/issues/1584
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
compare the two unsigned numbers to avoid delta calculation overflow.
It could happen during UOS warm root, which can trigger a "fake"
interrupt storm.
Tracked-On: #1476
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
sscanf and strcpy are banned according to the security requirements.
So replace them with their safe alternative.
Tracked-on: #1496
Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
These APIs are wrap of standard strto* APIs. The first parameters in
these APIs should be declared as "const" since they have never been
changed so that they can also be used when passing a variable declared
as const char *
Fixes: e1dab512c2 ("dm: add string convert API")
Tracked-on: #1496
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
physical RPMB is accessed if "phisycal_rpmb" is specified
in launch.sh.
Also it reserves some RPMB area with a fixed size(32KB) for
AttKB and future usage, which is RO for UOS.
Tracked-On: #1544
Signed-off-by: Huang, Yang <yang.huang@intel.com>
Acked-by: Zhu Bing <bing.zhu@intel.com>
Detect if SOS kernel mei drivers supports virtualization,
via driver hbm version 2.2
If yes use virtio_mei mediator for the mei device
otherwise fallback to passthrou mode.
Note that HBM version is not sufficient identification
Tracked-On: #1536
Signed-off-by: Aviad Nissel <aviad.nissel@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
In vmei_start() the HBM host client is created,
it handles HBM protocol.
The HBM client is a management object and
is not exposed by the mei native driver.
The communication between TX and RX threads
is handed via internal pipe(2).
Second, we connect all fixed address clients as the mei
protocol doesn't provide connection mechanism for them,
they appear always connected.
Last, the hw_ready is set.
Define virtio_mei_ops, ass all the handlers are now available.
Tracked-On: #1536
Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Rx is triggered from epoll event (mevent), a host client
is retrieved from associated event data. P proper mei message header is
attached to the packet and sent to the virtio FE device.
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
TX from virtio driver is handled firt via
virio tx notify handler vmei_notify_tx(),
placed into host clinet tx circular buffer.
TX thread will then write the data to the device.
Tracked-On: #1536
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Implement the FW part of the HBM protocol.
Currently the support version is 2.0.
The HBM protocol handles client management, such
initialization handshake, connection, power management,
and the flow control.
Tracked-On: #1536
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com>
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>
ME client enumeration is received from sysfs attributes
of the native device.
V3: Use bounded functions.
Tracked-On: #1536
Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com>
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>
mei mediator perform reset handshake via
the cfgread/write handlers and provide access
to fw status registers.
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
There are multiple types of resets that need to be handled
by the mei device.
The reset may be initiated from both sides host or fw.
The host requests reset on probe and remove,
power state transaction, and errors,
while ME FW may request reset upon error.
If the native device undergo reset the host application
has to be notified.
Tracked-On: #1536
Signed-off-by: Aviad Nissel <aviad.nissel@intel.com>
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>
1. virtio_mei structure represents an instance of mei device.
2. vmei_me_client represents an ME application in the MEI FW.
3. vmei_host_client represent a host application talking to the
ME application, ME application can support multiple connections.
4. Add debug helpers
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
The virtio has two virtio queues, TX and RX.
TX have two segment buffers one for header and one for data.
The virtio_mei declares host buffer of size 128 slots, each
slot is a 4 bytes value.
For synchronization hw_ready and host_reset configuration flags
are used that emulates mei reset flow.
And last fw status registers must be also readable via virtio
mei device.
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
mei handles objects on the list, hence reference counting
infrastructure is required for easier multithreading.
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Add standard container_of macro to access
the parent struct pointer.
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
libuuid sports only uuid (big endian encoding),
though mei requires guids (little endian encoding).
The base types are based on <linux/uuid.h> header.
Tracked-On: #1536
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>
HBM is a control channel protocol between mei device
driver and mei fw.
Add new ioctl IOCTL_MEI_CONNECT_CLIENT_VTAG
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Remove virtio_heci to be replaced with virtio_mei
Tracked-On: #1536
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
devicemodel/vmcfg/example.h is a example, it is generated at build
time.
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
run 'acrn-dm --dump <index>' to show build-in parameters
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Enable --vmcfg options for acrn-dm, if --vmcfg <index> is specified,
build-in VM configuration will be used, and override any other
optional parameters.
run 'acrn-dm --vmcfg list' to show all build-in VM configurations.
run 'acrnpdm --vmcfg <index>' to launch UOS with selected config.
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Script that setup envriment on MRB platform, for UOS with build-in
configuration
For example, you need to run mrb-env-setup.sh once, to
prepare images, networks and pci-stubs, etc,.
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Add build-in vm1 configuration for MRB platform, this is also an
example about how to add new VM configurations
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
use *args_buildin[] to hold build-in VM configurations
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
VMcfg use Kconfig mechanism to generate a header file
devicemodel/include/vmcfg_config.h, which contains many macro symbols
for conditionally compiling. This feature is disabled by default, to
enable it, You can switch to devicemodel/vmcfg/ and run 'make' with
these options:
'make menuconfig'
run 'make menuconfig' at ./devicemodel/vmcfg/, and configure manually.
When you finished, save your changes to ./devicemode/vmcfg/.config
'make oldconfig'
Overwrite ./devicemodel/vmcfg/.config with your config file, then run
'make oldconfig' at ./devicemodel/vmcfg
'make *_defconfig'
E.g, there is ./devicemodel/vmcfg/config/mrb_defconfig, you can run
'make mrb_defconfig' at ./devicemodel/vmcfg/
Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This patch is one workaround to resolve a crash issue for certain brand
touch screen (eGalaxTouch EXC7200-7368v1.01). The formal fix should
follow the xHCI spec to stop xfer and generate transfer completed event
trb prior to Stop Endpoint Command complete event trb. It should be a
big change and for short term, do nothing for the stop endpoint command
which is no other side effect be observed so far.
Tracked-On: #1413
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>
The function pci_xhci_get_native_port_index_by_path didn't
compare the bus number during the process of native USB
device searching. This patch is used to fix it.
Tracked-On: #1434
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>
This patch is used to support emulation of multiple layers of hubs
under Flat Mode.
Tracked-On: #1434
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This patch is used to enable multiple hubs in single layer under
Flat Mode.
Tracked-On: #1434
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
To support the multiple hubs and multiple layers of hub, the
port_map_tbl should be replaced by native_ports to record all
native devices' state, including assignment state, emulation
state etc.
Tracked-On: #1434
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
There are many places in USB emulation implementation to get
native USB device infomation, and the related codes are long
and repeated many times. This patch introduces function
usb_get_native_devinfo to remove redundent codes for the
purpose mentioned above.
Tracked-On: #1434
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This patch introduce struct usb_devpath to indentify uniquely an USB
device, which is basic element for multiple hub support.
Tracked-On: #1434
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
Previous design use bus and port(root hub port) for the identification
to the native USB device. It cannot work properly under the multi-hub
situation due to external USB hub is introduced.
This patch removes old hub implementation code, and subsequent patches
will be add support for mutiple hubs.
Tracked-On: #1434
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
When do USB role switch between host and device mode, we hit hang issue.
It might be caused by accessing suspended xHCI during that. This issue
need to be root caused later in xHCI driver.
This is a workaround solution, which will be reverted when got a fix.
Tracked-On: #1516
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
As RPMB mux kernel module is going to be created,
there are two corresponding changes required for DM:
1. The name has been changed to /dev/rpmbmux.
2. DM does NOT check MAC of RPMB result returned by kernel
module because DM doesn't own the real key.
Tracked-On: #1508
Signed-off-by: Huang, Yang <yang.huang@intel.com>
Acked-by: Zhu Bing <bing.zhu@intel.com>
Per i6300esb spec, when WDT_INT_TYPE(bit 0 and 1 of WDT config register)
are set to 00, IRQ feature should be supported.
The WDT_INT_ACTIVE bit is set when the first stage of the 35-bit
down-counter reaches zero. An interrupt will be generated if WDT_INT_TYPE
is configured to do so (See WDT Configuration Register). This is a sticky
bit and is only cleared by writing a 1.
SMI feature(WDT_INT_TYPE are set to 0x10) is not supported.
Tracked-On: #1498
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
As function sscanf is banned, to get value from parameter buffer,strto*
is recommended. To reduce the inspection code when using strto*, it's
better to use a string convert API.
Usage:
For virtio-blk, it has parameters:
range=<start lba>/<subfile size>
sscanf:
if (sscanf(cp, "range=%ld/%ld", &sub_file_start_lba,
&sub_file_size) == 2)
sub_file_assign = 1;
string API:
if (strsep(&cp, "=") &&
!dm_strtol(cp, &cp, 10, &sub_file_start_lba) &&
*cp == '/' &&
!dm_strtol(cp + 1, &cp, 10, &sub_file_size))
sub_file_assign = 1;
Tracked-on: #1496
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This patch addes the debugexit function to DM. If it's enabled
by DM cmdline (by add --debugexit), the guest could write a
32bit value to port 0xF4 to trigger guest shutdown.
Tracked-on: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This patch adds a simple 32bit static elf binary loader to acrn DM.
And if the elf binary follow multiboot protocol, only memory info
will be included in multiboot info.
Tracked-On: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
Current RTC emulation is based on sigevent mechanism, replace with
acrn_timer API which based on timerfd/epoll mechanism to avoid
potential resource accessing conflict in the async thread.
Tracked-On: #1489
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>