Loading arch/arm64/configs/vendor/sm8150-perf_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ CONFIG_HDCP_QSEECOM=y CONFIG_QSEECOM=y CONFIG_UID_SYS_STATS=y CONFIG_MEMORY_STATE_TIME=y CONFIG_OKL4_USER_VIRQ=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y Loading Loading @@ -332,6 +333,7 @@ CONFIG_DIAG_CHAR=y CONFIG_MSM_FASTCVPD=y CONFIG_MSM_ADSPRPC=y CONFIG_MSM_RDBG=m CONFIG_OKL4_PIPE=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_QCOM_GENI=y CONFIG_SPI=y Loading arch/arm64/configs/vendor/sm8150_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,7 @@ CONFIG_HDCP_QSEECOM=y CONFIG_QSEECOM=y CONFIG_UID_SYS_STATS=y CONFIG_MEMORY_STATE_TIME=y CONFIG_OKL4_USER_VIRQ=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y Loading Loading @@ -347,6 +348,7 @@ CONFIG_DIAG_CHAR=y CONFIG_MSM_FASTCVPD=y CONFIG_MSM_ADSPRPC=y CONFIG_MSM_RDBG=m CONFIG_OKL4_PIPE=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_QCOM_GENI=y CONFIG_SPI=y Loading drivers/misc/Kconfig +43 −0 Original line number Diff line number Diff line Loading @@ -553,6 +553,40 @@ config QPNP_MISC and the driver provides an API to check if this interrupt is available on the current PMIC chip. config OKL4_USER_VIRQ tristate "User space accessible OKL4 virtual interrupts" depends on OKL4_GUEST default n help Say Y here if you want to enable the driver that exposes OKL4 virtual interrupts and virtual interrupt sources which enable inter-VM notifications. config OKL4_RINGBUF tristate "Test driver for OKL4 inter-cell communication" depends on OKL4_GUEST default n help Say Y here if you want to test communication between OKL4 guests using virtual interrupts and shared memory. config TEST_IRQ_REQUESTER tristate "Receive interrupt notifications in user-space" depends on DEBUG_FS default n help This module allows interrupts to be registered from user-space by writing to a debugfs file. If an interrupt registered by this module triggers then a log message will be displayed. Note: This driver is intented only for basic testing of interrupts. It not designed to be a generic solution for providing interrupts to user-space. This module can be used to test client side vServices vGPIO interrupt handling. If in doubt, say N. source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" Loading @@ -568,6 +602,15 @@ source "drivers/misc/cxl/Kconfig" source "drivers/misc/fpr_FingerprintCard/Kconfig" endmenu config OKL4_USER_VIPC bool "OKL4 Virtual Platform IPC Driver" depends on OKL4_GUEST default n help Say Y here if you want to enable the driver which exposes the OKL4 Shared Buffer IPC mechanism for accessing and initializing buffers and vIRQs associated with IPC between two cells. config OKL4_LINK_SHBUF tristate "OKL4 link with shared buffer transport" default y Loading drivers/misc/Makefile +6 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ obj-$(CONFIG_UID_SYS_STATS) += uid_sys_stats.o obj-$(CONFIG_MEMORY_STATE_TIME) += memory_state_time.o obj-$(CONFIG_QPNP_MISC) += qpnp-misc.o obj-$(CONFIG_OKL4_USER_VIRQ) += okl4-virq.o obj-$(CONFIG_OKL4_RINGBUF) += okl4-ringbuf.o obj-$(CONFIG_TEST_IRQ_REQUESTER) += irq_requester.o lkdtm-$(CONFIG_LKDTM) += lkdtm_core.o lkdtm-$(CONFIG_LKDTM) += lkdtm_bugs.o lkdtm-$(CONFIG_LKDTM) += lkdtm_heap.o Loading @@ -84,4 +88,6 @@ targets += lkdtm_rodata.o lkdtm_rodata_objcopy.o $(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o FORCE $(call if_changed,objcopy) obj-$(CONFIG_OKL4_USER_VIPC) += okl4-vipc.o obj-$(CONFIG_OKL4_GUEST) += okl4-panic.o obj-$(CONFIG_OKL4_LINK_SHBUF) += okl4-link-shbuf.o drivers/misc/okl4-panic.c 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * OKL4 Debug panic handler * * Copyright (c) 2017 Cog Systems Pty Ltd. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This registers a notifier that can trigger a KDB entry on panic, if enabled * on the kernel command line and running under a debug OKL4 kernel. */ #include <linux/kernel.h> #include <linux/notifier.h> #include <linux/init.h> #include <microvisor/microvisor.h> static int panic_kdb_interact(struct notifier_block *this, unsigned long event, void *ptr) { _okl4_sys_kdb_interact(); return NOTIFY_DONE; } static struct notifier_block panic_block = { .notifier_call = panic_kdb_interact, }; static int __init setup_okl4_panic_kdb(char *buf) { atomic_notifier_chain_register(&panic_notifier_list, &panic_block); return 0; } early_param("okl4_panic_kdb", setup_okl4_panic_kdb); Loading
arch/arm64/configs/vendor/sm8150-perf_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ CONFIG_HDCP_QSEECOM=y CONFIG_QSEECOM=y CONFIG_UID_SYS_STATS=y CONFIG_MEMORY_STATE_TIME=y CONFIG_OKL4_USER_VIRQ=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y Loading Loading @@ -332,6 +333,7 @@ CONFIG_DIAG_CHAR=y CONFIG_MSM_FASTCVPD=y CONFIG_MSM_ADSPRPC=y CONFIG_MSM_RDBG=m CONFIG_OKL4_PIPE=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_QCOM_GENI=y CONFIG_SPI=y Loading
arch/arm64/configs/vendor/sm8150_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,7 @@ CONFIG_HDCP_QSEECOM=y CONFIG_QSEECOM=y CONFIG_UID_SYS_STATS=y CONFIG_MEMORY_STATE_TIME=y CONFIG_OKL4_USER_VIRQ=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_SG=y Loading Loading @@ -347,6 +348,7 @@ CONFIG_DIAG_CHAR=y CONFIG_MSM_FASTCVPD=y CONFIG_MSM_ADSPRPC=y CONFIG_MSM_RDBG=m CONFIG_OKL4_PIPE=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_QCOM_GENI=y CONFIG_SPI=y Loading
drivers/misc/Kconfig +43 −0 Original line number Diff line number Diff line Loading @@ -553,6 +553,40 @@ config QPNP_MISC and the driver provides an API to check if this interrupt is available on the current PMIC chip. config OKL4_USER_VIRQ tristate "User space accessible OKL4 virtual interrupts" depends on OKL4_GUEST default n help Say Y here if you want to enable the driver that exposes OKL4 virtual interrupts and virtual interrupt sources which enable inter-VM notifications. config OKL4_RINGBUF tristate "Test driver for OKL4 inter-cell communication" depends on OKL4_GUEST default n help Say Y here if you want to test communication between OKL4 guests using virtual interrupts and shared memory. config TEST_IRQ_REQUESTER tristate "Receive interrupt notifications in user-space" depends on DEBUG_FS default n help This module allows interrupts to be registered from user-space by writing to a debugfs file. If an interrupt registered by this module triggers then a log message will be displayed. Note: This driver is intented only for basic testing of interrupts. It not designed to be a generic solution for providing interrupts to user-space. This module can be used to test client side vServices vGPIO interrupt handling. If in doubt, say N. source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" Loading @@ -568,6 +602,15 @@ source "drivers/misc/cxl/Kconfig" source "drivers/misc/fpr_FingerprintCard/Kconfig" endmenu config OKL4_USER_VIPC bool "OKL4 Virtual Platform IPC Driver" depends on OKL4_GUEST default n help Say Y here if you want to enable the driver which exposes the OKL4 Shared Buffer IPC mechanism for accessing and initializing buffers and vIRQs associated with IPC between two cells. config OKL4_LINK_SHBUF tristate "OKL4 link with shared buffer transport" default y Loading
drivers/misc/Makefile +6 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ obj-$(CONFIG_UID_SYS_STATS) += uid_sys_stats.o obj-$(CONFIG_MEMORY_STATE_TIME) += memory_state_time.o obj-$(CONFIG_QPNP_MISC) += qpnp-misc.o obj-$(CONFIG_OKL4_USER_VIRQ) += okl4-virq.o obj-$(CONFIG_OKL4_RINGBUF) += okl4-ringbuf.o obj-$(CONFIG_TEST_IRQ_REQUESTER) += irq_requester.o lkdtm-$(CONFIG_LKDTM) += lkdtm_core.o lkdtm-$(CONFIG_LKDTM) += lkdtm_bugs.o lkdtm-$(CONFIG_LKDTM) += lkdtm_heap.o Loading @@ -84,4 +88,6 @@ targets += lkdtm_rodata.o lkdtm_rodata_objcopy.o $(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o FORCE $(call if_changed,objcopy) obj-$(CONFIG_OKL4_USER_VIPC) += okl4-vipc.o obj-$(CONFIG_OKL4_GUEST) += okl4-panic.o obj-$(CONFIG_OKL4_LINK_SHBUF) += okl4-link-shbuf.o
drivers/misc/okl4-panic.c 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * OKL4 Debug panic handler * * Copyright (c) 2017 Cog Systems Pty Ltd. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This registers a notifier that can trigger a KDB entry on panic, if enabled * on the kernel command line and running under a debug OKL4 kernel. */ #include <linux/kernel.h> #include <linux/notifier.h> #include <linux/init.h> #include <microvisor/microvisor.h> static int panic_kdb_interact(struct notifier_block *this, unsigned long event, void *ptr) { _okl4_sys_kdb_interact(); return NOTIFY_DONE; } static struct notifier_block panic_block = { .notifier_call = panic_kdb_interact, }; static int __init setup_okl4_panic_kdb(char *buf) { atomic_notifier_chain_register(&panic_notifier_list, &panic_block); return 0; } early_param("okl4_panic_kdb", setup_okl4_panic_kdb);