Commit Graph

1980 Commits

Author SHA1 Message Date
Victor Sun 25719db8f1 HV: move DRHD data to platform acpi info
In current code, the DRHD data is hardcoded in sbl.c. Replace the data
with MACROs which defined in platform_acpi_info.h as it could be parsed
by offline tool.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun ca65e8c727 HV: refine APIC base address to platform acpi info
The base address of LAPIC and IOAPIC should be parsed from MADT table,
so move the definition to platform_acpi_info.h.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun 8f701b0ff7 HV: move NR_IOAPICS to platform acpi info
The I/O APIC number should be parsed from host ACPI table, so move the
definition from Kconfig to platform_acpi_info.h.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun bf834072d4 HV: platform acpi info refactor
Replace platform_acpi_info.c with platform_acpi_info.h and define needed
host ACPI info in MACROs. Then the struct host_acpi_info is not needed
any more.

This header file should be generated by offline tool automatically;

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Geoffroy Van Cutsem 4ed87f90e9 Documentation: add note and instructions for Ubuntu 16.04
There is a compilation error when using the stock gcc compiler
from Ubuntu 16.04. This adds a note to our Getting Started
Guide to indicate what the error is and how to work around it.

Tracked-On: #1482

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-17 05:56:43 -07:00
Geoffroy Van Cutsem 2b449680ff Documentation: minor update to the tutorial about Ubuntu as SOS
Minor update to the tutorial on how to use Ubuntu as the Service OS
with ACRN. Specifically, the instructions for making the Grub menu
visible at boot time now involved modify the /etc/default/grub file
and not the /boot/grub/grub.cfg as before.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-17 05:54:49 -07:00
Conghui Chen 21458bddff dm: storage: banned functions replace
1. replace sscanf with string API.
2. replace sprintf with snprintf
3. replace strlen with strnlen

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>
2018-10-17 16:22:00 +08:00
Conghui Chen e1dab512c2 dm: add string convert API
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>
2018-10-17 16:22:00 +08:00
Huihuang Shi 4620b935de fix "use of single line comments(s) //"
Replace "//" with '/*','*/' couples.

V1->V2:
    Correct comment "Tracked-On" format

V2->V3:
    Remove "/* ==...===*/" comment

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 16:16:31 +08:00
Yin Fengwei 75b03bef3b dm: add io port 0xF4 writing to force DM exit
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>
2018-10-17 14:32:33 +08:00
Yin Fengwei 9f7642648b dm: add elf loader to dm
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>
2018-10-17 14:32:33 +08:00
Victor Sun 0e897c0a6a DM: use acrn_timer api to emulate rtc
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>
2018-10-17 14:31:09 +08:00
Victor Sun 8fdea84a63 DM: use acrn_timer api to emulate wdt
In the current implementation sigev_notify is configured as
SIGEV_THREAD. When wdt expires an async thread is created and
the registered timer callback is called in the context of this
thread, then the watchdog interrupt emulation would require the
thread to assert intr on this pci dev.

There would be a race condition that when the wdt pci device is
freed in pci device deinit and then a timer expires. In this case
the wdt expired thread will access a freed buffer which would cause
problem such as heap corruption and segment fault.

In this patch we replace timer API with acrn_timer which is based
on timerfd/epoll mechanism to avoid the race condition.

Tracked-On: #1489
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 14:31:09 +08:00
Victor Sun 6ffa1aa367 DM: add acrn_timer api for timer emulation
We will use timerfd and epoll mechanism to emulate kinds of timers like
PIT/RTC/WDT/PMTIMER/... in device model under Linux. The api is unified
in this patch.

Compare with sigevent mechanism, timerfd has a advantage that it could
avoid race condition on resource accessing in the async sigev thread.

change log:
	v1 -> v2: add NULL pointer check for function parameter;
	v2 -> v3: rename file name of vtimer.* to timer.*;
		  rename structure name of vtimer to acrn_timer;
		  add read() in timer handler to consume I/O event;
	v3 -> v4: replace bool clock_realtime with int clockid;
		  close acrn_timer->fd properly;

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>
2018-10-17 14:31:09 +08:00
Qi Yadong d9df6e93f3 HV: parse seed from ABL
ABL pass seed_lists to HV through different interface/structures.
So, in this patch, add interface to retrieve seed from ABL and refactor
the seed parsing logic.

