Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

test: enable earlyprintk #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions meta-ostro-xt/conf/distro/include/ostroproject-ci.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ OSTRO_VM_IMAGE_TYPES = "dsk.xz dsk.ova dsk.bmap dsk.xz.sha256sum"
OSTROPROJECT_CI_BUILD_TARGETS=" \
ostro-xt-image-noswupd \
ostro-xt-image-noswupd-benchmark-qa \
ostro-xt-image-swupd \
"

# Following targets will be executed with do_populate_sdk
Expand All @@ -61,14 +60,14 @@ OSTROPROJECT_CI_ESDK_TARGETS="${OSTROPROJECT_CI_SDK_TARGETS}"
SDKIMAGE_FEATURES_remove = "dbg-pkgs"

# Target(s) for the task "do_test_iot_export":
OSTROPROJECT_CI_TEST_EXPORT_TARGETS="ostro-xt-image-swupd"
OSTROPROJECT_CI_TEST_EXPORT_TARGETS="ostro-xt-image-noswupd"

# Automatic tests. Entries are separated by spaces.
# Each entry is a tuple, in the format:
# <image_name>,<testsuite_name>,<testfiles_name>,$MACHINE

OSTROPROJECT_CI_TEST_RUNS=" \
ostro-xt-image-swupd,iot-testsuite.tar.gz,iot-testfiles.${MACHINE}.tar.gz,${MACHINE} \
ostro-xt-image-noswupd,iot-testsuite.tar.gz,iot-testfiles.${MACHINE}.tar.gz,${MACHINE} \
"

# In the CI system, the integer OS version used for swupd is
Expand Down
3 changes: 3 additions & 0 deletions meta-ostro-xt/conf/distro/ostro-xt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ SERIAL_CONSOLE = "115200 ttyS2"
# need to get rid of it.
APPEND_remove = "console=ttyS0,115200"

# DEBUG
APPEND += " initcall_debug earlyprintk=pciserial,00:18.2,noclasscheck,nocfg apic=debug ignore_loglevel panic=1"

# Mixing X11 startup from meta-oe (xserver-common) and OE-core
# (x11-common) fails (they conflict). xserver-nodm-init from meta-oe
# brings in xserver-common, so we stick to the one from OE-core.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From d8a4e34557d151b1036adaa0f14f041c07b0d133 Mon Sep 17 00:00:00 2001
From: Fei Yang <[email protected]>
Date: Mon, 31 Oct 2016 12:46:58 -0700
Subject: [PATCH] DBG: remove ttyS2 for BXT

Signed-off-by: Fei Yang <[email protected]>
---
drivers/mfd/intel-lpss-pci.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index a19e571..7b892c4 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -135,7 +135,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
{ PCI_VDEVICE(INTEL, 0x0aba), (kernel_ulong_t)&bxt_i2c_info },
{ PCI_VDEVICE(INTEL, 0x0abc), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x0abe), (kernel_ulong_t)&bxt_uart_info },
- { PCI_VDEVICE(INTEL, 0x0ac0), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x0ac2), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x0ac4), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x0ac6), (kernel_ulong_t)&bxt_info },
@@ -151,7 +150,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
{ PCI_VDEVICE(INTEL, 0x1aba), (kernel_ulong_t)&bxt_i2c_info },
{ PCI_VDEVICE(INTEL, 0x1abc), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x1abe), (kernel_ulong_t)&bxt_uart_info },
- { PCI_VDEVICE(INTEL, 0x1ac0), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x1ac2), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x1ac4), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info },
@@ -168,7 +166,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
{ PCI_VDEVICE(INTEL, 0x5aba), (kernel_ulong_t)&bxt_i2c_info },
{ PCI_VDEVICE(INTEL, 0x5abc), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x5abe), (kernel_ulong_t)&bxt_uart_info },
- { PCI_VDEVICE(INTEL, 0x5ac0), (kernel_ulong_t)&bxt_uart_info },
{ PCI_VDEVICE(INTEL, 0x5ac2), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x5ac4), (kernel_ulong_t)&bxt_info },
{ PCI_VDEVICE(INTEL, 0x5ac6), (kernel_ulong_t)&bxt_info },
--
1.9.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From 8968d9311f2c2ebf456aba0180f44364c2129848 Mon Sep 17 00:00:00 2001
From: Ilkka Koskinen <[email protected]>
Date: Tue, 15 Nov 2016 09:02:52 -0800
Subject: [PATCH] [DO NOT MERGE] intel_pmc_ipc: Debug messages to see when ipc
calls are sent first time

