Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HAL layer vs Device driver

Tags:

linux

driver

hal

In Linux, HAL provides hardware abstraction and device driver too provide hardware abstraction. Can you please clarify me the difference between two ?

like image 747
Waqas Avatar asked May 06 '13 07:05

Waqas


2 Answers

The device driver communicates with a specific device at a specific buffer and control flag block location. A hardware abstraction layer abstracts away the details of how specific devices work. For example, the driver for a USB mouse is very different from the driver for a PS2 mouse but at the HAL layer they are both mice and can be treated interchangeably.

like image 53
optimus prime Avatar answered Nov 08 '22 03:11

optimus prime


I would say that HAL provides hardware abstraction using device drivers. From a certain point of view, no device can work without a driver. HAL goes one step ahead, offering a uniform (or, "easier") API for the application.

You can bypass HAL and talk directly to the device driver, but you can not bypass the device driver and talk directly to the hardware (this last sentence is more or less valid in general, depending on OS and environment).

like image 27
linuxfan says Reinstate Monica Avatar answered Nov 08 '22 04:11

linuxfan says Reinstate Monica