Tracked-On: #1488
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Acked-by: Zhu Bing <bing.zhu@intel.com>
2018-10-17 14:30:52 +08:00
Qi Yadong a98dd9e3fe HV: trusty: set cse_svn when derive dvseed for trusty
Bugfix: need to set cse_svn when derive dvseed for trusty.

Signed-off-by: Qi Yadong <yadong.qi@intel.com>
2018-10-17 14:30:52 +08:00
Yonghua Huang 102f5a0141 hv: fix potential buffer overflow in vioapic.c
@vioapic_set_pinstate() & vioapic_need_intr(),
 add checking input value range for 'pin'.

Tracked-On: #1479
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 14:30:28 +08:00
Yin Fengwei eb328d78ea hv: retain rip if the fault is injected to guest
According to SDM 6.5 exception classification, if the fault
happens, the CPU will return to the faulting instruction. So
we shouldn't change rip to the next instruction if inject fault
to guest.

Tracked-On: #1473
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 10:05:36 +08:00
Sainath Grandhi 348e2ba168 hv: x2apic support for acrn
All the platforms supported by ACRN supports x2APIC. So enabled
x2APIC for ACRN hv. Removed any code that is needed for xAPIC mode
of operation.

Tracked-On: #1455
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed by:  Yonghua Huang <yonghua.huang@intel.com>
2018-10-17 08:46:42 +08:00
Ming Liu a0fb1c4cf3 hypervisor: Makefile: let OBJS target depend on VERSION file
Let OBJS target depend on VERSION file instead of other targets like
install/all depending on it, since the version.h is being included in
.c files.

This fixes a following compilation issue:
| In file included from include/hv_debug.h:10,
|                  from include/hypervisor.h:37,
|                  from arch/x86/cpu.c:7:
| arch/x86/cpu.c: In function 'bsp_boot_post':
| arch/x86/cpu.c:453:4: error: 'HV_FULL_VERSION' undeclared...

Tracked-On: #1441
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-10-16 14:24:46 +08:00
Huihuang Shi c6c1e42b79 HV:fix 'missing for discarded return value' violations
Return value should be checked,fix it by add
"void" when the function return value is not used.

V1->V2:
    replace printf with pr_warn.
V2->V3:
    change the commit to make read easily.

Tracked-On:#861

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-16 13:31:02 +08:00
Binbin Wu 19e0bed593 script: re-enable audio passthru
This reverts partial of commit: 9bf5aafe "script: workarounds for UOS of
4.19-rc kernel", since our fixing patch for kernel crash when audio passthru
is ready.

Tracked-On:#1461
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-16 13:30:07 +08:00
Yan, Like eb97b2f082 tools: acrn-manager: remove assumption of fd num less than 1024
mngr_send_msg() could take mngr descriptor or real socket fd as argument based on
an assuption that real socket fd is less than 1024, which may be an issue.
This commit takes the real socket fd as descriptor, to avoid the conversion between them.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yan, Like f582757dd4 tools: acrn-manager: fix fd leaking
close dir to avoid fd leaking.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yuan Liu dc05ffffaa dm: uart: fix acrn-dm crash issue
This patch resolves acrn-dm crash issue when acrnd boots up the acrn-dm.
The rootcause is mevent_enable and mevent_disable have NULL pointer as
its parameter if uart backend is not tty capable, so add check code for
the uart backend before invoking mevent_enable and mevent_disable.

The issue can be reproduced when acrnd boots up the acrn-dm.

Tracked-On: #1466
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-16 10:24:01 +08:00
David B. Kinder e7b63aec9d doc: add static core partitioning doc
Update HLD with the static core partitioning doc

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-10-15 12:45:16 -07:00
Wei Liu 96412ac147 hv: add suffix(U/UL) to come up MISRA-C into include
MISRA-C required the suffix(U/UL), such as:
(1) ---> (1U)
(1) ---> (1UL)
(1U << 0) ---> (1U << 0U)
This patch will add the suffix(U/UL) to come up MISRA-C into
hypervisor/include directory.

Tracked-On: #1468
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:33:30 +08:00
Wei Liu 909d157630 dm: cleanup the cmd options for acrn-dm
For acrn-dm cmd options, there are some mismatch usage from acrn-dm help
message.
This patch will cleanup them.

