xen: arm64: Add 8250 earlyprintk support
PATCH v2 1/15 xen: arm64: Add 8250 earlyprintk support
From: Pranavkumar Sawargaonkar <[email protected]>
Extracted from "Basic Platform support for APM X-Gene Storm."
Reworked into generic 8250 driver, use EARLY_UART_REG_SHIFT.
While there observe a missing shift in the arm32 version (UART_THR is zero so it doesn't really matter). Changed for consistency.
---
v2: Drop unused early_uart_init macro
--- xen/arch/arm/Rules.mk | 6 +++++ xen/arch/arm/arm64/debug-8250.inc | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 xen/arch/arm/arm64/debug-8250.inc
xen/arch/arm/Rules.mk +6 -0
@@ -82,6 +82,12 @@ EARLY_PRINTK_INC := 8250 EARLY_UART_BASE_ADDRESS := 0xF0406B00 EARLY_UART_REG_SHIFT := 2 endif +ifeq ($(CONFIG_EARLY_PRINTK), xgene-storm) +EARLY_PRINTK_INC := 8250 +EARLY_PRINTK_BAUD := 115200 +EARLY_UART_BASE_ADDRESS := 0x1c020000 +EARLY_UART_REG_SHIFT := 2 +endif ifneq ($(EARLY_PRINTK_INC),) EARLY_PRINTK := y
xen/arch/arm/arm64/debug-8250.inc new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.7.10.4
cover xen: arm initial support for xgene arm64 platform
Damnit. Missed the --dry-run... Oh well, the patches are actually correct I think.
The 00/15 mail would have contained:
This addresses the previous review.
In particular it drops the RFC from a couple of patches and replaces the HACKs with clean solutions.
A==acked. H==replaces a HACK. R==release acked. r==might be release akced but George wasn't 100% explicit.
R xen: arm64: Add 8250 earlyprintk support
A R xen: arm64: Add Basic Platform support for APM X-Gene Storm. A R xen: arm64: Add APM implementor id to processor implementers.
H xen: arm: add a quirk to handle platforms with unusual GIC layout A xen: arm: allow platform code to select dom0 event channel irq H xen: arm64: Map xgene PCI memory regions and interrupts to dom0.
A R xen: arm: include ns16550 driver on arm64 too
A r xen: arm: early logging of command line
r xen: arm: Handle cpus nodes with #address-cells > 1
R xen: arm: Make register bit definitions unsigned.
A R xen: arm: explicitly map 64 bit release address
R xen: arm: enable synchronous console while starting secondary CPUs R xen: arm: Add debug keyhandler to dump the physical GIC state.
A R xen: arm: improve early memory map readability
r xen: arm: handle 40-bit addresses in the p2m
Re: [PATCH 00/15] xen: arm initial support for xgene arm64 platform
Quoted 19 lines · Ian Campbell
Damnit. Missed the --dry-run... Oh well, the patches are actually correct I think.
The 00/15 mail would have contained:
This addresses the previous review.
In particular it drops the RFC from a couple of patches and replaces the HACKs with clean solutions.
A==acked. H==replaces a HACK. R==release acked. r==might be release akced but George wasn't 100% explicit.
R xen: arm64: Add 8250 earlyprintk support
A R xen: arm64: Add Basic Platform support for APM X-Gene Storm. A R xen: arm64: Add APM implementor id to processor implementers.H xen: arm: add a quirk to handle platforms with unusual GIC layout A xen: arm: allow platform code to select dom0 event channel irq H xen: arm64: Map xgene PCI memory regions and interrupts to dom0.
Quoted 9 lines
A R xen: arm: include ns16550 driver on arm64 too
A r xen: arm: early logging of command line
r xen: arm: Handle cpus nodes with #address-cells > 1
R xen: arm: Make register bit definitions unsigned.
A R xen: arm: explicitly map 64 bit release address
R xen: arm: enable synchronous console while starting secondary CPUs R xen: arm: Add debug keyhandler to dump the physical GIC state.
A R xen: arm: improve early memory map readability
r xen: arm: handle 40-bit addresses in the p2m
OK -- everything looks good release-wise.
-George
Re: [PATCH 00/15] xen: arm initial support for xgene arm64 platform
Quoted 30 lines · George Dunlap
Quoted 19 lines · Ian Campbell
Damnit. Missed the --dry-run... Oh well, the patches are actually correct I think.
The 00/15 mail would have contained:
This addresses the previous review.
In particular it drops the RFC from a couple of patches and replaces the HACKs with clean solutions.
A==acked. H==replaces a HACK. R==release acked. r==might be release akced but George wasn't 100% explicit.
R xen: arm64: Add 8250 earlyprintk support
A R xen: arm64: Add Basic Platform support for APM X-Gene Storm. A R xen: arm64: Add APM implementor id to processor implementers.H xen: arm: add a quirk to handle platforms with unusual GIC layout A xen: arm: allow platform code to select dom0 event channel irq H xen: arm64: Map xgene PCI memory regions and interrupts to dom0.Quoted 9 lines
A R xen: arm: include ns16550 driver on arm64 too
A r xen: arm: early logging of command line
r xen: arm: Handle cpus nodes with #address-cells > 1
R xen: arm: Make register bit definitions unsigned.
A R xen: arm: explicitly map 64 bit release address
R xen: arm: enable synchronous console while starting secondary CPUs R xen: arm: Add debug keyhandler to dump the physical GIC state.
A R xen: arm: improve early memory map readability
r xen: arm: handle 40-bit addresses in the p2m
Quoted 1 line
OK -- everything looks good release-wise.
Thanks.
Ian.
Re: [PATCH 00/15] xen: arm initial support for xgene arm64 platform
Quoted 3 lines · Ian Campbell
Quoted 1 line
OK -- everything looks good release-wise.
Thanks.
Stefano acked the last patch so I have now pushed this.
Quoted 7 lines · Ian Campbell
From: Pranavkumar Sawargaonkar <[email protected]>
Extracted from "Basic Platform support for APM X-Gene Storm."
Signed-off-by Anup Patel <[email protected]>Signed-off-by Pranavkumar Sawargaonkar <[email protected]>
Quoted 6 lines
Reworked into generic 8250 driver, use
EARLY_UART_REG_SHIFT.While there observe a missing shift in the arm32 version (
UART_THRis zero so it doesn't really matter). Changed for consistency.Signed-off-by Ian Campbell <[email protected]>
Quoted 77 lines
---
v2: Drop unusedearly_uart_initmacro--- xen/arch/arm/Rules.mk | 6 +++++ xen/arch/arm/arm64/debug-8250.inc | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+)create mode 100644 xen/arch/arm/arm64/debug-8250.inc
xen/arch/arm/Rules.mk +6
-0@@ -82,6 +82,12 @@ EARLY_PRINTK_INC := 8250 EARLY_UART_BASE_ADDRESS := 0xF0406B00 EARLY_UART_REG_SHIFT := 2 endif +ifeq ($(CONFIG_EARLY_PRINTK), xgene-storm) +EARLY_PRINTK_INC := 8250 +EARLY_PRINTK_BAUD := 115200 +EARLY_UART_BASE_ADDRESS := 0x1c020000 +EARLY_UART_REG_SHIFT := 2 +endif ifneq ($(EARLY_PRINTK_INC),) EARLY_PRINTK := yxen/arch/arm/arm64/debug-8250.inc new file +45
-0@@ -0,0 +1,45 @@ +/* + * xen/arch/arm/arm64/debug-8250.inc + * + * 8250 specific debug code + * + * Copyright (c) 2013 Applied Micro. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <xen/8250-uart.h> + +/* UART wait UART to be ready to transmit + * xb: register which contains the UART base address + * c: scratch register */ +.macro early_uart_ready xb c +1: + ldrb w\c, [\xb, #UART_LSR << EARLY_UART_REG_SHIFT] + and w\c, w\c, #UART_LSR_THRE + cmp w\c, #UART_LSR_THRE + b.ne 1b +.endm + +/* UART transmit character + * xb: register which contains the UART base address + * wt: register which contains the character to transmit */ +.macro early_uart_transmit xb wt + /* UART_THR transmit holding */ + strb \wt, [\xb, #UART_THR << EARLY_UART_REG_SHIFT] +.endm + +/* + * Local variables: + * mode: ASM + * indent-tabs-mode: nil + * End: + */
Signature · 1 line
Julien Grall