4b83fb7af5a328f554f22cdceb90e366cf9e6d56
[reactos.git] / reactos / drivers / bus / acpi / acpica / utilities / utclib.c
1 /******************************************************************************
2 *
3 * Module Name: utclib - ACPICA implementations of C library functions
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2015, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #define ACPI_CLIBRARY
45 #include "acpi.h"
46 #include "accommon.h"
47
48 /*
49 * This module contains implementations of the standard C library functions
50 * that are required by the ACPICA code at both application level and kernel
51 * level.
52 *
53 * The module is an optional feature that can be used if a local/system
54 * C library is not available. Some operating system kernels may not have
55 * an internal C library.
56 *
57 * In general, these functions are less efficient than an inline or assembly
58 * code implementation.
59 *
60 * These C functions and the associated prototypes are enabled by default
61 * unless the ACPI_USE_SYSTEM_CLIBRARY symbol is defined. This is usually
62 * automatically defined for the ACPICA applications such as iASL and
63 * AcpiExec, so that these user-level applications use the local C library
64 * instead of the functions in this module.
65 */
66
67 /*******************************************************************************
68 *
69 * Functions implemented in this module:
70 *
71 * FUNCTION: memcmp
72 * FUNCTION: memcpy
73 * FUNCTION: memset
74 * FUNCTION: strlen
75 * FUNCTION: strcpy
76 * FUNCTION: strncpy
77 * FUNCTION: strcmp
78 * FUNCTION: strchr
79 * FUNCTION: strncmp
80 * FUNCTION: strcat
81 * FUNCTION: strncat
82 * FUNCTION: strstr
83 * FUNCTION: strtoul
84 * FUNCTION: toupper
85 * FUNCTION: tolower
86 * FUNCTION: is* functions
87 *
88 ******************************************************************************/
89
90 #define _COMPONENT ACPI_UTILITIES
91 ACPI_MODULE_NAME ("utclib")
92
93
94 #ifndef ACPI_USE_SYSTEM_CLIBRARY /* Entire module */
95
96
97 /*******************************************************************************
98 *
99 * FUNCTION: memcmp
100 *
101 * PARAMETERS: Buffer1 - First Buffer
102 * Buffer2 - Second Buffer
103 * Count - Maximum # of bytes to compare
104 *
105 * RETURN: Index where Buffers mismatched, or 0 if Buffers matched
106 *
107 * DESCRIPTION: Compare two Buffers, with a maximum length
108 *
109 ******************************************************************************/
110 #ifdef __REACTOS__
111 int
112 memcmp (
113 const void *VBuffer1,
114 const void *VBuffer2,
115 ACPI_SIZE Count)
116 #else /* __REACTOS__ */
117 int
118 memcmp (
119 void *VBuffer1,
120 void *VBuffer2,
121 ACPI_SIZE Count)
122 #endif /* __REACTOS__ */
123 {
124 char *Buffer1 = (char *) VBuffer1;
125 char *Buffer2 = (char *) VBuffer2;
126
127
128 for ( ; Count-- && (*Buffer1 == *Buffer2); Buffer1++, Buffer2++)
129 {
130 }
131
132 return ((Count == ACPI_SIZE_MAX) ? 0 : ((unsigned char) *Buffer1 -
133 (unsigned char) *Buffer2));
134 }
135
136
137 /*******************************************************************************
138 *
139 * FUNCTION: memcpy
140 *
141 * PARAMETERS: Dest - Target of the copy
142 * Src - Source buffer to copy
143 * Count - Number of bytes to copy
144 *
145 * RETURN: Dest
146 *
147 * DESCRIPTION: Copy arbitrary bytes of memory
148 *
149 ******************************************************************************/
150
151 void *
152 memcpy (
153 void *Dest,
154 const void *Src,
155 ACPI_SIZE Count)
156 {
157 char *New = (char *) Dest;
158 char *Old = (char *) Src;
159
160
161 while (Count)
162 {
163 *New = *Old;
164 New++;
165 Old++;
166 Count--;
167 }
168
169 return (Dest);
170 }
171
172
173 /*******************************************************************************
174 *
175 * FUNCTION: memset
176 *
177 * PARAMETERS: Dest - Buffer to set
178 * Value - Value to set each byte of memory
179 * Count - Number of bytes to set
180 *
181 * RETURN: Dest
182 *
183 * DESCRIPTION: Initialize a buffer to a known value.
184 *
185 ******************************************************************************/
186
187 void *
188 memset (
189 void *Dest,
190 int Value,
191 ACPI_SIZE Count)
192 {
193 char *New = (char *) Dest;
194
195
196 while (Count)
197 {
198 *New = (char) Value;
199 New++;
200 Count--;
201 }
202
203 return (Dest);
204 }
205
206
207 /*******************************************************************************
208 *
209 * FUNCTION: strlen
210 *
211 * PARAMETERS: String - Null terminated string
212 *
213 * RETURN: Length
214 *
215 * DESCRIPTION: Returns the length of the input string
216 *
217 ******************************************************************************/
218
219
220 ACPI_SIZE
221 strlen (
222 const char *String)
223 {
224 UINT32 Length = 0;
225
226
227 /* Count the string until a null is encountered */
228
229 while (*String)
230 {
231 Length++;
232 String++;
233 }
234
235 return (Length);
236 }
237
238
239 /*******************************************************************************
240 *
241 * FUNCTION: strcpy
242 *
243 * PARAMETERS: DstString - Target of the copy
244 * SrcString - The source string to copy
245 *
246 * RETURN: DstString
247 *
248 * DESCRIPTION: Copy a null terminated string
249 *
250 ******************************************************************************/
251
252 char *
253 strcpy (
254 char *DstString,
255 const char *SrcString)
256 {
257 char *String = DstString;
258
259
260 /* Move bytes brute force */
261
262 while (*SrcString)
263 {
264 *String = *SrcString;
265
266 String++;
267 SrcString++;
268 }
269
270 /* Null terminate */
271
272 *String = 0;
273 return (DstString);
274 }
275
276
277 /*******************************************************************************
278 *
279 * FUNCTION: strncpy
280 *
281 * PARAMETERS: DstString - Target of the copy
282 * SrcString - The source string to copy
283 * Count - Maximum # of bytes to copy
284 *
285 * RETURN: DstString
286 *
287 * DESCRIPTION: Copy a null terminated string, with a maximum length
288 *
289 ******************************************************************************/
290
291 char *
292 strncpy (
293 char *DstString,
294 const char *SrcString,
295 ACPI_SIZE Count)
296 {
297 char *String = DstString;
298
299
300 /* Copy the string */
301
302 for (String = DstString;
303 Count && (Count--, (*String++ = *SrcString++)); )
304 {;}
305
306 /* Pad with nulls if necessary */
307
308 while (Count--)
309 {
310 *String = 0;
311 String++;
312 }
313
314 /* Return original pointer */
315
316 return (DstString);
317 }
318
319
320 /*******************************************************************************
321 *
322 * FUNCTION: strcmp
323 *
324 * PARAMETERS: String1 - First string
325 * String2 - Second string
326 *
327 * RETURN: Index where strings mismatched, or 0 if strings matched
328 *
329 * DESCRIPTION: Compare two null terminated strings
330 *
331 ******************************************************************************/
332
333 int
334 strcmp (
335 const char *String1,
336 const char *String2)
337 {
338
339
340 for ( ; (*String1 == *String2); String2++)
341 {
342 if (!*String1++)
343 {
344 return (0);
345 }
346 }
347
348 return ((unsigned char) *String1 - (unsigned char) *String2);
349 }
350
351
352 /*******************************************************************************
353 *
354 * FUNCTION: strchr
355 *
356 * PARAMETERS: String - Search string
357 * ch - character to search for
358 *
359 * RETURN: Ptr to char or NULL if not found
360 *
361 * DESCRIPTION: Search a string for a character
362 *
363 ******************************************************************************/
364
365 char *
366 strchr (
367 const char *String,
368 int ch)
369 {
370
371
372 for ( ; (*String); String++)
373 {
374 if ((*String) == (char) ch)
375 {
376 return ((char *) String);
377 }
378 }
379
380 return (NULL);
381 }
382
383
384 /*******************************************************************************
385 *
386 * FUNCTION: strncmp
387 *
388 * PARAMETERS: String1 - First string
389 * String2 - Second string
390 * Count - Maximum # of bytes to compare
391 *
392 * RETURN: Index where strings mismatched, or 0 if strings matched
393 *
394 * DESCRIPTION: Compare two null terminated strings, with a maximum length
395 *
396 ******************************************************************************/
397
398 int
399 strncmp (
400 const char *String1,
401 const char *String2,
402 ACPI_SIZE Count)
403 {
404
405
406 for ( ; Count-- && (*String1 == *String2); String2++)
407 {
408 if (!*String1++)
409 {
410 return (0);
411 }
412 }
413
414 return ((Count == ACPI_SIZE_MAX) ? 0 : ((unsigned char) *String1 -
415 (unsigned char) *String2));
416 }
417
418
419 /*******************************************************************************
420 *
421 * FUNCTION: strcat
422 *
423 * PARAMETERS: DstString - Target of the copy
424 * SrcString - The source string to copy
425 *
426 * RETURN: DstString
427 *
428 * DESCRIPTION: Append a null terminated string to a null terminated string
429 *
430 ******************************************************************************/
431
432 char *
433 strcat (
434 char *DstString,
435 const char *SrcString)
436 {
437 char *String;
438
439
440 /* Find end of the destination string */
441
442 for (String = DstString; *String++; )
443 { ; }
444
445 /* Concatenate the string */
446
447 for (--String; (*String++ = *SrcString++); )
448 { ; }
449
450 return (DstString);
451 }
452
453
454 /*******************************************************************************
455 *
456 * FUNCTION: strncat
457 *
458 * PARAMETERS: DstString - Target of the copy
459 * SrcString - The source string to copy
460 * Count - Maximum # of bytes to copy
461 *
462 * RETURN: DstString
463 *
464 * DESCRIPTION: Append a null terminated string to a null terminated string,
465 * with a maximum count.
466 *
467 ******************************************************************************/
468
469 char *
470 strncat (
471 char *DstString,
472 const char *SrcString,
473 ACPI_SIZE Count)
474 {
475 char *String;
476
477
478 if (Count)
479 {
480 /* Find end of the destination string */
481
482 for (String = DstString; *String++; )
483 { ; }
484
485 /* Concatenate the string */
486
487 for (--String; (*String++ = *SrcString++) && --Count; )
488 { ; }
489
490 /* Null terminate if necessary */
491
492 if (!Count)
493 {
494 *String = 0;
495 }
496 }
497
498 return (DstString);
499 }
500
501
502 /*******************************************************************************
503 *
504 * FUNCTION: strstr
505 *
506 * PARAMETERS: String1 - Target string
507 * String2 - Substring to search for
508 *
509 * RETURN: Where substring match starts, Null if no match found
510 *
511 * DESCRIPTION: Checks if String2 occurs in String1. This is not really a
512 * full implementation of strstr, only sufficient for command
513 * matching
514 *
515 ******************************************************************************/
516
517 #ifdef __REACTOS__
518 char *
519 strstr (
520 const char *String1,
521 const char *String2)
522 #else /* __REACTOS **/
523 char *
524 strstr (
525 char *String1,
526 char *String2)
527 #endif /* __REACTOS__ */
528 {
529 UINT32 Length;
530
531
532 Length = strlen (String2);
533 if (!Length)
534 {
535 #ifdef __REACTOS__
536 return (char *)(String1);
537 #else /* __REACTOS__ */
538 return (String1);
539 #endif /* __REACTOS__ */
540 }
541
542 while (strlen (String1) >= Length)
543 {
544 if (memcmp (String1, String2, Length) == 0)
545 {
546 #ifdef __REACTOS__
547 return (char *)(String1);
548 #else /* __REACTOS__ */
549 return (String1);
550 #endif /* __REACTOS__ */
551 }
552 String1++;
553 }
554
555 return (NULL);
556 }
557
558
559 /*******************************************************************************
560 *
561 * FUNCTION: strtoul
562 *
563 * PARAMETERS: String - Null terminated string
564 * Terminater - Where a pointer to the terminating byte is
565 * returned
566 * Base - Radix of the string
567 *
568 * RETURN: Converted value
569 *
570 * DESCRIPTION: Convert a string into a 32-bit unsigned value.
571 * Note: use strtoul64 for 64-bit integers.
572 *
573 ******************************************************************************/
574
575 UINT32
576 strtoul (
577 const char *String,
578 char **Terminator,
579 UINT32 Base)
580 {
581 UINT32 converted = 0;
582 UINT32 index;
583 UINT32 sign;
584 const char *StringStart;
585 UINT32 ReturnValue = 0;
586 ACPI_STATUS Status = AE_OK;
587
588
589 /*
590 * Save the value of the pointer to the buffer's first
591 * character, save the current errno value, and then
592 * skip over any white space in the buffer:
593 */
594 StringStart = String;
595 while (isspace (*String) || *String == '\t')
596 {
597 ++String;
598 }
599
600 /*
601 * The buffer may contain an optional plus or minus sign.
602 * If it does, then skip over it but remember what is was:
603 */
604 if (*String == '-')
605 {
606 sign = ACPI_SIGN_NEGATIVE;
607 ++String;
608 }
609 else if (*String == '+')
610 {
611 ++String;
612 sign = ACPI_SIGN_POSITIVE;
613 }
614 else
615 {
616 sign = ACPI_SIGN_POSITIVE;
617 }
618
619 /*
620 * If the input parameter Base is zero, then we need to
621 * determine if it is octal, decimal, or hexadecimal:
622 */
623 if (Base == 0)
624 {
625 if (*String == '0')
626 {
627 if (tolower (*(++String)) == 'x')
628 {
629 Base = 16;
630 ++String;
631 }
632 else
633 {
634 Base = 8;
635 }
636 }
637 else
638 {
639 Base = 10;
640 }
641 }
642 else if (Base < 2 || Base > 36)
643 {
644 /*
645 * The specified Base parameter is not in the domain of
646 * this function:
647 */
648 goto done;
649 }
650
651 /*
652 * For octal and hexadecimal bases, skip over the leading
653 * 0 or 0x, if they are present.
654 */
655 if (Base == 8 && *String == '0')
656 {
657 String++;
658 }
659
660 if (Base == 16 &&
661 *String == '0' &&
662 tolower (*(++String)) == 'x')
663 {
664 String++;
665 }
666
667 /*
668 * Main loop: convert the string to an unsigned long:
669 */
670 while (*String)
671 {
672 if (isdigit (*String))
673 {
674 index = (UINT32) ((UINT8) *String - '0');
675 }
676 else
677 {
678 index = (UINT32) toupper (*String);
679 if (isupper (index))
680 {
681 index = index - 'A' + 10;
682 }
683 else
684 {
685 goto done;
686 }
687 }
688
689 if (index >= Base)
690 {
691 goto done;
692 }
693
694 /*
695 * Check to see if value is out of range:
696 */
697
698 if (ReturnValue > ((ACPI_UINT32_MAX - (UINT32) index) /
699 (UINT32) Base))
700 {
701 Status = AE_ERROR;
702 ReturnValue = 0; /* reset */
703 }
704 else
705 {
706 ReturnValue *= Base;
707 ReturnValue += index;
708 converted = 1;
709 }
710
711 ++String;
712 }
713
714 done:
715 /*
716 * If appropriate, update the caller's pointer to the next
717 * unconverted character in the buffer.
718 */
719 if (Terminator)
720 {
721 if (converted == 0 && ReturnValue == 0 && String != NULL)
722 {
723 *Terminator = (char *) StringStart;
724 }
725 else
726 {
727 *Terminator = (char *) String;
728 }
729 }
730
731 if (Status == AE_ERROR)
732 {
733 ReturnValue = ACPI_UINT32_MAX;
734 }
735
736 /*
737 * If a minus sign was present, then "the conversion is negated":
738 */
739 if (sign == ACPI_SIGN_NEGATIVE)
740 {
741 ReturnValue = (ACPI_UINT32_MAX - ReturnValue) + 1;
742 }
743
744 return (ReturnValue);
745 }
746
747
748 /*******************************************************************************
749 *
750 * FUNCTION: toupper
751 *
752 * PARAMETERS: c - Character to convert
753 *
754 * RETURN: Converted character as an int
755 *
756 * DESCRIPTION: Convert character to uppercase
757 *
758 ******************************************************************************/
759
760 int
761 toupper (
762 int c)
763 {
764
765 return (islower(c) ? ((c)-0x20) : (c));
766 }
767
768
769 /*******************************************************************************
770 *
771 * FUNCTION: tolower
772 *
773 * PARAMETERS: c - Character to convert
774 *
775 * RETURN: Converted character as an int
776 *
777 * DESCRIPTION: Convert character to lowercase
778 *
779 ******************************************************************************/
780
781 int
782 tolower (
783 int c)
784 {
785
786 return (isupper(c) ? ((c)+0x20) : (c));
787 }
788
789
790 /*******************************************************************************
791 *
792 * FUNCTION: is* function array
793 *
794 * DESCRIPTION: is* functions use the ctype table below
795 *
796 ******************************************************************************/
797
798 const UINT8 AcpiGbl_Ctypes[257] = {
799 _ACPI_CN, /* 0x00 0 NUL */
800 _ACPI_CN, /* 0x01 1 SOH */
801 _ACPI_CN, /* 0x02 2 STX */
802 _ACPI_CN, /* 0x03 3 ETX */
803 _ACPI_CN, /* 0x04 4 EOT */
804 _ACPI_CN, /* 0x05 5 ENQ */
805 _ACPI_CN, /* 0x06 6 ACK */
806 _ACPI_CN, /* 0x07 7 BEL */
807 _ACPI_CN, /* 0x08 8 BS */
808 _ACPI_CN|_ACPI_SP, /* 0x09 9 TAB */
809 _ACPI_CN|_ACPI_SP, /* 0x0A 10 LF */
810 _ACPI_CN|_ACPI_SP, /* 0x0B 11 VT */
811 _ACPI_CN|_ACPI_SP, /* 0x0C 12 FF */
812 _ACPI_CN|_ACPI_SP, /* 0x0D 13 CR */
813 _ACPI_CN, /* 0x0E 14 SO */
814 _ACPI_CN, /* 0x0F 15 SI */
815 _ACPI_CN, /* 0x10 16 DLE */
816 _ACPI_CN, /* 0x11 17 DC1 */
817 _ACPI_CN, /* 0x12 18 DC2 */
818 _ACPI_CN, /* 0x13 19 DC3 */
819 _ACPI_CN, /* 0x14 20 DC4 */
820 _ACPI_CN, /* 0x15 21 NAK */
821 _ACPI_CN, /* 0x16 22 SYN */
822 _ACPI_CN, /* 0x17 23 ETB */
823 _ACPI_CN, /* 0x18 24 CAN */
824 _ACPI_CN, /* 0x19 25 EM */
825 _ACPI_CN, /* 0x1A 26 SUB */
826 _ACPI_CN, /* 0x1B 27 ESC */
827 _ACPI_CN, /* 0x1C 28 FS */
828 _ACPI_CN, /* 0x1D 29 GS */
829 _ACPI_CN, /* 0x1E 30 RS */
830 _ACPI_CN, /* 0x1F 31 US */
831 _ACPI_XS|_ACPI_SP, /* 0x20 32 ' ' */
832 _ACPI_PU, /* 0x21 33 '!' */
833 _ACPI_PU, /* 0x22 34 '"' */
834 _ACPI_PU, /* 0x23 35 '#' */
835 _ACPI_PU, /* 0x24 36 '$' */
836 _ACPI_PU, /* 0x25 37 '%' */
837 _ACPI_PU, /* 0x26 38 '&' */
838 _ACPI_PU, /* 0x27 39 ''' */
839 _ACPI_PU, /* 0x28 40 '(' */
840 _ACPI_PU, /* 0x29 41 ')' */
841 _ACPI_PU, /* 0x2A 42 '*' */
842 _ACPI_PU, /* 0x2B 43 '+' */
843 _ACPI_PU, /* 0x2C 44 ',' */
844 _ACPI_PU, /* 0x2D 45 '-' */
845 _ACPI_PU, /* 0x2E 46 '.' */
846 _ACPI_PU, /* 0x2F 47 '/' */
847 _ACPI_XD|_ACPI_DI, /* 0x30 48 '0' */
848 _ACPI_XD|_ACPI_DI, /* 0x31 49 '1' */
849 _ACPI_XD|_ACPI_DI, /* 0x32 50 '2' */
850 _ACPI_XD|_ACPI_DI, /* 0x33 51 '3' */
851 _ACPI_XD|_ACPI_DI, /* 0x34 52 '4' */
852 _ACPI_XD|_ACPI_DI, /* 0x35 53 '5' */
853 _ACPI_XD|_ACPI_DI, /* 0x36 54 '6' */
854 _ACPI_XD|_ACPI_DI, /* 0x37 55 '7' */
855 _ACPI_XD|_ACPI_DI, /* 0x38 56 '8' */
856 _ACPI_XD|_ACPI_DI, /* 0x39 57 '9' */
857 _ACPI_PU, /* 0x3A 58 ':' */
858 _ACPI_PU, /* 0x3B 59 ';' */
859 _ACPI_PU, /* 0x3C 60 '<' */
860 _ACPI_PU, /* 0x3D 61 '=' */
861 _ACPI_PU, /* 0x3E 62 '>' */
862 _ACPI_PU, /* 0x3F 63 '?' */
863 _ACPI_PU, /* 0x40 64 '@' */
864 _ACPI_XD|_ACPI_UP, /* 0x41 65 'A' */
865 _ACPI_XD|_ACPI_UP, /* 0x42 66 'B' */
866 _ACPI_XD|_ACPI_UP, /* 0x43 67 'C' */
867 _ACPI_XD|_ACPI_UP, /* 0x44 68 'D' */
868 _ACPI_XD|_ACPI_UP, /* 0x45 69 'E' */
869 _ACPI_XD|_ACPI_UP, /* 0x46 70 'F' */
870 _ACPI_UP, /* 0x47 71 'G' */
871 _ACPI_UP, /* 0x48 72 'H' */
872 _ACPI_UP, /* 0x49 73 'I' */
873 _ACPI_UP, /* 0x4A 74 'J' */
874 _ACPI_UP, /* 0x4B 75 'K' */
875 _ACPI_UP, /* 0x4C 76 'L' */
876 _ACPI_UP, /* 0x4D 77 'M' */
877 _ACPI_UP, /* 0x4E 78 'N' */
878 _ACPI_UP, /* 0x4F 79 'O' */
879 _ACPI_UP, /* 0x50 80 'P' */
880 _ACPI_UP, /* 0x51 81 'Q' */
881 _ACPI_UP, /* 0x52 82 'R' */
882 _ACPI_UP, /* 0x53 83 'S' */
883 _ACPI_UP, /* 0x54 84 'T' */
884 _ACPI_UP, /* 0x55 85 'U' */
885 _ACPI_UP, /* 0x56 86 'V' */
886 _ACPI_UP, /* 0x57 87 'W' */
887 _ACPI_UP, /* 0x58 88 'X' */
888 _ACPI_UP, /* 0x59 89 'Y' */
889 _ACPI_UP, /* 0x5A 90 'Z' */
890 _ACPI_PU, /* 0x5B 91 '[' */
891 _ACPI_PU, /* 0x5C 92 '\' */
892 _ACPI_PU, /* 0x5D 93 ']' */
893 _ACPI_PU, /* 0x5E 94 '^' */
894 _ACPI_PU, /* 0x5F 95 '_' */
895 _ACPI_PU, /* 0x60 96 '`' */
896 _ACPI_XD|_ACPI_LO, /* 0x61 97 'a' */
897 _ACPI_XD|_ACPI_LO, /* 0x62 98 'b' */
898 _ACPI_XD|_ACPI_LO, /* 0x63 99 'c' */
899 _ACPI_XD|_ACPI_LO, /* 0x64 100 'd' */
900 _ACPI_XD|_ACPI_LO, /* 0x65 101 'e' */
901 _ACPI_XD|_ACPI_LO, /* 0x66 102 'f' */
902 _ACPI_LO, /* 0x67 103 'g' */
903 _ACPI_LO, /* 0x68 104 'h' */
904 _ACPI_LO, /* 0x69 105 'i' */
905 _ACPI_LO, /* 0x6A 106 'j' */
906 _ACPI_LO, /* 0x6B 107 'k' */
907 _ACPI_LO, /* 0x6C 108 'l' */
908 _ACPI_LO, /* 0x6D 109 'm' */
909 _ACPI_LO, /* 0x6E 110 'n' */
910 _ACPI_LO, /* 0x6F 111 'o' */
911 _ACPI_LO, /* 0x70 112 'p' */
912 _ACPI_LO, /* 0x71 113 'q' */
913 _ACPI_LO, /* 0x72 114 'r' */
914 _ACPI_LO, /* 0x73 115 's' */
915 _ACPI_LO, /* 0x74 116 't' */
916 _ACPI_LO, /* 0x75 117 'u' */
917 _ACPI_LO, /* 0x76 118 'v' */
918 _ACPI_LO, /* 0x77 119 'w' */
919 _ACPI_LO, /* 0x78 120 'x' */
920 _ACPI_LO, /* 0x79 121 'y' */
921 _ACPI_LO, /* 0x7A 122 'z' */
922 _ACPI_PU, /* 0x7B 123 '{' */
923 _ACPI_PU, /* 0x7C 124 '|' */
924 _ACPI_PU, /* 0x7D 125 '}' */
925 _ACPI_PU, /* 0x7E 126 '~' */
926 _ACPI_CN, /* 0x7F 127 DEL */
927
928 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x80 to 0x8F */
929 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90 to 0x9F */
930 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xA0 to 0xAF */
931 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xB0 to 0xBF */
932 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xC0 to 0xCF */
933 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xD0 to 0xDF */
934 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xE0 to 0xEF */
935 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xF0 to 0xFF */
936 0 /* 0x100 */
937 };
938
939
940 #endif /* ACPI_USE_SYSTEM_CLIBRARY */