---
drivers/platform/x86/intel_pmc_ipc.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index 6f497e8..cd92364 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -238,13 +238,23 @@ int intel_pmc_ipc_simple_command(int cmd, int sub)
{
int ret;

+ static int dbgprint = 0;
+ if (!dbgprint)
+ printk(KERN_ERR "DEBUG: %s(%d)\n", __func__, __LINE__);
+
mutex_lock(&ipclock);
if (ipcdev.dev == NULL) {
+ if (!dbgprint)
+ printk(KERN_ERR "DEBUG: %s(%d)\n", __func__, __LINE__);
mutex_unlock(&ipclock);
return -ENODEV;
}
ipc_send_command(sub << IPC_CMD_SUBCMD | cmd);
ret = intel_pmc_ipc_check_status();
+ if (!dbgprint) {
+ printk(KERN_ERR "DEBUG: %s(%d)\n", __func__, __LINE__);
+ dbgprint++;
+ }
mutex_unlock(&ipclock);

return ret;
@@ -272,10 +282,14 @@ int intel_pmc_ipc_raw_cmd(u32 cmd, u32 sub, u8 *in, u32 inlen, u32 *out,
u32 wbuf[4] = { 0 };
int ret;
int i;
+ static int dbgprint = 0;

if (inlen > IPC_DATA_BUFFER_SIZE || outlen > IPC_DATA_BUFFER_SIZE / 4)
return -EINVAL;

+ if (!dbgprint)
+ printk(KERN_ERR "DEBUG: %s(%d)\n", __func__, __LINE__);
+
mutex_lock(&ipclock);
if (ipcdev.dev == NULL) {
mutex_unlock(&ipclock);
@@ -295,6 +309,10 @@ int intel_pmc_ipc_raw_cmd(u32 cmd, u32 sub, u8 *in, u32 inlen, u32 *out,
for (i = 0; i < outlen; i++)
*out++ = ipc_data_readl(4 * i);
}
+ if (!dbgprint) {
+ printk(KERN_ERR "DEBUG: %s(%d)\n", __func__, __LINE__);
+ dbgprint++;
+ }
mutex_unlock(&ipclock);

return ret;
--
2.7.4

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
From 6fd469063b7515dae4ee845775b299a2e5c1cf2a Mon Sep 17 00:00:00 2001
From: Andy Ross <[email protected]>
Date: Mon, 9 Nov 2015 14:58:17 -0800
Subject: [PATCH] x86: early_printk: Allow for skipping PCI class check

Some PCI UART devices have nonstandard class codes, but still want to
be used as a boot console. Allow for skipping the class check on such
platforms when you know that the passed device is correct.

---
arch/x86/kernel/early_printk.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 21bf924..27ae392 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -218,7 +218,7 @@ static __init void early_pci_serial_init(char *s)
{
unsigned divisor;
unsigned long baud = DEFAULT_BAUD;
- u8 bus, slot, func;
+ u8 bus, slot, func, classcheck = 1;
u32 classcode, bar0;
u16 cmdreg;
char *e;
@@ -246,6 +246,15 @@ static __init void early_pci_serial_init(char *s)
func = (u8)simple_strtoul(s, &e, 16);
s = e;

+ /*
+ * Not all PCI UART devices have sane class codes, so allow a
+ * "noclasscheck" flag to be prepended to disable the test.
+ */
+ if (strstarts(s, ",noclasscheck")) {
+ classcheck = 0;
+ s += 13;
+ }
+
/* A baud might be following */
if (*s == ',')
s++;
@@ -260,10 +269,12 @@ static __init void early_pci_serial_init(char *s)
/*
* Verify it is a UART type device
*/
- if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
- (classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
- (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */
- return;
+ if (classcheck) {
+ if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
+ (classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
+ (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */
+ return;
+ }

/*
* Determine if it is IO or memory mapped
--
1.9.1

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ CONFIG_MAC80211=n
CONFIG_IWLWIFI=n
CONFIG_IWLDVM=n
CONFIG_IWLWIFI_P2P=n

# for debugging purposes
CONFIG_RANDOMIZE_BASE=n
7 changes: 7 additions & 0 deletions meta-ostro-xt/recipes-kernel/linux/linux-yocto_4.4.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI_prepend_intel-corei7-64 = "file://fix_branch.scc "
SRC_URI_append_intel-corei7-64 = " file://disable-iwlwifi-upstream.cfg"
SRC_URI_append_intel-corei7-64 = " file://debug-kernel.cfg"
SRC_URI_append_intel-corei7-64 = " file://0001-x86-early_printk-Allow-for-skipping-PCI-class-check.patch"
#SRC_URI_append_intel-corei7-64 = " file://0001-DO-NOT-MERGE-intel_pmc_ipc-Debug-messages-to-see-whe.patch"
#SRC_URI_append_intel-corei7-64 = " file://0001-DBG-remove-ttyS2-for-BXT.patch"

LINUX_VERSION_INTEL_COMMON_forcevariable = "4.4.32"
KBRANCH_corei7-64-intel-common_forcevariable = "standard/intel/bxt-rebase;rebaseable=1"
Expand All @@ -25,6 +29,9 @@ KERNEL_FEATURES_remove_corei7-64-intel-common = "features/amt/mei/mei.scc"
# Non-standard feature which should only be enabled on platforms which need it.
KERNEL_FEATURES_append_corei7-64-intel-common = " features/mei/mei-spd.scc"

# deploy vmlinux
KERNEL_ALT_IMAGETYPE = "vmlinux"

# Removal will also happen in meta-ostro-bsp
# (https://github.com/ostroproject/meta-ostro-bsp/pull/57) but for now
# remove them directly here because otherwise the new upstream code
Expand Down