xref: /titanic_50/usr/src/uts/intel/io/acpica/utilities/utclib.c (revision 2bc987325e3ded1865bff043128661815c4690b9)
1 /******************************************************************************
2  *
3  * Module Name: cmclib - Local implementation of C library functions
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2011, 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 
45 #define __CMCLIB_C__
46 
47 #include "acpi.h"
48 #include "accommon.h"
49 
50 /*
51  * These implementations of standard C Library routines can optionally be
52  * used if a C library is not available.  In general, they are less efficient
53  * than an inline or assembly implementation
54  */
55 
56 #define _COMPONENT          ACPI_UTILITIES
57         ACPI_MODULE_NAME    ("cmclib")
58 
59 
60 #ifndef ACPI_USE_SYSTEM_CLIBRARY
61 
62 #define NEGATIVE    1
63 #define POSITIVE    0
64 
65 
66 /*******************************************************************************
67  *
68  * FUNCTION:    AcpiUtMemcmp (memcmp)
69  *
70  * PARAMETERS:  Buffer1         - First Buffer
71  *              Buffer2         - Second Buffer
72  *              Count           - Maximum # of bytes to compare
73  *
74  * RETURN:      Index where Buffers mismatched, or 0 if Buffers matched
75  *
76  * DESCRIPTION: Compare two Buffers, with a maximum length
77  *
78  ******************************************************************************/
79 
80 int
81 AcpiUtMemcmp (
82     const char              *Buffer1,
83     const char              *Buffer2,
84     ACPI_SIZE               Count)
85 {
86 
87     for ( ; Count-- && (*Buffer1 == *Buffer2); Buffer1++, Buffer2++)
88     {
89     }
90 
91     return ((Count == ACPI_SIZE_MAX) ? 0 : ((unsigned char) *Buffer1 -
92         (unsigned char) *Buffer2));
93 }
94 
95 
96 /*******************************************************************************
97  *
98  * FUNCTION:    AcpiUtMemcpy (memcpy)
99  *
100  * PARAMETERS:  Dest        - Target of the copy
101  *              Src         - Source buffer to copy
102  *              Count       - Number of bytes to copy
103  *
104  * RETURN:      Dest
105  *
106  * DESCRIPTION: Copy arbitrary bytes of memory
107  *
108  ******************************************************************************/
109 
110 void *
111 AcpiUtMemcpy (
112     void                    *Dest,
113     const void              *Src,
114     ACPI_SIZE               Count)
115 {
116     char                    *New = (char *) Dest;
117     char                    *Old = (char *) Src;
118 
119 
120     while (Count)
121     {
122         *New = *Old;
123         New++;
124         Old++;
125         Count--;
126     }
127 
128     return (Dest);
129 }
130 
131 
132 /*******************************************************************************
133  *
134  * FUNCTION:    AcpiUtMemset (memset)
135  *
136  * PARAMETERS:  Dest        - Buffer to set
137  *              Value       - Value to set each byte of memory
138  *              Count       - Number of bytes to set
139  *
140  * RETURN:      Dest
141  *
142  * DESCRIPTION: Initialize a buffer to a known value.
143  *
144  ******************************************************************************/
145 
146 void *
147 AcpiUtMemset (
148     void                    *Dest,
149     UINT8                   Value,
150     ACPI_SIZE               Count)
151 {
152     char                    *New = (char *) Dest;
153 
154 
155     while (Count)
156     {
157         *New = (char) Value;
158         New++;
159         Count--;
160     }
161 
162     return (Dest);
163 }
164 
165 
166 /*******************************************************************************
167  *
168  * FUNCTION:    AcpiUtStrlen (strlen)
169  *
170  * PARAMETERS:  String              - Null terminated string
171  *
172  * RETURN:      Length
173  *
174  * DESCRIPTION: Returns the length of the input string
175  *
176  ******************************************************************************/
177 
178 
179 ACPI_SIZE
180 AcpiUtStrlen (
181     const char              *String)
182 {
183     UINT32                  Length = 0;
184 
185 
186     /* Count the string until a null is encountered */
187 
188     while (*String)
189     {
190         Length++;
191         String++;
192     }
193 
194     return (Length);
195 }
196 
197 
198 /*******************************************************************************
199  *
200  * FUNCTION:    AcpiUtStrcpy (strcpy)
201  *
202  * PARAMETERS:  DstString       - Target of the copy
203  *              SrcString       - The source string to copy
204  *
205  * RETURN:      DstString
206  *
207  * DESCRIPTION: Copy a null terminated string
208  *
209  ******************************************************************************/
210 
211 char *
212 AcpiUtStrcpy (
213     char                    *DstString,
214     const char              *SrcString)
215 {
216     char                    *String = DstString;
217 
218 
219     /* Move bytes brute force */
220 
221     while (*SrcString)
222     {
223         *String = *SrcString;
224 
225         String++;
226         SrcString++;
227     }
228 
229     /* Null terminate */
230 
231     *String = 0;
232     return (DstString);
233 }
234 
235 
236 /*******************************************************************************
237  *
238  * FUNCTION:    AcpiUtStrncpy (strncpy)
239  *
240  * PARAMETERS:  DstString       - Target of the copy
241  *              SrcString       - The source string to copy
242  *              Count           - Maximum # of bytes to copy
243  *
244  * RETURN:      DstString
245  *
246  * DESCRIPTION: Copy a null terminated string, with a maximum length
247  *
248  ******************************************************************************/
249 
250 char *
251 AcpiUtStrncpy (
252     char                    *DstString,
253     const char              *SrcString,
254     ACPI_SIZE               Count)
255 {
256     char                    *String = DstString;
257 
258 
259     /* Copy the string */
260 
261     for (String = DstString;
262         Count && (Count--, (*String++ = *SrcString++)); )
263     {;}
264 
265     /* Pad with nulls if necessary */
266 
267     while (Count--)
268     {
269         *String = 0;
270         String++;
271     }
272 
273     /* Return original pointer */
274 
275     return (DstString);
276 }
277 
278 
279 /*******************************************************************************
280  *
281  * FUNCTION:    AcpiUtStrcmp (strcmp)
282  *
283  * PARAMETERS:  String1         - First string
284  *              String2         - Second string
285  *
286  * RETURN:      Index where strings mismatched, or 0 if strings matched
287  *
288  * DESCRIPTION: Compare two null terminated strings
289  *
290  ******************************************************************************/
291 
292 int
293 AcpiUtStrcmp (
294     const char              *String1,
295     const char              *String2)
296 {
297 
298 
299     for ( ; (*String1 == *String2); String2++)
300     {
301         if (!*String1++)
302         {
303             return (0);
304         }
305     }
306 
307     return ((unsigned char) *String1 - (unsigned char) *String2);
308 }
309 
310 
311 #ifdef ACPI_FUTURE_IMPLEMENTATION
312 /* Not used at this time */
313 /*******************************************************************************
314  *
315  * FUNCTION:    AcpiUtStrchr (strchr)
316  *
317  * PARAMETERS:  String          - Search string
318  *              ch              - character to search for
319  *
320  * RETURN:      Ptr to char or NULL if not found
321  *
322  * DESCRIPTION: Search a string for a character
323  *
324  ******************************************************************************/
325 
326 char *
327 AcpiUtStrchr (
328     const char              *String,
329     int                     ch)
330 {
331 
332 
333     for ( ; (*String); String++)
334     {
335         if ((*String) == (char) ch)
336         {
337             return ((char *) String);
338         }
339     }
340 
341     return (NULL);
342 }
343 #endif
344 
345 /*******************************************************************************
346  *
347  * FUNCTION:    AcpiUtStrncmp (strncmp)
348  *
349  * PARAMETERS:  String1         - First string
350  *              String2         - Second string
351  *              Count           - Maximum # of bytes to compare
352  *
353  * RETURN:      Index where strings mismatched, or 0 if strings matched
354  *
355  * DESCRIPTION: Compare two null terminated strings, with a maximum length
356  *
357  ******************************************************************************/
358 
359 int
360 AcpiUtStrncmp (
361     const char              *String1,
362     const char              *String2,
363     ACPI_SIZE               Count)
364 {
365 
366 
367     for ( ; Count-- && (*String1 == *String2); String2++)
368     {
369         if (!*String1++)
370         {
371             return (0);
372         }
373     }
374 
375     return ((Count == ACPI_SIZE_MAX) ? 0 : ((unsigned char) *String1 -
376         (unsigned char) *String2));
377 }
378 
379 
380 /*******************************************************************************
381  *
382  * FUNCTION:    AcpiUtStrcat (Strcat)
383  *
384  * PARAMETERS:  DstString       - Target of the copy
385  *              SrcString       - The source string to copy
386  *
387  * RETURN:      DstString
388  *
389  * DESCRIPTION: Append a null terminated string to a null terminated string
390  *
391  ******************************************************************************/
392 
393 char *
394 AcpiUtStrcat (
395     char                    *DstString,
396     const char              *SrcString)
397 {
398     char                    *String;
399 
400 
401     /* Find end of the destination string */
402 
403     for (String = DstString; *String++; )
404     { ; }
405 
406     /* Concatenate the string */
407 
408     for (--String; (*String++ = *SrcString++); )
409     { ; }
410 
411     return (DstString);
412 }
413 
414 
415 /*******************************************************************************
416  *
417  * FUNCTION:    AcpiUtStrncat (strncat)
418  *
419  * PARAMETERS:  DstString       - Target of the copy
420  *              SrcString       - The source string to copy
421  *              Count           - Maximum # of bytes to copy
422  *
423  * RETURN:      DstString
424  *
425  * DESCRIPTION: Append a null terminated string to a null terminated string,
426  *              with a maximum count.
427  *
428  ******************************************************************************/
429 
430 char *
431 AcpiUtStrncat (
432     char                    *DstString,
433     const char              *SrcString,
434     ACPI_SIZE               Count)
435 {
436     char                    *String;
437 
438 
439     if (Count)
440     {
441         /* Find end of the destination string */
442 
443         for (String = DstString; *String++; )
444         { ; }
445 
446         /* Concatenate the string */
447 
448         for (--String; (*String++ = *SrcString++) && --Count; )
449         { ; }
450 
451         /* Null terminate if necessary */
452 
453         if (!Count)
454         {
455             *String = 0;
456         }
457     }
458 
459     return (DstString);
460 }
461 
462 
463 /*******************************************************************************
464  *
465  * FUNCTION:    AcpiUtStrstr (strstr)
466  *
467  * PARAMETERS:  String1         - Target string
468  *              String2         - Substring to search for
469  *
470  * RETURN:      Where substring match starts, Null if no match found
471  *
472  * DESCRIPTION: Checks if String2 occurs in String1. This is not really a
473  *              full implementation of strstr, only sufficient for command
474  *              matching
475  *
476  ******************************************************************************/
477 
478 char *
479 AcpiUtStrstr (
480     char                    *String1,
481     char                    *String2)
482 {
483     char                    *String;
484 
485 
486     if (AcpiUtStrlen (String2) > AcpiUtStrlen (String1))
487     {
488         return (NULL);
489     }
490 
491     /* Walk entire string, comparing the letters */
492 
493     for (String = String1; *String2; )
494     {
495         if (*String2 != *String)
496         {
497             return (NULL);
498         }
499 
500         String2++;
501         String++;
502     }
503 
504     return (String1);
505 }
506 
507 
508 /*******************************************************************************
509  *
510  * FUNCTION:    AcpiUtStrtoul (strtoul)
511  *
512  * PARAMETERS:  String          - Null terminated string
513  *              Terminater      - Where a pointer to the terminating byte is
514  *                                returned
515  *              Base            - Radix of the string
516  *
517  * RETURN:      Converted value
518  *
519  * DESCRIPTION: Convert a string into a 32-bit unsigned value.
520  *              Note: use AcpiUtStrtoul64 for 64-bit integers.
521  *
522  ******************************************************************************/
523 
524 UINT32
525 AcpiUtStrtoul (
526     const char              *String,
527     char                    **Terminator,
528     UINT32                  Base)
529 {
530     UINT32                  converted = 0;
531     UINT32                  index;
532     UINT32                  sign;
533     const char              *StringStart;
534     UINT32                  ReturnValue = 0;
535     ACPI_STATUS             Status = AE_OK;
536 
537 
538     /*
539      * Save the value of the pointer to the buffer's first
540      * character, save the current errno value, and then
541      * skip over any white space in the buffer:
542      */
543     StringStart = String;
544     while (ACPI_IS_SPACE (*String) || *String == '\t')
545     {
546         ++String;
547     }
548 
549     /*
550      * The buffer may contain an optional plus or minus sign.
551      * If it does, then skip over it but remember what is was:
552      */
553     if (*String == '-')
554     {
555         sign = NEGATIVE;
556         ++String;
557     }
558     else if (*String == '+')
559     {
560         ++String;
561         sign = POSITIVE;
562     }
563     else
564     {
565         sign = POSITIVE;
566     }
567 
568     /*
569      * If the input parameter Base is zero, then we need to
570      * determine if it is octal, decimal, or hexadecimal:
571      */
572     if (Base == 0)
573     {
574         if (*String == '0')
575         {
576             if (AcpiUtToLower (*(++String)) == 'x')
577             {
578                 Base = 16;
579                 ++String;
580             }
581             else
582             {
583                 Base = 8;
584             }
585         }
586         else
587         {
588             Base = 10;
589         }
590     }
591     else if (Base < 2 || Base > 36)
592     {
593         /*
594          * The specified Base parameter is not in the domain of
595          * this function:
596          */
597         goto done;
598     }
599 
600     /*
601      * For octal and hexadecimal bases, skip over the leading
602      * 0 or 0x, if they are present.
603      */
604     if (Base == 8 && *String == '0')
605     {
606         String++;
607     }
608 
609     if (Base == 16 &&
610         *String == '0' &&
611         AcpiUtToLower (*(++String)) == 'x')
612     {
613         String++;
614     }
615 
616     /*
617      * Main loop: convert the string to an unsigned long:
618      */
619     while (*String)
620     {
621         if (ACPI_IS_DIGIT (*String))
622         {
623             index = (UINT32) ((UINT8) *String - '0');
624         }
625         else
626         {
627             index = (UINT32) AcpiUtToUpper (*String);
628             if (ACPI_IS_UPPER (index))
629             {
630                 index = index - 'A' + 10;
631             }
632             else
633             {
634                 goto done;
635             }
636         }
637 
638         if (index >= Base)
639         {
640             goto done;
641         }
642 
643         /*
644          * Check to see if value is out of range:
645          */
646 
647         if (ReturnValue > ((ACPI_UINT32_MAX - (UINT32) index) /
648                             (UINT32) Base))
649         {
650             Status = AE_ERROR;
651             ReturnValue = 0;           /* reset */
652         }
653         else
654         {
655             ReturnValue *= Base;
656             ReturnValue += index;
657             converted = 1;
658         }
659 
660         ++String;
661     }
662 
663 done:
664     /*
665      * If appropriate, update the caller's pointer to the next
666      * unconverted character in the buffer.
667      */
668     if (Terminator)
669     {
670         if (converted == 0 && ReturnValue == 0 && String != NULL)
671         {
672             *Terminator = (char *) StringStart;
673         }
674         else
675         {
676             *Terminator = (char *) String;
677         }
678     }
679 
680     if (Status == AE_ERROR)
681     {
682         ReturnValue = ACPI_UINT32_MAX;
683     }
684 
685     /*
686      * If a minus sign was present, then "the conversion is negated":
687      */
688     if (sign == NEGATIVE)
689     {
690         ReturnValue = (ACPI_UINT32_MAX - ReturnValue) + 1;
691     }
692 
693     return (ReturnValue);
694 }
695 
696 
697 /*******************************************************************************
698  *
699  * FUNCTION:    AcpiUtToUpper (TOUPPER)
700  *
701  * PARAMETERS:  c           - Character to convert
702  *
703  * RETURN:      Converted character as an int
704  *
705  * DESCRIPTION: Convert character to uppercase
706  *
707  ******************************************************************************/
708 
709 int
710 AcpiUtToUpper (
711     int                     c)
712 {
713 
714     return (ACPI_IS_LOWER(c) ? ((c)-0x20) : (c));
715 }
716 
717 
718 /*******************************************************************************
719  *
720  * FUNCTION:    AcpiUtToLower (TOLOWER)
721  *
722  * PARAMETERS:  c           - Character to convert
723  *
724  * RETURN:      Converted character as an int
725  *
726  * DESCRIPTION: Convert character to lowercase
727  *
728  ******************************************************************************/
729 
730 int
731 AcpiUtToLower (
732     int                     c)
733 {
734 
735     return (ACPI_IS_UPPER(c) ? ((c)+0x20) : (c));
736 }
737 
738 
739 /*******************************************************************************
740  *
741  * FUNCTION:    is* functions
742  *
743  * DESCRIPTION: is* functions use the ctype table below
744  *
745  ******************************************************************************/
746 
747 const UINT8 _acpi_ctype[257] = {
748     _ACPI_CN,            /* 0x0      0.     */
749     _ACPI_CN,            /* 0x1      1.     */
750     _ACPI_CN,            /* 0x2      2.     */
751     _ACPI_CN,            /* 0x3      3.     */
752     _ACPI_CN,            /* 0x4      4.     */
753     _ACPI_CN,            /* 0x5      5.     */
754     _ACPI_CN,            /* 0x6      6.     */
755     _ACPI_CN,            /* 0x7      7.     */
756     _ACPI_CN,            /* 0x8      8.     */
757     _ACPI_CN|_ACPI_SP,   /* 0x9      9.     */
758     _ACPI_CN|_ACPI_SP,   /* 0xA     10.     */
759     _ACPI_CN|_ACPI_SP,   /* 0xB     11.     */
760     _ACPI_CN|_ACPI_SP,   /* 0xC     12.     */
761     _ACPI_CN|_ACPI_SP,   /* 0xD     13.     */
762     _ACPI_CN,            /* 0xE     14.     */
763     _ACPI_CN,            /* 0xF     15.     */
764     _ACPI_CN,            /* 0x10    16.     */
765     _ACPI_CN,            /* 0x11    17.     */
766     _ACPI_CN,            /* 0x12    18.     */
767     _ACPI_CN,            /* 0x13    19.     */
768     _ACPI_CN,            /* 0x14    20.     */
769     _ACPI_CN,            /* 0x15    21.     */
770     _ACPI_CN,            /* 0x16    22.     */
771     _ACPI_CN,            /* 0x17    23.     */
772     _ACPI_CN,            /* 0x18    24.     */
773     _ACPI_CN,            /* 0x19    25.     */
774     _ACPI_CN,            /* 0x1A    26.     */
775     _ACPI_CN,            /* 0x1B    27.     */
776     _ACPI_CN,            /* 0x1C    28.     */
777     _ACPI_CN,            /* 0x1D    29.     */
778     _ACPI_CN,            /* 0x1E    30.     */
779     _ACPI_CN,            /* 0x1F    31.     */
780     _ACPI_XS|_ACPI_SP,   /* 0x20    32. ' ' */
781     _ACPI_PU,            /* 0x21    33. '!' */
782     _ACPI_PU,            /* 0x22    34. '"' */
783     _ACPI_PU,            /* 0x23    35. '#' */
784     _ACPI_PU,            /* 0x24    36. '$' */
785     _ACPI_PU,            /* 0x25    37. '%' */
786     _ACPI_PU,            /* 0x26    38. '&' */
787     _ACPI_PU,            /* 0x27    39. ''' */
788     _ACPI_PU,            /* 0x28    40. '(' */
789     _ACPI_PU,            /* 0x29    41. ')' */
790     _ACPI_PU,            /* 0x2A    42. '*' */
791     _ACPI_PU,            /* 0x2B    43. '+' */
792     _ACPI_PU,            /* 0x2C    44. ',' */
793     _ACPI_PU,            /* 0x2D    45. '-' */
794     _ACPI_PU,            /* 0x2E    46. '.' */
795     _ACPI_PU,            /* 0x2F    47. '/' */
796     _ACPI_XD|_ACPI_DI,   /* 0x30    48. '0' */
797     _ACPI_XD|_ACPI_DI,   /* 0x31    49. '1' */
798     _ACPI_XD|_ACPI_DI,   /* 0x32    50. '2' */
799     _ACPI_XD|_ACPI_DI,   /* 0x33    51. '3' */
800     _ACPI_XD|_ACPI_DI,   /* 0x34    52. '4' */
801     _ACPI_XD|_ACPI_DI,   /* 0x35    53. '5' */
802     _ACPI_XD|_ACPI_DI,   /* 0x36    54. '6' */
803     _ACPI_XD|_ACPI_DI,   /* 0x37    55. '7' */
804     _ACPI_XD|_ACPI_DI,   /* 0x38    56. '8' */
805     _ACPI_XD|_ACPI_DI,   /* 0x39    57. '9' */
806     _ACPI_PU,            /* 0x3A    58. ':' */
807     _ACPI_PU,            /* 0x3B    59. ';' */
808     _ACPI_PU,            /* 0x3C    60. '<' */
809     _ACPI_PU,            /* 0x3D    61. '=' */
810     _ACPI_PU,            /* 0x3E    62. '>' */
811     _ACPI_PU,            /* 0x3F    63. '?' */
812     _ACPI_PU,            /* 0x40    64. '@' */
813     _ACPI_XD|_ACPI_UP,   /* 0x41    65. 'A' */
814     _ACPI_XD|_ACPI_UP,   /* 0x42    66. 'B' */
815     _ACPI_XD|_ACPI_UP,   /* 0x43    67. 'C' */
816     _ACPI_XD|_ACPI_UP,   /* 0x44    68. 'D' */
817     _ACPI_XD|_ACPI_UP,   /* 0x45    69. 'E' */
818     _ACPI_XD|_ACPI_UP,   /* 0x46    70. 'F' */
819     _ACPI_UP,            /* 0x47    71. 'G' */
820     _ACPI_UP,            /* 0x48    72. 'H' */
821     _ACPI_UP,            /* 0x49    73. 'I' */
822     _ACPI_UP,            /* 0x4A    74. 'J' */
823     _ACPI_UP,            /* 0x4B    75. 'K' */
824     _ACPI_UP,            /* 0x4C    76. 'L' */
825     _ACPI_UP,            /* 0x4D    77. 'M' */
826     _ACPI_UP,            /* 0x4E    78. 'N' */
827     _ACPI_UP,            /* 0x4F    79. 'O' */
828     _ACPI_UP,            /* 0x50    80. 'P' */
829     _ACPI_UP,            /* 0x51    81. 'Q' */
830     _ACPI_UP,            /* 0x52    82. 'R' */
831     _ACPI_UP,            /* 0x53    83. 'S' */
832     _ACPI_UP,            /* 0x54    84. 'T' */
833     _ACPI_UP,            /* 0x55    85. 'U' */
834     _ACPI_UP,            /* 0x56    86. 'V' */
835     _ACPI_UP,            /* 0x57    87. 'W' */
836     _ACPI_UP,            /* 0x58    88. 'X' */
837     _ACPI_UP,            /* 0x59    89. 'Y' */
838     _ACPI_UP,            /* 0x5A    90. 'Z' */
839     _ACPI_PU,            /* 0x5B    91. '[' */
840     _ACPI_PU,            /* 0x5C    92. '\' */
841     _ACPI_PU,            /* 0x5D    93. ']' */
842     _ACPI_PU,            /* 0x5E    94. '^' */
843     _ACPI_PU,            /* 0x5F    95. '_' */
844     _ACPI_PU,            /* 0x60    96. '`' */
845     _ACPI_XD|_ACPI_LO,   /* 0x61    97. 'a' */
846     _ACPI_XD|_ACPI_LO,   /* 0x62    98. 'b' */
847     _ACPI_XD|_ACPI_LO,   /* 0x63    99. 'c' */
848     _ACPI_XD|_ACPI_LO,   /* 0x64   100. 'd' */
849     _ACPI_XD|_ACPI_LO,   /* 0x65   101. 'e' */
850     _ACPI_XD|_ACPI_LO,   /* 0x66   102. 'f' */
851     _ACPI_LO,            /* 0x67   103. 'g' */
852     _ACPI_LO,            /* 0x68   104. 'h' */
853     _ACPI_LO,            /* 0x69   105. 'i' */
854     _ACPI_LO,            /* 0x6A   106. 'j' */
855     _ACPI_LO,            /* 0x6B   107. 'k' */
856     _ACPI_LO,            /* 0x6C   108. 'l' */
857     _ACPI_LO,            /* 0x6D   109. 'm' */
858     _ACPI_LO,            /* 0x6E   110. 'n' */
859     _ACPI_LO,            /* 0x6F   111. 'o' */
860     _ACPI_LO,            /* 0x70   112. 'p' */
861     _ACPI_LO,            /* 0x71   113. 'q' */
862     _ACPI_LO,            /* 0x72   114. 'r' */
863     _ACPI_LO,            /* 0x73   115. 's' */
864     _ACPI_LO,            /* 0x74   116. 't' */
865     _ACPI_LO,            /* 0x75   117. 'u' */
866     _ACPI_LO,            /* 0x76   118. 'v' */
867     _ACPI_LO,            /* 0x77   119. 'w' */
868     _ACPI_LO,            /* 0x78   120. 'x' */
869     _ACPI_LO,            /* 0x79   121. 'y' */
870     _ACPI_LO,            /* 0x7A   122. 'z' */
871     _ACPI_PU,            /* 0x7B   123. '{' */
872     _ACPI_PU,            /* 0x7C   124. '|' */
873     _ACPI_PU,            /* 0x7D   125. '}' */
874     _ACPI_PU,            /* 0x7E   126. '~' */
875     _ACPI_CN,            /* 0x7F   127.     */
876 
877     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0x80 to 0x8F    */
878     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0x90 to 0x9F    */
879     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0xA0 to 0xAF    */
880     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0xB0 to 0xBF    */
881     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0xC0 to 0xCF    */
882     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0xD0 to 0xDF    */
883     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0xE0 to 0xEF    */
884     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* 0xF0 to 0x100   */
885 };
886 
887 
888 #endif /* ACPI_USE_SYSTEM_CLIBRARY */
889 
890