What is the way to start/stop Mouse driver for GNU-EFI ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gomidas
Posts: 15
Joined: Wed Nov 25, 2020 9:28 pm

What is the way to start/stop Mouse driver for GNU-EFI ?

Post by gomidas »

I need to start my mouse and keyboard drivers as I want to exit from boot services I think. I am not sure what is the way of doing it. I have no idea about drivers. First I wanted to look for GPU drivers and after diving in it I got that that is almost impossible to implement it.


I tried something like this. This can be completely wrong.

Code: Select all

USB_DEVICE_PATH* MouseDevicePath;
EFI_GUID MOUSE_GUID = EFI_SIMPLE_POINTER_PROTOCOL_GUID;
void LocateMouse()
{
	Status = gBS->LocateProtocol(&MOUSE_GUID, NULL, (void**)&MouseDevicePath);
	CHKERR(Status, L"CAN NOT LOCATE");
}
What should I do respectively to start and stop it ?
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: What is the way to start/stop Mouse driver for GNU-EFI ?

Post by Octocontrabass »

What's the purpose of the code there? Are you trying to get the device path for the mouse?

Even if you do get the device path, it only tells you where the mouse was during boot. You still need to parse the ACPI tables and enumerate buses to discover installed hardware, same as you do with BIOS.

In an emulator, you can cheat and configure it to use a PS/2 controller and PS/2 mouse. Since you know exactly what hardware the emulator provides, you can skip the enumeration and go straight to writing your PS/2 mouse driver.
Post Reply