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

Commit

Permalink
test: enable earlyprintk
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi committed Oct 31, 2016
1 parent d216381 commit a9b0010
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions meta-ostro-xt/classes/ostro-xt-image.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ IMAGE_INSTALL += "${IMAGE_INSTALL_THERMAL_DAEMON}"

# add package of Joule hardware specific udev rules
IMAGE_INSTALL += "joule-udev-rules"


APPEND = "rootwait console=ttyS2,115200 initcall_debug video=efifb maxcpus=4 noxsave reboot=efi kmemleak=off earlyprintk=pciserial,00:18.2,noclasscheck,nocfg ignore_loglevel fsck.mode=skip no-ima ro"
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

### temporary
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ 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://0001-x86-early_printk-Allow-for-skipping-PCI-class-check.patch"

LINUX_VERSION_INTEL_COMMON_forcevariable = "4.4.26"
KBRANCH_corei7-64-intel-common_forcevariable = "standard/intel/bxt-rebase;rebaseable=1"
Expand Down

0 comments on commit a9b0010

Please sign in to comment.