Tracked-On: #1469
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Jason Chen <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:32:53 +08:00
Peter Fang 2202b7f578 dm: virtio: reject requests that violate the virtio-block spec
VirtIO v1.0 spec 04 5.2.5:
- Protocol unit size is always 512 bytes.
- blk_size (logical block size) and physical_block_exp (physical block
  size) do not affect the units in the protocol, only performance.

VirtIO v1.0 spec 04 5.2.6.1:
- A driver MUST NOT submit a request which would cause a read or write
  beyond capacity.

Reject the requests that violate these terms.

v1 -> v2:
- add more comments for clarity

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Peter Fang ba4e72bd0a dm: virtio: add debugging information in virtio-blk
Output debugging message when virtio-blk completes with error.

v1 -> v2:
- fix coding style
- refine debugging message

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Peter Fang 7101ce87a7 dm: storage: remove GEOM support
There is no GEOM framework in Linux. Remove dead code.

v1 -> v2:
- complete removal of the entire GEOM logic

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Minggui Cao b4a7a1ea1a HV: allow no IRR when pending bit set if no APIC-V
An issue reported on KBL NUC (No APIC-V), when runing GVT test
case, it is easily to cause SOS/UOS hung. This patch is to root
cause it and how to avoid it.

On some platforms with no APIC-V support, this modidication can
avoid SOS hung when no IRR but event pending bit set.

If no APIC-V, interrupt injection will use IRR in vLAPIC and
event pending bitmap; work logic as following (set ABC for notes):
1. in ISR or when UOS send an interrupt to SOS/VHM (like IO request),
    step A: set IRR --> step B: set event pending bit;
2. in SOS event handing,  step C: check/clear event pending bit -->
  step D: probe/get IRR --> step E: clear/handle IRR.
3. after that, it will probe IRR again to check if other IRR left:
  step F: probe IRR --> step G: set event pending bit --> step H:
  enable IRQ window in VMX.

Before, from step C to D, if pending bit checked, but no IRR, it will
return -1, then the CPU will goto ZOMBIE status. It can cause
SOS hung. It can happen occasionally under following case :
4. between UOS step A and step B, SOS can goto step F, so it
gets IRR, and step G --> step H, then SOS enter non-root mode, for
IRQ window enabled, it will cause vmexit to continue step C/D/E.
5. then UOS does step B, to set pending bit, but no IRR now. When next
vmexit, SOS does step C and D, it can't get IRR, failure happens.

In summary, a failed case steps: A-->F-->G-->H-->C-->D-->E-->B-->C-->D

So we allow that when event pending bit checked, IRR could be cleared
already.It just wastes one probe time occasionally.

Tracked-On: #1363
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:19:14 +08:00
Yonghua Huang 38d5df723d hv:enable APICv-Posted Interrupt
to enable APICv Posted interrupt supported, following the
 specifications defined in Intel SDM Section #29.6, Volume3.

 Posted-interrupt processing is a feature by which a processor
 processes the virtual interrupts by recording them as pending
 on the virtual-APIC page.

 Injecting interrupts to VCPU from remote CPU without causing
 VM exit on the destination, following steps in SDM Section 29.6,volume3:

Tracked-On: #1447
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:18:24 +08:00
Jason Chen CJ a028567b9c vpic: change assert/deassert method
use pin_state[pin] to record vpic pin signal, and change the interface name
accordingly.

Tracked-On: #1269
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-10-15 15:50:55 +08:00
Binbin Wu f9a163954d dm: passthru: fix hardcoded nhlt table length
NHLT table contains the settings some audio drivers need.
An ACPI method is used to get NHLT table address & length.
In current DM code, the NHLT talbe length in the ACPI method
is hardcoded, which will cause troubles when the length of the
table changed.
This patch replaces the hardcoded NHLT table length according to
the table length read from SOS.

Tracked-On: #1461
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-15 13:44:48 +08:00
Mingqiang Chi 1d725c89c0 hv:Replace dynamic memory with static for vcpu
-- Replace dynamic memory allocation with static memory
-- Remove parameter check if vcpu is NULL

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 13:44:25 +08:00
junjunshan1 7dd35cb72e hv: Fix identifier reuse
Now we have name reuse definitions in hypervisor as following:
"enum cpu_state cpu_state" in per_cpu.h,
"struct shell_cmd *shell_cmd" in shell_priv.h.
MISRAC requires that tag names shall not be reused anywhere
with in a program.So these definitions violate MISRAC rules
"identifier resue".This patch is used to fix it.

