Knowledge (XXG)

Hardware abstraction

Source 📝

307: 385:
the LIC itself; those compilers are not available outside IBM.) This was so successful that application software and operating system software above the LIC layer that were compiled on the original S/38 run without modification and without recompilation on the latest AS/400 systems, despite the fact that the underlying hardware has been changed dramatically; at least three different types of processors have been in use.
112:. With hardware abstraction, rather than the program communicating directly with the hardware device, it communicates to the operating system what the device should do, which then generates a hardware-dependent instruction to the device. This meant programmers didn't need to know how specific devices worked, making their programs compatible with any device. 201:, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware. On Microsoft Windows, HAL can basically be considered to be the driver for the motherboard and allows instructions from higher level computer languages to communicate with lower level components, but prevents direct access to the hardware. 119:
device, of which there are many physical implementations, is readable/writable through an API which many joystick-like devices might share. Most joystick-devices might report movement directions. Many joystick-devices might have sensitivity-settings that can be configured by an outside application.
384:
operating system. Most compilers for those systems generate an abstract machine code; the Licensed Internal Code, or LIC, translates this virtual machine code into native code for the processor on which it is running and executes the resulting native code. (The exceptions are compilers that generate
154:
In certain computer science domains, such as operating systems or embedded systems, the abstractions have slightly different appearances (for instance, Operating Systems tend to have more standardized interfaces), but the concept of abstraction and encapsulation of complexity are common, and deep.
107:
Many early computer systems did not have any form of hardware abstraction. This meant that anyone writing a program for such a system would have to know how each hardware device communicated with the rest of the system. This was a significant challenge to software developers since they then had to
135:
As physical limitations (e.g. resolution of sensor, temporal update frequency) may vary with hardware, an API can do little to hide that, other than by assuming a "least common denominator" model. Thus, certain deep architectural decisions from the implementation may become relevant to users of a
139:
A good metaphor is the abstraction of transportation. Both bicycling and driving a car are transportation. They both have commonalities (e.g., you must steer) and physical differences (e.g., use of feet). One can always specify the abstraction "drive to" and let the implementor decide whether
235:, and some other portable operating systems also have a HAL, even if it is not explicitly designated as such. Some operating systems, such as Linux, have the ability to insert one while running, like 91:
without having to care about CPU-specific instructions. Then it is the job of the compiler to generate a CPU-specific executable. The same type of abstraction is made in operating systems, but OS
95:
now represent the primitive operations of the machine, rather than an ISA. This allows a programmer to use OS-level operations (e.g. task creation/deletion) in their programs while retaining
162:(API) in a software stack, whereas the application layer (often written in a high level language) resides above the API and communicates with the hardware by calling functions in the API. 236: 829: 124:
address) of the hardware so that a programmer using the abstracted API, does not need to understand the details of the device's physical interface. This also allows
128:
since the same code can process standardized messages from any kind of implementation which supplies the "joystick" abstraction. A "nudge forward" can be from a
404:
to support future versions of Android to ease the development of firmware updates. Before Project Treble Android relied on various non-standardized legacy HALs.
333:
architectures, and a variety of systems with different I/O bus architectures; most of that code runs without change on those systems, when compiled for the
776: 444: 140:
bicycling or driving a car is best. The "wheeled terrestrial transport" function is abstracted and the details of "how to drive" are encapsulated.
280: 243:
operating system is widely known as having a clean hardware abstraction layer which allows it to be highly portable. As part of this system are
1105: 1076: 665: 649: 621: 433: 1291: 745: 284: 159: 880: 824: 132:
or from a capacitive touch sensor that recognises "swipe" gestures, as long as they both provide a signal related to "movement".
799: 769: 992: 890: 276: 68: 294:
Operating systems having a defined HAL are more easily portable across different hardware. This is especially important for
1270: 819: 804: 361: 865: 850: 809: 76: 1031: 978: 476: 1046: 885: 762: 393: 311: 220: 1081: 900: 860: 855: 814: 427: 198: 321:
kernel has a HAL in the kernel space between hardware and the executive services that are contained in the file
1124: 1011: 875: 275:
and other subsystems. Popular buses which are used on more than one architecture are also abstracted, such as
48:
resources through programming interfaces. The programming interface allows all devices in a particular class
870: 72: 1258: 1197: 1086: 1066: 1015: 973: 330: 109: 1041: 1007: 909: 845: 455: 329:. This allows portability of the Windows NT kernel-mode code to a variety of processors, with different 1212: 586: 569: 144: 96: 1207: 1159: 1036: 691: 357: 88: 79:
or ISA. The ISA represents the primitive operations of the machine that are available for use by
1144: 1051: 401: 713: 27:"Hardware Abstraction Layer" redirects here. For the UNIX-like operating system subsystem, see 1296: 1253: 1202: 1134: 1091: 932: 741: 720: 645: 617: 342: 191: 183: 179: 80: 60: 56:
may contain different subclasses of devices that each provide a different hardware interface.
45: 41: 194:
that runs on that computer. Its function is to hide differences in hardware from most of the
1233: 785: 466: 338: 195: 64: 306: 1177: 1139: 1110: 613: 565: 492: 334: 295: 148: 143:
Examples of "abstractions" on a PC include video input, printers, audio input and output,
17: 291:, etc., allowing drivers to also be highly portable with a minimum of code modification. 573: 1263: 1187: 1149: 1021: 471: 28: 1285: 1129: 968: 922: 353: 129: 1056: 411: 400:. It abstracts low-level code from the Android OS framework, and they must be made 397: 346: 322: 396:
introduced a HAL known as the "vendor interface" (codenamed "Project Treble") on
1182: 1164: 947: 937: 927: 450: 512: 487: 482: 318: 125: 1119: 1026: 952: 917: 538: 461: 373: 208: 52:
of hardware devices to be accessed through identical interfaces even though
108:
know how every hardware device in a system worked to ensure the software's
666:"Google's "Project Treble" solves one of Android's many update roadblocks" 587:"Changing hardware abstraction layer in Windows 2000 / XP – Smallvoid.com" 1248: 439: 410:
is an Android-based HAL used by several mobile operating systems such as
216: 187: 116: 84: 534: 1243: 1172: 942: 415: 407: 377: 262: 240: 754: 270: 1192: 610:
Windows Internals: Including Windows Server 2008 and Windows Vista
381: 305: 232: 224: 83:
programmers and compiler writers. One of the main functions of a
63:-independent, high performance applications by providing standard 288: 254: 204: 758: 736:
Silberschatz, Abraham; Galvin, Peter Bear; Gagne, Greg (2002).
608:
Russinovich, Mark E.; Solomon, David A.; Ionescu, Alex (2008).
246: 1228: 228: 212: 121: 92: 120:
A Joystick abstraction hides details (e.g., register format,
115:
An example of this might be a "Joystick" abstraction. The
71:
pieces of hardware is often done from the perspective of a
59:
Hardware abstractions often allow programmers to write
87:
is to allow a programmer to write an algorithm in a
1221: 1158: 1104: 1065: 1000: 991: 961: 908: 899: 838: 792: 644:(2 ed.). Loveland, Colorado, USA: Duke Press. 418:to run on smartphones with Android pre-installed. 372:An "extreme" example of a HAL can be found in the 360:, the HAL used is automatically determined during 158:The hardware abstraction layer resides below the 182:, implemented in software, between the physical 642:Inside the AS/400: Featuring the AS/400e Series 513:"Portability and supported hardware platforms" 337:applicable to those systems. For example, the 770: 535:"Windows NT Hardware Abstraction Layer (HAL)" 8: 380:architectures, currently implemented in the 136:particular instantiation of an abstraction. 298:that run on dozens of different platforms. 997: 905: 777: 763: 755: 445:Advanced Configuration and Power Interface 635: 633: 612:(5 ed.). Redmond, Washington, USA: 67:(OS) calls to hardware. The process of 714:"Advanced RISC Computing Specification" 504: 99:over a variety of different platforms. 341:Intel x86-based workstations were not 310:The Hardware Abstraction Layer in the 434:Unified Extensible Firmware Interface 44:that provide programs with access to 7: 75:. Each type of CPU has a specific 345:workstations, but due to the HAL, 25: 160:application programming interface 881:Object-oriented operating system 692:"Conventional & legacy HALs" 891:Supercomputer operating system 1: 866:Just enough operating system 851:Distributed operating system 77:instruction set architecture 34:Sets of routines in software 1292:Operating system technology 979:User space and kernel space 696:Android Open Source Project 477:Hardware-dependent software 1313: 886:Real-time operating system 327:%WINDOWS%\system32\hal.dll 312:architecture of Windows NT 172:hardware abstraction layer 147:(e.g. hard disk drives or 26: 18:Hardware Abstraction Layer 1082:Multilevel feedback queue 1077:Fixed-priority preemptive 861:Hobbyist operating system 856:Embedded operating system 738:Operating System Concepts 640:Soltis, Frank G. (1997). 428:Basic Input/Output System 349:was able to run on them. 1125:General protection fault 876:Network operating system 830:User features comparison 40:are sets of routines in 871:Mobile operating system 515:. The NetBSD Foundation 974:Loadable kernel module 560:Custer, Helen (1993), 331:memory management unit 314: 1042:Process control block 1008:Computer multitasking 846:Disk operating system 456:Board support package 309: 38:Hardware abstractions 1213:Virtual tape library 805:Forensic engineering 166:In operating systems 1222:Supporting concepts 1208:Virtual file system 574:1993iwn..book.....C 358:Windows Server 2008 89:high-level language 1145:Segmentation fault 993:Process management 402:forward compatible 398:version 8.0 "Oreo" 315: 1279: 1278: 1135:Memory protection 1106:Memory management 1100: 1099: 1092:Shortest job next 987: 986: 786:Operating systems 721:MIPS Technologies 651:978-1-882419-66-1 623:978-0-7356-2530-3 589:. 15 January 2001 562:Inside Windows NT 541:. 31 October 2006 343:IBM PC compatible 302:Microsoft Windows 180:abstraction layer 16:(Redirected from 1304: 1234:Computer network 998: 906: 779: 772: 765: 756: 751: 732: 730: 728: 718: 700: 699: 688: 682: 681: 679: 677: 662: 656: 655: 637: 628: 627: 605: 599: 598: 596: 594: 583: 577: 576: 557: 551: 550: 548: 546: 531: 525: 524: 522: 520: 509: 467:Haiku Device Kit 296:embedded systems 274: 273: 266: 265: 258: 257: 250: 249: 196:operating system 65:operating system 21: 1312: 1311: 1307: 1306: 1305: 1303: 1302: 1301: 1282: 1281: 1280: 1275: 1217: 1178:Defragmentation 1163: 1154: 1140:Protection ring 1109: 1096: 1068: 1061: 983: 957: 895: 834: 788: 783: 748: 735: 726: 724: 716: 712: 709: 707:Further reading 704: 703: 690: 689: 685: 675: 673: 664: 663: 659: 652: 639: 638: 631: 624: 614:Microsoft Press 607: 606: 602: 592: 590: 585: 584: 580: 566:Microsoft Press 559: 558: 554: 544: 542: 533: 532: 528: 518: 516: 511: 510: 506: 501: 493:Protection ring 424: 391: 370: 335:instruction set 304: 269: 268: 261: 260: 253: 252: 245: 244: 168: 149:USB flash drive 105: 35: 32: 23: 22: 15: 12: 11: 5: 1310: 1308: 1300: 1299: 1294: 1284: 1283: 1277: 1276: 1274: 1273: 1268: 1267: 1266: 1264:User interface 1261: 1251: 1246: 1241: 1236: 1231: 1225: 1223: 1219: 1218: 1216: 1215: 1210: 1205: 1200: 1195: 1190: 1188:File attribute 1185: 1180: 1175: 1169: 1167: 1156: 1155: 1153: 1152: 1150:Virtual memory 1147: 1142: 1137: 1132: 1127: 1122: 1116: 1114: 1102: 1101: 1098: 1097: 1095: 1094: 1089: 1084: 1079: 1073: 1071: 1063: 1062: 1060: 1059: 1054: 1049: 1044: 1039: 1034: 1029: 1024: 1022:Context switch 1019: 1004: 1002: 995: 989: 988: 985: 984: 982: 981: 976: 971: 965: 963: 959: 958: 956: 955: 950: 945: 940: 935: 930: 925: 920: 914: 912: 903: 897: 896: 894: 893: 888: 883: 878: 873: 868: 863: 858: 853: 848: 842: 840: 836: 835: 833: 832: 827: 822: 817: 812: 807: 802: 796: 794: 790: 789: 784: 782: 781: 774: 767: 759: 753: 752: 746: 740:(6 ed.). 733: 708: 705: 702: 701: 683: 657: 650: 629: 622: 616:. p. 65. 600: 578: 552: 526: 503: 502: 500: 497: 496: 495: 490: 485: 480: 474: 472:HAL (software) 469: 464: 459: 453: 448: 442: 437: 431: 423: 420: 390: 387: 369: 366: 303: 300: 167: 164: 104: 101: 33: 29:HAL (software) 24: 14: 13: 10: 9: 6: 4: 3: 2: 1309: 1298: 1295: 1293: 1290: 1289: 1287: 1272: 1269: 1265: 1262: 1260: 1257: 1256: 1255: 1252: 1250: 1247: 1245: 1242: 1240: 1237: 1235: 1232: 1230: 1227: 1226: 1224: 1220: 1214: 1211: 1209: 1206: 1204: 1201: 1199: 1196: 1194: 1191: 1189: 1186: 1184: 1181: 1179: 1176: 1174: 1171: 1170: 1168: 1166: 1161: 1157: 1151: 1148: 1146: 1143: 1141: 1138: 1136: 1133: 1131: 1130:Memory paging 1128: 1126: 1123: 1121: 1118: 1117: 1115: 1112: 1107: 1103: 1093: 1090: 1088: 1085: 1083: 1080: 1078: 1075: 1074: 1072: 1070: 1064: 1058: 1055: 1053: 1050: 1048: 1045: 1043: 1040: 1038: 1035: 1033: 1030: 1028: 1025: 1023: 1020: 1017: 1013: 1009: 1006: 1005: 1003: 999: 996: 994: 990: 980: 977: 975: 972: 970: 969:Device driver 967: 966: 964: 960: 954: 951: 949: 946: 944: 941: 939: 936: 934: 931: 929: 926: 924: 921: 919: 916: 915: 913: 911: 910:Architectures 907: 904: 902: 898: 892: 889: 887: 884: 882: 879: 877: 874: 872: 869: 867: 864: 862: 859: 857: 854: 852: 849: 847: 844: 843: 841: 837: 831: 828: 826: 823: 821: 818: 816: 813: 811: 808: 806: 803: 801: 798: 797: 795: 791: 787: 780: 775: 773: 768: 766: 761: 760: 757: 749: 747:0-471-41743-2 743: 739: 734: 722: 715: 711: 710: 706: 697: 693: 687: 684: 672:. 12 May 2017 671: 667: 661: 658: 653: 647: 643: 636: 634: 630: 625: 619: 615: 611: 604: 601: 588: 582: 579: 575: 571: 567: 563: 556: 553: 540: 536: 530: 527: 514: 508: 505: 498: 494: 491: 489: 486: 484: 481: 478: 475: 473: 470: 468: 465: 463: 460: 457: 454: 452: 449: 446: 443: 441: 438: 435: 432: 429: 426: 425: 421: 419: 417: 413: 409: 405: 403: 399: 395: 388: 386: 383: 379: 375: 367: 365: 363: 359: 355: 354:Windows Vista 350: 348: 344: 340: 336: 332: 328: 324: 320: 313: 308: 301: 299: 297: 292: 290: 286: 282: 278: 272: 264: 256: 248: 242: 238: 234: 230: 226: 222: 218: 214: 210: 206: 202: 200: 197: 193: 189: 185: 181: 177: 173: 165: 163: 161: 156: 152: 150: 146: 145:block devices 141: 137: 133: 131: 130:potentiometer 127: 123: 118: 113: 111: 110:compatibility 102: 100: 98: 94: 90: 86: 82: 78: 74: 70: 66: 62: 57: 55: 51: 47: 43: 39: 30: 19: 1238: 1165:file systems 1057:Time-sharing 737: 725:. Retrieved 723:. p. 23 695: 686: 674:. Retrieved 670:Ars Technica 669: 660: 641: 609: 603: 593:18 September 591:. Retrieved 581: 561: 555: 543:. Retrieved 529: 517:. Retrieved 507: 412:Ubuntu Touch 406: 392: 371: 351: 347:Windows 2000 326: 323:NTOSKRNL.EXE 316: 293: 263:bus_space(9) 203: 175: 171: 169: 157: 153: 142: 138: 134: 114: 106: 58: 53: 49: 37: 36: 1183:Device file 1173:Boot loader 1087:Round-robin 1012:Cooperative 948:Rump kernel 938:Multikernel 928:Microkernel 825:Usage share 727:26 February 451:Device tree 97:portability 69:abstracting 1286:Categories 1113:protection 1069:algorithms 1067:Scheduling 1016:Preemptive 962:Components 933:Monolithic 800:Comparison 499:References 488:Picokernel 483:Nanokernel 319:Windows NT 271:bus_dma(9) 126:code reuse 1203:Partition 1120:Bus error 1047:Real-time 1027:Interrupt 953:Unikernel 918:Exokernel 545:25 August 539:Microsoft 462:DeviceKit 374:System/38 209:CP/M BIOS 1297:Firmware 1249:Live USB 1111:resource 1001:Concepts 839:Variants 820:Timeline 440:Firmware 422:See also 217:DOS BIOS 192:software 190:and the 188:computer 184:hardware 178:) is an 151:), etc. 117:joystick 103:Overview 85:compiler 81:assembly 46:hardware 42:software 1244:Live CD 1198:Journal 1162:access, 1160:Storage 1037:Process 943:vkernel 810:History 793:General 570:Bibcode 394:Android 389:Android 362:startup 255:pmap(9) 221:Solaris 1052:Thread 923:Hybrid 901:Kernel 744:  676:12 May 648:  620:  519:12 May 447:(ACPI) 436:(UEFI) 430:(BIOS) 416:LuneOS 408:Halium 378:AS/400 368:AS/400 352:Since 325:under 247:uvm(9) 241:NetBSD 239:. The 199:kernel 61:device 1254:Shell 1193:Inode 717:(PDF) 479:(HDS) 458:(BSP) 382:IBM i 237:Adeos 233:macOS 225:Linux 186:of a 815:List 742:ISBN 729:2013 678:2017 646:ISBN 618:ISBN 595:2020 547:2007 521:2009 414:and 376:and 356:and 317:The 289:PCIe 281:EISA 205:CP/M 93:APIs 1271:PXE 1259:CLI 1239:HAL 1229:API 1032:IPC 339:SGI 285:PCI 277:ISA 229:BSD 219:), 213:DOS 211:), 176:HAL 122:I2C 73:CPU 1288:: 1014:, 719:. 694:. 668:. 632:^ 568:, 564:, 537:. 364:. 287:, 283:, 279:, 267:, 259:, 231:, 227:, 223:, 170:A 1108:, 1018:) 1010:( 778:e 771:t 764:v 750:. 731:. 698:. 680:. 654:. 626:. 597:. 572:: 549:. 523:. 251:/ 215:( 207:( 174:( 54:C 50:C 31:. 20:)

Index

Hardware Abstraction Layer
HAL (software)
software
hardware
device
operating system
abstracting
CPU
instruction set architecture
assembly
compiler
high-level language
APIs
portability
compatibility
joystick
I2C
code reuse
potentiometer
block devices
USB flash drive
application programming interface
abstraction layer
hardware
computer
software
operating system
kernel
CP/M
CP/M BIOS

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.