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

Commit c0f4de8

Browse files
committed
test: enable earlyprintk
v2: test version that disables serial console completely v3: publish vmlinux too v4: build Intel PMC as a module v5: drop "keep" from earlyprintk v6: add "keep" back and disable kernel base addr randomization Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent b20956a commit c0f4de8

File tree

6 files changed

+117
-0
lines changed

6 files changed

+117
-0
lines changed

meta-ostro-xt/conf/distro/ostro-xt.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ SERIAL_CONSOLE = "115200 ttyS2"
6161
# need to get rid of it.
6262
APPEND_remove = "console=ttyS0,115200"
6363

64+
# DEBUG
65+
APPEND += " initcall_debug earlyprintk=pciserial,00:18.2,noclasscheck,nocfg,keep apic=debug ignore_loglevel"
66+
6467
# Mixing X11 startup from meta-oe (xserver-common) and OE-core
6568
# (x11-common) fails (they conflict). xserver-nodm-init from meta-oe
6669
# brings in xserver-common, so we stick to the one from OE-core.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From d8a4e34557d151b1036adaa0f14f041c07b0d133 Mon Sep 17 00:00:00 2001
2+
From: Fei Yang <fei.yang@intel.com>
3+
Date: Mon, 31 Oct 2016 12:46:58 -0700
4+
Subject: [PATCH] DBG: remove ttyS2 for BXT
5+
6+
Signed-off-by: Fei Yang <fei.yang@intel.com>
7+
---
8+
drivers/mfd/intel-lpss-pci.c | 3 ---
9+
1 file changed, 3 deletions(-)
10+
11+
diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
12+
index a19e571..7b892c4 100644
13+
--- a/drivers/mfd/intel-lpss-pci.c
14+
+++ b/drivers/mfd/intel-lpss-pci.c
15+
@@ -135,7 +135,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
16+
{ PCI_VDEVICE(INTEL, 0x0aba), (kernel_ulong_t)&bxt_i2c_info },
17+
{ PCI_VDEVICE(INTEL, 0x0abc), (kernel_ulong_t)&bxt_uart_info },
18+
{ PCI_VDEVICE(INTEL, 0x0abe), (kernel_ulong_t)&bxt_uart_info },
19+
- { PCI_VDEVICE(INTEL, 0x0ac0), (kernel_ulong_t)&bxt_uart_info },
20+
{ PCI_VDEVICE(INTEL, 0x0ac2), (kernel_ulong_t)&bxt_info },
21+
{ PCI_VDEVICE(INTEL, 0x0ac4), (kernel_ulong_t)&bxt_info },
22+
{ PCI_VDEVICE(INTEL, 0x0ac6), (kernel_ulong_t)&bxt_info },
23+
@@ -151,7 +150,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
24+
{ PCI_VDEVICE(INTEL, 0x1aba), (kernel_ulong_t)&bxt_i2c_info },
25+
{ PCI_VDEVICE(INTEL, 0x1abc), (kernel_ulong_t)&bxt_uart_info },
26+
{ PCI_VDEVICE(INTEL, 0x1abe), (kernel_ulong_t)&bxt_uart_info },
27+
- { PCI_VDEVICE(INTEL, 0x1ac0), (kernel_ulong_t)&bxt_uart_info },
28+
{ PCI_VDEVICE(INTEL, 0x1ac2), (kernel_ulong_t)&bxt_info },
29+
{ PCI_VDEVICE(INTEL, 0x1ac4), (kernel_ulong_t)&bxt_info },
30+
{ PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info },
31+
@@ -168,7 +166,6 @@ static const struct pci_device_id intel_lpss_pci_ids[] = {
32+
{ PCI_VDEVICE(INTEL, 0x5aba), (kernel_ulong_t)&bxt_i2c_info },
33+
{ PCI_VDEVICE(INTEL, 0x5abc), (kernel_ulong_t)&bxt_uart_info },
34+
{ PCI_VDEVICE(INTEL, 0x5abe), (kernel_ulong_t)&bxt_uart_info },
35+
- { PCI_VDEVICE(INTEL, 0x5ac0), (kernel_ulong_t)&bxt_uart_info },
36+
{ PCI_VDEVICE(INTEL, 0x5ac2), (kernel_ulong_t)&bxt_info },
37+
{ PCI_VDEVICE(INTEL, 0x5ac4), (kernel_ulong_t)&bxt_info },
38+
{ PCI_VDEVICE(INTEL, 0x5ac6), (kernel_ulong_t)&bxt_info },
39+
--
40+
1.9.1
41+
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
From 6fd469063b7515dae4ee845775b299a2e5c1cf2a Mon Sep 17 00:00:00 2001
2+
From: Andy Ross <andrew.j.ross@intel.com>
3+
Date: Mon, 9 Nov 2015 14:58:17 -0800
4+
Subject: [PATCH] x86: early_printk: Allow for skipping PCI class check
5+
6+
Some PCI UART devices have nonstandard class codes, but still want to
7+
be used as a boot console. Allow for skipping the class check on such
8+
platforms when you know that the passed device is correct.
9+
10+
---
11+
arch/x86/kernel/early_printk.c | 21 ++++++++++++++++-----
12+
1 file changed, 16 insertions(+), 5 deletions(-)
13+
14+
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
15+
index 21bf924..27ae392 100644
16+
--- a/arch/x86/kernel/early_printk.c
17+
+++ b/arch/x86/kernel/early_printk.c
18+
@@ -218,7 +218,7 @@ static __init void early_pci_serial_init(char *s)
19+
{
20+
unsigned divisor;
21+
unsigned long baud = DEFAULT_BAUD;
22+
- u8 bus, slot, func;
23+
+ u8 bus, slot, func, classcheck = 1;
24+
u32 classcode, bar0;
25+
u16 cmdreg;
26+
char *e;
27+
@@ -246,6 +246,15 @@ static __init void early_pci_serial_init(char *s)
28+
func = (u8)simple_strtoul(s, &e, 16);
29+
s = e;
30+
31+
+ /*
32+
+ * Not all PCI UART devices have sane class codes, so allow a
33+
+ * "noclasscheck" flag to be prepended to disable the test.
34+
+ */
35+
+ if (strstarts(s, ",noclasscheck")) {
36+
+ classcheck = 0;
37+
+ s += 13;
38+
+ }
39+
+
40+
/* A baud might be following */
41+
if (*s == ',')
42+
s++;
43+
@@ -260,10 +269,12 @@ static __init void early_pci_serial_init(char *s)
44+
/*
45+
* Verify it is a UART type device
46+
*/
47+
- if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
48+
- (classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
49+
- (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */
50+
- return;
51+
+ if (classcheck) {
52+
+ if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
53+
+ (classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
54+
+ (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */
55+
+ return;
56+
+ }
57+
58+
/*
59+
* Determine if it is IO or memory mapped
60+
--
61+
1.9.1
62+

meta-ostro-xt/recipes-kernel/linux/linux-yocto/disable-iwlwifi-upstream.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ CONFIG_MAC80211=n
55
CONFIG_IWLWIFI=n
66
CONFIG_IWLDVM=n
77
CONFIG_IWLWIFI_P2P=n
8+
9+
# for debugging purposes
10+
CONFIG_RANDOMIZE_BASE=n
11+
CONFIG_RANDOMIZE_BASE_MAX_OFFSET=n
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_INTEL_PMC_IPC=m

meta-ostro-xt/recipes-kernel/linux/linux-yocto_4.4.bbappend

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
22

33
SRC_URI_prepend_intel-corei7-64 = "file://fix_branch.scc "
44
SRC_URI_append_intel-corei7-64 = " file://disable-iwlwifi-upstream.cfg"
5+
SRC_URI_append_intel-corei7-64 = " file://intel-pmc-as-module.cfg"
6+
SRC_URI_append_intel-corei7-64 = " file://0001-x86-early_printk-Allow-for-skipping-PCI-class-check.patch"
7+
#SRC_URI_append_intel-corei7-64 = " file://0001-DBG-remove-ttyS2-for-BXT.patch"
58

69
LINUX_VERSION_INTEL_COMMON_forcevariable = "4.4.26"
710
KBRANCH_corei7-64-intel-common_forcevariable = "standard/intel/bxt-rebase;rebaseable=1"
@@ -25,6 +28,9 @@ KERNEL_FEATURES_remove_corei7-64-intel-common = "features/amt/mei/mei.scc"
2528
# Non-standard feature which should only be enabled on platforms which need it.
2629
KERNEL_FEATURES_append_corei7-64-intel-common = " features/mei/mei-spd.scc"
2730

31+
# deploy vmlinux
32+
KERNEL_ALT_IMAGETYPE = "vmlinux"
33+
2834
# Removal will also happen in meta-ostro-bsp
2935
# (https://github.com/ostroproject/meta-ostro-bsp/pull/57) but for now
3036
# remove them directly here because otherwise the new upstream code

0 commit comments

Comments
 (0)