tty/powerpc: introduce the ePAPR embedded hypervisor byte channel driver
PATCH v2 6/7 tty/powerpc: introduce the ePAPR embedded hypervisor byte channel driver
The ePAPR embedded hypervisor specification provides an API for "byte channels", which are serial-like virtual devices for sending and receiving streams of bytes. This driver provides Linux kernel support for byte channels via three distinct interfaces:
1) An early-console (udbg) driver. This provides early console output through a byte channel. The byte channel handle must be specified in a Kconfig option.
2) A normal console driver. Output is sent to the byte channel designated for stdout in the device tree. The console driver is for handling kernel printk calls.
3) A tty driver, which is used to handle user-space input and output. The byte channel used for the console is designated as the default tty.
--- arch/powerpc/include/asm/udbg.h | 1 + arch/powerpc/kernel/udbg.c | 2 + drivers/tty/Kconfig | 33 ++ drivers/tty/Makefile | 1 + drivers/tty/ehv_bytechan.c | 888 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 925 insertions(+), 0 deletions(-) create mode 100644 drivers/tty/ehv_bytechan.c
arch/powerpc/include/asm/udbg.h +1 -0
@@ -52,6 +52,7 @@ extern void __init udbg_init_44x_as1(void);extern void __init udbg_init_40x_realmode (void );extern void __init udbg_init_cpm (void );extern void __init udbg_init_usbgecko (void ); +extern void __init udbg_init_ehv_bc (void );#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_UDBG_H */
arch/powerpc/kernel/udbg.c +2 -0
@@ -62,6 +62,8 @@ void __init udbg_early_init(void)udbg_init_cpm ();#elif defined(CONFIG_PPC_EARLY_DEBUG_USBGECKO )udbg_init_usbgecko (); +#elif defined(CONFIG_PPC_EARLY_DEBUG_EHV_BC ) +udbg_init_ehv_bc ();#endif #ifdef CONFIG_PPC_EARLY_DEBUG
drivers/tty/Kconfig +33 -0
@@ -319,3 +319,36 @@ config N_GSM This line discipline provides support for the GSM MUX protocol and presents the mux as a set of 61 individual tty devices. +config PPC_EPAPR_HV_BYTECHAN + tristate "ePAPR hypervisor byte channel driver" + depends on PPC + help + This driver creates /dev entries for each ePAPR hypervisor byte + channel, thereby allowing applications to communicate with byte + channels as if they were serial ports. + +config PPC_EARLY_DEBUG_EHV_BC + bool "Early console (udbg) support for ePAPR hypervisors" + depends on PPC_EPAPR_HV_BYTECHAN + help + Select this option to enable early console (a.k.a. "udbg") support + via an ePAPR byte channel. You also need to choose the byte channel + handle below. + +config PPC_EARLY_DEBUG_EHV_BC_HANDLE + int "Byte channel handle for early console (udbg)" + depends on PPC_EARLY_DEBUG_EHV_BC + default 0 + help + If you want early console (udbg) output through a byte channel, + specify the handle of the byte channel to use. + + For this to work, the byte channel driver must be compiled + in-kernel, not as a module. + + Note that only one early console driver can be enabled, so don't + enable any others if you enable this one. + + If the number you specify is not a valid byte channel handle, then + there simply will be no early console output. This is true also + if you don't boot under a hypervisor at all.
drivers/tty/Makefile +1 -0
@@ -24,5 +24,6 @@ obj-$(CONFIG_ROCKETPORT) += rocket.o obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o obj-$(CONFIG_SYNCLINK) += synclink.o +obj-$(CONFIG_PPC_EPAPR_HV_BYTECHAN) += ehv_bytechan.o obj-y += ipwireless/
drivers/tty/ehv_bytechan.c new file +888 -0
888 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Quoted 9 lines · Timur Tabi
The ePAPR embedded hypervisor specification provides an API for "byte channels", which are serial-like virtual devices for sending and receiving streams of bytes. This driver provides Linux kernel support for byte channels via three distinct interfaces:
1) An early-console (udbg) driver. This provides early console output through a byte channel. The byte channel handle must be specified in a
Kconfigoption.
Quoted 8 lines
2) A normal console driver. Output is sent to the byte channel designated for stdout in the device tree. The console driver is for handling kernel printk calls.
3) A tty driver, which is used to handle user-space input and output. The byte channel used for the console is designated as the default tty.
Signed-off-by Timur Tabi <[email protected]>
I know you guys are busy, but can I get an ACK or two on this patch, if there are no issues with it? It's the only one of the seven that doesn't have one. I think v2 has addressed all of the concerns raised on version 1.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 9 lines · Timur Tabi
The ePAPR embedded hypervisor specification provides an API for "byte channels", which are serial-like virtual devices for sending and receiving streams of bytes. This driver provides Linux kernel support for byte channels via three distinct interfaces:
1) An early-console (udbg) driver. This provides early console output through a byte channel. The byte channel handle must be specified in a
Kconfigoption.
Quoted 8 lines
2) A normal console driver. Output is sent to the byte channel designated for stdout in the device tree. The console driver is for handling kernel printk calls.
3) A tty driver, which is used to handle user-space input and output. The byte channel used for the console is designated as the default tty.
Signed-off-by Timur Tabi <[email protected]>
Greg, would you please pick up this patch for 3.1? Patches 1-5 are already queued through the PowerPC tree.
Thank you.
The patch is available here if you need to download it:
http://patchwork.ozlabs.org/patch/96443/
Signature · 6 lines
Timur Tabi Linux kernel developer at Freescale -- To unsubscribe from this list: send the line "unsubscribe linux-console" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Timur Tabi
The ePAPR embedded hypervisor specification provides an API for "byte channels", which are serial-like virtual devices for sending and receiving streams of bytes. This driver provides Linux kernel support for byte channels via three distinct interfaces:
1) An early-console (udbg) driver. This provides early console output through a byte channel. The byte channel handle must be specified in a
Kconfigoption.
Quoted 8 lines
2) A normal console driver. Output is sent to the byte channel designated for stdout in the device tree. The console driver is for handling kernel printk calls.
3) A tty driver, which is used to handle user-space input and output. The byte channel used for the console is designated as the default tty.
Signed-off-by Timur Tabi <[email protected]>
Doesn't apply at all to the tty-next tree, so I can't apply it here :(
Quoted 5 lines · Greg KH
Quoted 4 lines
Quoted 4 lines
3) A tty driver, which is used to handle user-space input and output. The byte channel used for the console is designated as the default tty.
Signed-off-by Timur Tabi <[email protected]>Doesn't apply at all to the tty-next tree, so I can't apply it here :(
I shall take care of that right now.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 1 line · Greg KH
Doesn't apply at all to the tty-next tree, so I can't apply it here :(
Um, where exactly is the tty-next tree? The only thing I see that looks like it is this:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
But the description of this tree says, "junk tree, please ignore".
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 9 lines · Timur Tabi
Quoted 1 line · Greg KH
Doesn't apply at all to the tty-next tree, so I can't apply it here :(
Um, where exactly is the tty-next tree? The only thing I see that looks like it is this:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.gitBut the description of this tree says, "junk tree, please ignore".
Don't ignore it, that's the one :)