1. modify the definitions to "enum pcpu_boot_state boot_state"
and "struct shell_cmd *cmds".
2. modifty the relevant usage.

v1->v2
    update commit message to be more explicit.

v2->v3
    update the enum definition.

Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:34 +08:00
Yin Fengwei dbd9ab07e1 hv: Cleanup: Remove dead code.
Now, UOS will use hypercall to init BSP state, we could remove
set_bsp_real_mode_entry() and set_bsp_protect_mode_regs().

For SOS, GDT will inherit from SBL or UEFI. For UOS, DM will
prepare GDT. We don't need hypervisor to prepare GDT for guest.

The entry_addr of vcpu struct could be removed. The guest entry
is set through BSP rip register.

GUEST_CFG_OFFSET is not needed any more after this patchset.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei b1ccde55a8 hv: Cleanup: set vcpu mode in vcpu_set_regs
Move vcpu mode set to function vcpu_set_regs.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei 29190ed219 dm: add call to set BSP init state for UOS S3 and system reset
For UOS, we need to call hypercall to set BSP init state now.
So we can't combint the vm start and vm reset (vm reset will
reset the vcpu context). Remove vm start from reset_vm. DM
needs to start vm after every vm reset.

Update DM to set UOS BSP init state after vm reset and before
vm start.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei 113adea0de hv: not start vm automatically when reset vm
For UOS, there is no BSP init state saved in hv. We always need
DM to set BSP init state by using hypercall. So we can't auto
start vm during vm reset.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei b454a067be hv: remove the vm loader for UOS in hv.
Now, we make UOS to set BSP init state by using hypercall. We
could drop the old UOS loader in HV and make vm loader in HV
only for SOS.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei fc575460a3 dm: update the bzimage loader
to use new interface to set the state of guest BSP (entries, general
registers etc) when DM load bzimage.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei 96d999544c dm: update the vsbl loader
to use new interface to set the state of guest BSP (entries, general
registers etc) when DM load vsbl.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei 853b1c74cb dm: add API to set vcpu regs of guest
Add ioctl parameter and API to set vcpu regs. The guest software
loader will call this API to set guest vcpu registers.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Yin Fengwei 3cfbc004f5 hv: add hypercall to set vcpu init state
DM will use this hypercall to initialize the UOS BSP state.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:10 +08:00
Junjie Mao 66b53f8248 kconfig patch
Use customized function to generate proper config.h
which depend on kconfig,write the customized format
to support it.

V1->V2:
    Add comments.

Tracked-On: #861
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-10-12 16:32:25 +08:00
Huihuang Shi d859182d41 customize function to generate config.h with proper suffixes
Add new format to parsed by kconfig to support
U and UL.
When config is 'int',if this symbol have 'range'
key words and bigger or qeual to 0,the int macro
will have suffix 'U'.
When config is 'hex',the suffix is 'U'.
When config have 'help' keywords,and the help contents
have the string "64-bit integer",it will add suffix 'L'.

V1->V2:
     1.modified the comments to let it much eaisy to understand.
     2.change the values' name protected_foot,protected_tai to
     guard_begin and guard_end.
     3.add regex to identified the '64-bit' and 'integer'.

V2->V3:
     1.remove kconfiglib internal attribute
     2.use config_string to avoid no active config entry

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
2018-10-12 16:32:25 +08:00
Huihuang Shi 8ccaf3c3e8 use genld.sh to generate link_ram.ld
Use genld.sh instead of config.h to generate link_ram.ld.
It can avoid the conflicts of the syntax between ld script and
C.

V1->V2:
    change the deps name to config,

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
reviewed-by: Junjie Mao <junjie.mao@intel.com>
2018-10-12 16:32:25 +08:00
Yu Wang 203016b406 dm: passthru: correct the name of xdci dsdt write function
The write_dsdt_xhci function is use for describe the xdci dsdt table.
Correct its name.

Tracked-On: #1444
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-10-12 16:30:57 +08:00