EFI_TIMEOUT error on EFI_TCG2_SUBMIT_COMMAND - c

Inside EFI I use EFI_TCG2_PROTOCOL to communicate with TPM device.
On system start I decrypt some data calling TPM device commands with function EFI_TCG2_SUBMIT_COMMAND in protocol EFI_TCG2_PROTOCOL. That works fine.
But now (seems that after windows update) I started to receive error EFI_TIMEOUT (0x8000000000000012) on my attempts to execute command with EFI_TCG2_SUBMIT_COMMAND.
What can be the possible reason? How to fix it?

Related

dbus: ConnectProfile method: error host is down

Actually I'm using D-Feet (D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces) to connect to a BLE peripheral that advertises proximity profile.
When I try the Connect() method on the remote object /org/bluez/hci0/dev_88_6B_0F_00_C4_3A every thing is fine and the connection succeed but when I try to connect only the proximity profile using ConnectProfile("0x1802") method an error occurs saying that the host is down:
g-io-error-quark: GDBus.Error:org.bluez.Error.Failed: Host is down
(36)
Can anyone help me solving this problem (I'm blocked for 2 weeks and there still to much to deal with in the project :/)
ConnectProfile("0x1802")
ConnectProfile (and the Bluez API in general) does not deal with handles, only UUIDs. Your input argument does not look like a UUID: I suggest you find the remote service UUID that matches the handle (I'm assuming your current input argument is a handle).
I believe you can find the UUID with d-feet (after Connect() the service objects should be there) or with bluez command line tools.

Kernel User I/O application development

I've read up on the following links about User I/O:
http://www.hep.by/gnu/kernel/uio-howto/
and followed http://nairobi-embedded.org/uio_example.html.
I'm using the ivshmem device to map memory from the host to the guest (in QEmu). The client driver that I'm using is kernel_module/uio/uio_ivshmem.c from https://www.gitorious.org/nahanni/guest-code.
I've had success sharing the memory between several guests, and I can also issue interrupts from the host to the guest, using the ivshmem-server from the git repository above.
But I cant figure out how I can "interrupt" from the guest to notice that writing to the memory is completed. I.e. signal to the other guest that it should read what the first guest has written.
What am I doing wrong? Is there any way to send interrupts using UIO or can I only receive? How else am I supposed to notice that I'm done writing/reading?
Ok, I've now figured out why I cant send interrupts.
I did try using the test applications, but, as you can read in this (http://lists.gnu.org/archive/html/qemu-devel/2014-08/msg05388.html) post, a patch in the kernel broke uio_ivshmem.c.
This patch made ivshmem unable to map BAR0, which is used to send interrupts. BAR2 is still fine and can be used to share data, though interrupts wont work.

How to read data form WinCE 5.0 's Debug Serial port?

In my project, I need to input some command into my WinCE device through the debug Serial Port. But I found that I can only use "printf" or "RETAILMSG" to output my debug info but I can't simply call "scanf" to get the data of debug Serial Port.
By look up the MSDN, I have found a function named "OEMReadDebugByte". It is a KERNEL function of WinCE, but when I try to call this function in my WinCE application, the Platform Builder post "error LNK2019: unresolved external symbol OEMReadDebugByte referenced in function wmain"
Can I use insert a case in the KernelIoControl? How ? Which file define the "KernelIoControl"?
Or... there are any solutions else?
Thanks a lot!!!
Thank you!
This function is meant to be used in the bootloader to read input from the user to set-up bot mode, network configuration etc. It's not used by the kernel. Serial is used for debug output and there is no easy way to change this. What you may do is to implement an application that provide a serial console and change your BSP removing serial debug and changing it to a system that sends this information to the application (using shared memory or something like this) that then outputs it on the serial port console.
Implementing it will require some knowledge of the OAL and BSP structure and features.

Opening, reading, and writing to a serial port in the Windows kernel

I'm writing a Windows kernel driver in C and I need to send and receive data over a serial device, specifically COM3. I am stuck on the CreateFile, ReadFile, and WriteFile functions, as these seem to be user space functions that will not work in the kernel. Am I mistaken? Or if not, what is the best way to open and use a serial port from within the Windows kernel?
Many thanks.
You need ZwCreateFile, ZwReadFile and ZwWriteFile functions for working in kernel mode.
You are writing a driver then You must have to write kernel module for windows .
check this
http://www.codeproject.com/Articles/9504/Driver-Development-Part-1-Introduction-to-Drivers
One more thing once you have finished the driver you need a application to test it.
so you need a user space application to test it.

Hayes AT Commands: Detect Remote Hangup?

How are you supposed to programatically detect when the remote modem on your call hangs up? I am writing a C program which interfaces with a SoftModem device /dev/ttySL0 in Ubuntu linux. I am able to configure the modem using Hayes AT commands and communicate with the remote modem. However, I haven't been able to determine how I'm supposed to detect that the other end has hung up the line.
I have the modem configured so that when the other end hangs up, the device prints NO CARRIER and switches to command mode. However, I can't use the NO CARRIER string because I can't guarantee that the modem won't receive that string while in data mode.
How do you "listen" for remote hang up?
This is a hardware signal on modems, the Carrier Detect (CD) line. You'll need to monitor it to know that the connection was lost. Basics in linux are described in this how-to, you obtain the signal state with ioctl() using the TIOCM_CAR command.
Testing for NO CARRIER as text will not suffice. This text frequently occurs on sites in the net, even on Q&A sites.
Coming from the modem, it should be enclosed in line breaks.
Besides, after you detect that text, you can try to switch to command mode with +++. If that works, your connection persists and you can reattach it and continue using it. If it doesn't (because you are already there and +++ is an invalid command), the connection has gone.

Resources