linux-device-driver

Reading/Writing EFI variables on Linux in kernel mode

ぐ巨炮叔叔 提交于 2019-12-21 20:26:42
问题 I am working on Linux UEFI .I want to access the efi variables through my driver code. Currently I'm looking linux/efi.h API like efi.get_variable(). but I'm not getting how to call those APIs with from my driver code. struct efi efi1; efi_init(); efi_char16_t *name = (efi_char16_t *)"Boot001"; efi_guid_t *vendor = (efi_guid_t *)"8be4df61-93ca-11d2-aa0d-00e098032b8c"; u32 *attr = (u32 *)0x7; unsigned long data_size = 1024; void *data = NULL; printk("\n Showing efi info \n"); stat = efi1.get

Reading/Writing EFI variables on Linux in kernel mode

空扰寡人 提交于 2019-12-21 20:26:09
问题 I am working on Linux UEFI .I want to access the efi variables through my driver code. Currently I'm looking linux/efi.h API like efi.get_variable(). but I'm not getting how to call those APIs with from my driver code. struct efi efi1; efi_init(); efi_char16_t *name = (efi_char16_t *)"Boot001"; efi_guid_t *vendor = (efi_guid_t *)"8be4df61-93ca-11d2-aa0d-00e098032b8c"; u32 *attr = (u32 *)0x7; unsigned long data_size = 1024; void *data = NULL; printk("\n Showing efi info \n"); stat = efi1.get

Passing Bootargs via Chosen node in Device Tree not working for Beaglebone Black

喜欢而已 提交于 2019-12-21 17:35:11
问题 As per my understanding chosen node is used to send boot arguments to the kernel. The following is the chosen node of the existing device code (am335x-bone-common.dtsi). chosen { stdout-path = &uart0; }; So, I have modified chosen node to pass kernel arguments. chosen { bootargs = "console=ttyO0,115200 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait"; stdout-path = &uart0; }; While bringing up the board I encountered KERNEL PANIC, Here is the log {https://pastebin.com/XHyrsmfG} FYI: These are

Exactly when tasklet runs after it is schedule by ISR?

不羁岁月 提交于 2019-12-21 17:27:56
问题 I written my ISR and my tasklet ran immediately. BUT , I have seen people saying that tasklet runs only when it gets CPU attention. This is a very generic term CPU attention so i recite for those responders. I mean exactly which moment cpu attention goes to tasklet execution and what happen to the state of CPU ? Secondly, if suppose that i am keep on getting hard interrupt then when will tasklet get chance to run? Is it possible that tasklet may not get chance to run? How does kernel take

Spidev do not write/read simultaneously using ioctl

给你一囗甜甜゛ 提交于 2019-12-21 09:39:11
问题 I hope to find some help even if this issue might be more hardware than software related (we'll see). I'm working on a custom board based on Freescales P1021 processor (ppc, e500v2 core). A external PCB will be connected and could be configured by SPI. The specifications of this external PCB reads as it expects a 2-byte command in full duplex mode and that only the last byte is used to transfer data back on MISO. Knowing this i currently work to prepare some pieces of software to test this

Is it possible to call a user-space callback function from kernel space in Linux (ioctl)?

放肆的年华 提交于 2019-12-21 09:27:32
问题 Is it possible to expand the ioctl interface in Linux so that the user-space application can send a pointer to a function to the kernel space driver? I'm in particular thinking of ways to handle the stream in user-controllable way but doing it in the kernel. Those operations could be attached to the kernel module but this would make development a lot easier as I wouldn't need to mess with the kernel during development. More specifically, this would be the process: Data is read by the driver

how to compile a kernel module

妖精的绣舞 提交于 2019-12-21 08:26:12
问题 I'm trying to compile a simple hello world module following this guide and I'm confused about what the Makefile is actually doing. obj-m += hello-1.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean I understand that when i type the make command it will run the all recipe which runs make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules . So now it runs the Makefile found at the path given after the -C

Device tree driven kernel for raspberry pi

◇◆丶佛笑我妖孽 提交于 2019-12-21 07:37:46
问题 I'd like to boot the raspberry pi with a device-tree-driven linux kernel, is there anything special to do to do that? Can anyone point what are required to set up a device-tree-based kernel boot up for the raspberry pi. I may need to have raspberry pi kernel source where drivers for devices should be compatible with device tree. If so, where can I find such kernel sources for Raspberry Pi? 回答1: Device-Tree support on Raspberry Pi Raspberry Pi embeds an ARM11 SoC: Broadcom BCM2835. Device Tree

kernel module cannot find firmware file on Android device; where should it be?

我怕爱的太早我们不能终老 提交于 2019-12-21 05:12:31
问题 I am having trouble placing firmware properly on an Android device, I keep getting: <3>[ 3590.997375] usb 3-1.4: ath9k_htc: Firmware - htc_7010.fw not found If on a standard linux machine running Ubuntu, I place htc_7010.fw in /lib/firmware then I do not get this error. However, if I place this firmware in /lib/firmware on Android, I still get the error. I have tried all of the following directories and still receive the error: /lib/firmware /etc/firmware /system/lib/modules /system/lib

Change the TCP timeout for a linux network device [closed]

天大地大妈咪最大 提交于 2019-12-21 04:20:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am programming linux device driver over a very slow interface, whose ping round time can be as long as several minutes. When I try to use TCP to establish connection between two nodes the connection always times out. Is there a method to set the TCP retransmission or handshaking timeout longer in the driver,