Subversion Repositories Kolibri OS

Rev

Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1498 Rev 2216
Line 7... Line 7...
7
/******************************************************************************
7
/******************************************************************************
8
 *
8
 *
9
 * 1. Copyright Notice
9
 * 1. Copyright Notice
10
 *
10
 *
11
 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
11
 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
12
 * All rights reserved.
12
 * All rights reserved.
13
 *
13
 *
14
 * 2. License
14
 * 2. License
15
 *
15
 *
16
 * 2.1. This is your license from Intel Corp. under its intellectual property
16
 * 2.1. This is your license from Intel Corp. under its intellectual property
Line 121... Line 121...
121
#define _COMPONENT          ACPI_COMPILER
121
#define _COMPONENT          ACPI_COMPILER
122
        ACPI_MODULE_NAME    ("aslopcodes")
122
        ACPI_MODULE_NAME    ("aslopcodes")
Line 123... Line -...
123
 
-
 
124
 
-
 
125
/* UUID support */
-
 
126
 
-
 
127
static UINT8 OpcMapToUUID[16] =
-
 
128
{
-
 
129
    6,4,2,0,11,9,16,14,19,21,24,26,28,30,32,34
-
 
130
};
123
 
Line 131... Line 124...
131
 
124
 
132
/* Local prototypes */
125
/* Local prototypes */
133
 
126
 
Line 590... Line 583...
590
    {
583
    {
591
        /* Create ID big-endian first (bits are contiguous) */
584
        /* Create ID big-endian first (bits are contiguous) */
592
 
585
 
Line 593... Line 586...
593
        BigEndianId =
586
        BigEndianId =
594
            (UINT32) (InString[0] - 0x40) << 26 |
587
            (UINT32) ((UINT8) (InString[0] - 0x40)) << 26 |
595
            (UINT32) (InString[1] - 0x40) << 21 |
588
            (UINT32) ((UINT8) (InString[1] - 0x40)) << 21 |
596
            (UINT32) (InString[2] - 0x40) << 16 |
589
            (UINT32) ((UINT8) (InString[2] - 0x40)) << 16 |
Line 597... Line 590...
597
 
590
 
598
            (UtHexCharToValue (InString[3])) << 12 |
591
            (UtHexCharToValue (InString[3])) << 12 |
599
            (UtHexCharToValue (InString[4])) << 8  |
592
            (UtHexCharToValue (InString[4])) << 8  |
600
            (UtHexCharToValue (InString[5])) << 4  |
593
            (UtHexCharToValue (InString[5])) << 4  |
Line 639... Line 632...
639
{
632
{
640
    char                    *InString;
633
    char                    *InString;
641
    char                    *Buffer;
634
    char                    *Buffer;
642
    ACPI_STATUS             Status = AE_OK;
635
    ACPI_STATUS             Status = AE_OK;
643
    UINT32                  i;
636
    ACPI_PARSE_OBJECT       *NewOp;
644
    ACPI_PARSE_OBJECT       *NewOp;
-
 
645
 
637
 
Line 646... Line 638...
646
 
638
 
647
    InString = (char *) Op->Asl.Value.String;
-
 
648
 
-
 
649
    if (ACPI_STRLEN (InString) != 36)
-
 
650
    {
-
 
651
        Status = AE_BAD_PARAMETER;
-
 
652
    }
-
 
653
    else
-
 
654
    {
-
 
655
        /* Check all 36 characters for correct format */
-
 
656
 
-
 
657
        for (i = 0; i < 36; i++)
-
 
658
        {
-
 
659
            if ((i == 8) || (i == 13) || (i == 18) || (i == 23))
-
 
660
            {
-
 
661
                if (InString[i] != '-')
-
 
662
                {
-
 
663
                    Status = AE_BAD_PARAMETER;
-
 
664
                }
-
 
665
            }
-
 
666
            else
-
 
667
            {
-
 
668
                if (!isxdigit ((int) InString[i]))
-
 
669
                {
-
 
670
                    Status = AE_BAD_PARAMETER;
-
 
671
                }
-
 
672
            }
-
 
673
        }
-
 
674
    }
-
 
675
 
639
    InString = (char *) Op->Asl.Value.String;
Line -... Line 640...
-
 
640
    Buffer = UtLocalCalloc (16);
676
    Buffer = UtLocalCalloc (16);
641
 
677
 
642
    Status = AuValidateUuid (InString);
678
    if (ACPI_FAILURE (Status))
643
    if (ACPI_FAILURE (Status))
679
    {
644
    {
680
        AslError (ASL_ERROR, ASL_MSG_INVALID_UUID, Op, Op->Asl.Value.String);
645
        AslError (ASL_ERROR, ASL_MSG_INVALID_UUID, Op, Op->Asl.Value.String);
681
    }
646
    }
682
    else for (i = 0; i < 16; i++)
-
 
683
    {
647
    else
684
        Buffer[i]  = (char) (UtHexCharToValue (InString[OpcMapToUUID[i]]) << 4);
648
    {
Line 685... Line 649...
685
        Buffer[i] |= (char)  UtHexCharToValue (InString[OpcMapToUUID[i] + 1]);
649
        (void) AuConvertStringToUuid (InString, Buffer);
Line 686... Line 650...
686
    }
650
    }