Subversion Repositories Kolibri OS

Rev

Rev 1498 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1498 Rev 2216
Line 6... Line 6...
6
 
6
 
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
 *
Line 113... Line 113...
113
 *
113
 *
114
 *****************************************************************************/
114
 *****************************************************************************/
Line 115... Line 115...
115
 
115
 
116
 
116
 
117
/*
117
/*
-
 
118
 * These interfaces are required in order to compile the ASL compiler and the
-
 
119
 * various ACPICA tools under Linux or other Unix-like system.
118
 * These interfaces are required in order to compile the ASL compiler under
120
 *
-
 
121
 * Note: Use #define __APPLE__ for OS X generation.
-
 
122
 */
-
 
123
#include "acpi.h"
-
 
124
#include "accommon.h"
-
 
125
#include "amlcode.h"
Line 119... Line 126...
119
 * Linux or other Unix-like system.
126
#include "acparser.h"
120
 */
127
#include "acdebug.h"
121
 
128
 
122
#include 
129
#include 
123
#include 
130
#include 
124
#include 
131
#include 
125
#include 
132
#include 
126
#include 
-
 
127
#include 
133
#include 
128
#include 
-
 
129
 
-
 
130
#include "acpi.h"
-
 
131
#include "accommon.h"
-
 
Line 132... Line 134...
132
#include "amlcode.h"
134
#include 
133
#include "acparser.h"
135
#include 
Line 152... Line 154...
152
    ACPI_TABLE_HEADER       *ExistingTable,
154
    ACPI_TABLE_HEADER       *ExistingTable,
153
    ACPI_TABLE_HEADER       **NewTable);
155
    ACPI_TABLE_HEADER       **NewTable);
Line 154... Line 156...
154
 
156
 
Line -... Line 157...
-
 
157
typedef void* (*PTHREAD_CALLBACK) (void *);
-
 
158
 
-
 
159
/* Apple-specific */
-
 
160
 
-
 
161
#ifdef __APPLE__
-
 
162
#define sem_destroy         sem_close
Line 155... Line 163...
155
typedef void* (*PTHREAD_CALLBACK) (void *);
163
#endif
156
 
164
 
157
 
165
 
158
/******************************************************************************
166
/******************************************************************************
Line 190... Line 198...
190
 *
198
 *
191
 * PARAMETERS:  None
199
 * PARAMETERS:  None
192
 *
200
 *
193
 * RETURN:      RSDP physical address
201
 * RETURN:      RSDP physical address
194
 *
202
 *
195
 * DESCRIPTION: Gets the root pointer (RSDP)
203
 * DESCRIPTION: Gets the ACPI root pointer (RSDP)
196
 *
204
 *
197
 *****************************************************************************/
205
 *****************************************************************************/
Line 198... Line 206...
198
 
206
 
199
ACPI_PHYSICAL_ADDRESS
207
ACPI_PHYSICAL_ADDRESS
Line 237... Line 245...
237
 
245
 
238
/******************************************************************************
246
/******************************************************************************
239
 *
247
 *
240
 * FUNCTION:    AcpiOsTableOverride
248
 * FUNCTION:    AcpiOsTableOverride
241
 *
249
 *
-
 
250
 * PARAMETERS:  ExistingTable       - Header of current table (probably
242
 * PARAMETERS:  ExistingTable   - Header of current table (probably firmware)
251
 *                                    firmware)
243
 *              NewTable        - Where an entire new table is returned.
252
 *              NewTable        - Where an entire new table is returned.
244
 *
253
 *
245
 * RETURN:      Status, pointer to new table.  Null pointer returned if no
254
 * RETURN:      Status, pointer to new table.  Null pointer returned if no
246
 *              table is available to override
255
 *              table is available to override
Line 296... Line 305...
296
 
305
 
297
/******************************************************************************
306
/******************************************************************************
298
 *
307
 *
299
 * FUNCTION:    AcpiOsPrintf
308
 * FUNCTION:    AcpiOsPrintf
300
 *
309
 *
301
 * PARAMETERS:  fmt, ...            Standard printf format
310
 * PARAMETERS:  fmt, ...            - Standard printf format
302
 *
311
 *
303
 * RETURN:      None
312
 * RETURN:      None
304
 *
313
 *
305
 * DESCRIPTION: Formatted output
314
 * DESCRIPTION: Formatted output
Line 322... Line 331...
322
 
331
 
323
/******************************************************************************
332
/******************************************************************************
324
 *
333
 *
325
 * FUNCTION:    AcpiOsVprintf
334
 * FUNCTION:    AcpiOsVprintf
326
 *
335
 *
327
 * PARAMETERS:  fmt                 Standard printf format
336
 * PARAMETERS:  fmt                 - Standard printf format
328
 *              args                Argument list
337
 *              args                - Argument list
329
 *
338
 *
330
 * RETURN:      None
339
 * RETURN:      None
331
 *
340
 *
332
 * DESCRIPTION: Formatted output with argument list pointer
341
 * DESCRIPTION: Formatted output with argument list pointer
Line 370... Line 379...
370
 
379
 
371
/******************************************************************************
380
/******************************************************************************
372
 *
381
 *
373
 * FUNCTION:    AcpiOsGetLine
382
 * FUNCTION:    AcpiOsGetLine
374
 *
383
 *
375
 * PARAMETERS:  fmt                 Standard printf format
384
 * PARAMETERS:  Buffer              - Where to return the command line
-
 
385
 *              BufferLength        - Maximum length of Buffer
376
 *              args                Argument list
386
 *              BytesRead           - Where the actual byte count is returned
377
 *
387
 *
378
 * RETURN:      Actual bytes read
388
 * RETURN:      Status and actual bytes read
379
 *
389
 *
380
 * DESCRIPTION: Formatted input with argument list pointer
390
 * DESCRIPTION: Formatted input with argument list pointer
381
 *
391
 *
Line 382... Line 392...
382
 *****************************************************************************/
392
 *****************************************************************************/
383
 
393
 
384
UINT32
394
ACPI_STATUS
-
 
395
AcpiOsGetLine (
-
 
396
    char                    *Buffer,
385
AcpiOsGetLine (
397
    UINT32                  BufferLength,
386
    char                    *Buffer)
398
    UINT32                  *BytesRead)
387
{
399
{
Line 388... Line 400...
388
    UINT8                   Temp;
400
    UINT8                   Temp;
389
    UINT32                  i;
401
    UINT32                  i;
-
 
402
 
-
 
403
 
-
 
404
    for (i = 0; ; i++)
-
 
405
    {
-
 
406
        if (i >= BufferLength)
390
 
407
        {
391
 
408
            return (AE_BUFFER_OVERFLOW);
392
    for (i = 0; ; i++)
409
        }
393
    {
410
 
394
        scanf ("%1c", &Temp);
411
        scanf ("%1c", &Temp);
Line 404... Line 421...
404
 
421
 
Line 405... Line 422...
405
    Buffer [i] = 0;
422
    Buffer [i] = 0;
Line 406... Line 423...
406
 
423
 
-
 
424
    /* Return the number of bytes in the string */
-
 
425
 
407
    /* Return the number of bytes in the string */
426
    if (BytesRead)
-
 
427
    {
-
 
428
        *BytesRead = i;
-
 
429
    }
Line 408... Line 430...
408
 
430
    return (AE_OK);
409
    return (i);
431
}
410
}
432
 
411
 
433
 
412
/******************************************************************************
434
/******************************************************************************
413
 *
435
 *
414
 * FUNCTION:    AcpiOsMapMemory
436
 * FUNCTION:    AcpiOsMapMemory
415
 *
437
 *
416
 * PARAMETERS:  where               Physical address of memory to be mapped
438
 * PARAMETERS:  where               - Physical address of memory to be mapped
417
 *              length              How much memory to map
439
 *              length              - How much memory to map
418
 *
440
 *
Line 434... Line 456...
434
 
456
 
435
/******************************************************************************
457
/******************************************************************************
436
 *
458
 *
437
 * FUNCTION:    AcpiOsUnmapMemory
459
 * FUNCTION:    AcpiOsUnmapMemory
438
 *
460
 *
439
 * PARAMETERS:  where               Logical address of memory to be unmapped
461
 * PARAMETERS:  where               - Logical address of memory to be unmapped
440
 *              length              How much memory to unmap
462
 *              length              - How much memory to unmap
441
 *
463
 *
442
 * RETURN:      None.
464
 * RETURN:      None.
443
 *
465
 *
444
 * DESCRIPTION: Delete a previously created mapping.  Where and Length must
466
 * DESCRIPTION: Delete a previously created mapping.  Where and Length must
Line 458... Line 480...
458
 
480
 
459
/******************************************************************************
481
/******************************************************************************
460
 *
482
 *
461
 * FUNCTION:    AcpiOsAllocate
483
 * FUNCTION:    AcpiOsAllocate
462
 *
484
 *
463
 * PARAMETERS:  Size                Amount to allocate, in bytes
485
 * PARAMETERS:  Size                - Amount to allocate, in bytes
464
 *
486
 *
465
 * RETURN:      Pointer to the new allocation.  Null on error.
487
 * RETURN:      Pointer to the new allocation.  Null on error.
466
 *
488
 *
467
 * DESCRIPTION: Allocate memory.  Algorithm is dependent on the OS.
489
 * DESCRIPTION: Allocate memory.  Algorithm is dependent on the OS.
Line 482... Line 504...
482
 
504
 
483
/******************************************************************************
505
/******************************************************************************
484
 *
506
 *
485
 * FUNCTION:    AcpiOsFree
507
 * FUNCTION:    AcpiOsFree
486
 *
508
 *
487
 * PARAMETERS:  mem                 Pointer to previously allocated memory
509
 * PARAMETERS:  mem                 - Pointer to previously allocated memory
488
 *
510
 *
489
 * RETURN:      None.
511
 * RETURN:      None.
490
 *
512
 *
491
 * DESCRIPTION: Free memory allocated via AcpiOsAllocate
513
 * DESCRIPTION: Free memory allocated via AcpiOsAllocate
Line 527... Line 549...
527
    {
549
    {
528
        return (AE_BAD_PARAMETER);
550
        return (AE_BAD_PARAMETER);
529
    }
551
    }
Line 530... Line 552...
530
 
552
 
531
    Sem = AcpiOsAllocate (sizeof (sem_t));
-
 
532
 
553
    Sem = AcpiOsAllocate (sizeof (sem_t));
533
    if (!Sem)
554
    if (!Sem)
534
    {
555
    {
535
        return (AE_NO_MEMORY);
556
        return (AE_NO_MEMORY);
Line 754... Line 775...
754
 
775
 
755
/******************************************************************************
776
/******************************************************************************
756
 *
777
 *
757
 * FUNCTION:    AcpiOsInstallInterruptHandler
778
 * FUNCTION:    AcpiOsInstallInterruptHandler
758
 *
779
 *
759
 * PARAMETERS:  InterruptNumber     Level handler should respond to.
780
 * PARAMETERS:  InterruptNumber     - Level handler should respond to.
760
 *              Isr                 Address of the ACPI interrupt handler
781
 *              Isr                 - Address of the ACPI interrupt handler
761
 *              ExceptPtr           Where status is returned
782
 *              ExceptPtr           - Where status is returned
762
 *
783
 *
763
 * RETURN:      Handle to the newly installed handler.
784
 * RETURN:      Handle to the newly installed handler.
764
 *
785
 *
765
 * DESCRIPTION: Install an interrupt handler.  Used to install the ACPI
786
 * DESCRIPTION: Install an interrupt handler.  Used to install the ACPI
Line 780... Line 801...
780
 
801
 
781
/******************************************************************************
802
/******************************************************************************
782
 *
803
 *
783
 * FUNCTION:    AcpiOsRemoveInterruptHandler
804
 * FUNCTION:    AcpiOsRemoveInterruptHandler
784
 *
805
 *
785
 * PARAMETERS:  Handle              Returned when handler was installed
806
 * PARAMETERS:  Handle              - Returned when handler was installed
786
 *
807
 *
787
 * RETURN:      Status
808
 * RETURN:      Status
788
 *
809
 *
789
 * DESCRIPTION: Uninstalls an interrupt handler.
810
 * DESCRIPTION: Uninstalls an interrupt handler.
Line 800... Line 821...
800
}
821
}
Line 801... Line 822...
801
 
822
 
802
 
823
 
803
/******************************************************************************
-
 
804
 *
-
 
805
 * FUNCTION:    AcpiOsExecute
-
 
806
 *
-
 
807
 * PARAMETERS:  Type            - Type of execution
-
 
808
 *              Function        - Address of the function to execute
-
 
809
 *              Context         - Passed as a parameter to the function
-
 
810
 *
-
 
811
 * RETURN:      Status.
-
 
812
 *
-
 
813
 * DESCRIPTION: Execute a new thread
-
 
814
 *
-
 
815
 *****************************************************************************/
-
 
816
 
-
 
817
ACPI_STATUS
-
 
818
AcpiOsExecute (
-
 
819
    ACPI_EXECUTE_TYPE       Type,
-
 
820
    ACPI_OSD_EXEC_CALLBACK  Function,
-
 
821
    void                    *Context)
-
 
822
{
-
 
823
    pthread_t               thread;
-
 
824
    int                     ret;
-
 
825
 
-
 
826
 
-
 
827
    ret = pthread_create (&thread, NULL, (PTHREAD_CALLBACK) Function, Context);
-
 
828
    if (ret)
-
 
829
    {
-
 
830
        AcpiOsPrintf("Create thread failed");
-
 
831
    }
-
 
832
    return (0);
-
 
833
}
-
 
834
 
-
 
835
 
-
 
836
/******************************************************************************
824
/******************************************************************************
837
 *
825
 *
838
 * FUNCTION:    AcpiOsStall
826
 * FUNCTION:    AcpiOsStall
839
 *
827
 *
840
 * PARAMETERS:  microseconds        To sleep
828
 * PARAMETERS:  microseconds        - Time to sleep
841
 *
829
 *
842
 * RETURN:      Blocks until sleep is completed.
830
 * RETURN:      Blocks until sleep is completed.
843
 *
831
 *
Line 859... Line 847...
859
 
847
 
860
/******************************************************************************
848
/******************************************************************************
861
 *
849
 *
862
 * FUNCTION:    AcpiOsSleep
850
 * FUNCTION:    AcpiOsSleep
863
 *
851
 *
864
 * PARAMETERS:  milliseconds        To sleep
852
 * PARAMETERS:  milliseconds        - Time to sleep
865
 *
853
 *
866
 * RETURN:      Blocks until sleep is completed.
854
 * RETURN:      Blocks until sleep is completed.
867
 *
855
 *
868
 * DESCRIPTION: Sleep at millisecond granularity
856
 * DESCRIPTION: Sleep at millisecond granularity
Line 880... Line 868...
880
     * Arg to usleep() must be less than 1,000,000 (1 second)
868
     * Arg to usleep() must be less than 1,000,000 (1 second)
881
     */
869
     */
882
    usleep ((milliseconds % 1000) * 1000);      /* Sleep for remaining usecs */
870
    usleep ((milliseconds % 1000) * 1000);      /* Sleep for remaining usecs */
883
}
871
}
Line -... Line 872...
-
 
872
 
884
 
873
 
885
/******************************************************************************
874
/******************************************************************************
886
 *
875
 *
887
 * FUNCTION:    AcpiOsGetTimer
876
 * FUNCTION:    AcpiOsGetTimer
888
 *
877
 *
Line 893... Line 882...
893
 * DESCRIPTION: Get the current system time
882
 * DESCRIPTION: Get the current system time
894
 *
883
 *
895
 *****************************************************************************/
884
 *****************************************************************************/
Line 896... Line 885...
896
 
885
 
897
UINT64
886
UINT64
-
 
887
AcpiOsGetTimer (
898
AcpiOsGetTimer (void)
888
    void)
899
{
889
{
Line 900... Line 890...
900
    struct timeval          time;
890
    struct timeval          time;
Line 908... Line 898...
908
}
898
}
Line 909... Line 899...
909
 
899
 
910
 
900
 
911
/******************************************************************************
-
 
912
 *
-
 
913
 * FUNCTION:    AcpiOsValidateInterface
-
 
914
 *
-
 
915
 * PARAMETERS:  Interface           - Requested interface to be validated
-
 
916
 *
-
 
917
 * RETURN:      AE_OK if interface is supported, AE_SUPPORT otherwise
-
 
918
 *
-
 
919
 * DESCRIPTION: Match an interface string to the interfaces supported by the
-
 
920
 *              host. Strings originate from an AML call to the _OSI method.
-
 
921
 *
-
 
922
 *****************************************************************************/
-
 
923
 
-
 
924
ACPI_STATUS
-
 
925
AcpiOsValidateInterface (
-
 
926
    char                    *Interface)
-
 
927
{
-
 
928
 
-
 
929
    return (AE_SUPPORT);
-
 
930
}
-
 
931
 
-
 
932
 
-
 
933
/******************************************************************************
901
/******************************************************************************
934
 *
902
 *
935
 * FUNCTION:    AcpiOsReadPciConfiguration
903
 * FUNCTION:    AcpiOsReadPciConfiguration
936
 *
904
 *
937
 * PARAMETERS:  PciId               Seg/Bus/Dev
905
 * PARAMETERS:  PciId               - Seg/Bus/Dev
938
 *              Register            Device Register
906
 *              Register            - Device Register
939
 *              Value               Buffer where value is placed
907
 *              Value               - Buffer where value is placed
940
 *              Width               Number of bits
908
 *              Width               - Number of bits
941
 *
909
 *
942
 * RETURN:      Status
910
 * RETURN:      Status
943
 *
911
 *
Line 947... Line 915...
947
 
915
 
948
ACPI_STATUS
916
ACPI_STATUS
949
AcpiOsReadPciConfiguration (
917
AcpiOsReadPciConfiguration (
950
    ACPI_PCI_ID             *PciId,
918
    ACPI_PCI_ID             *PciId,
951
    UINT32                  Register,
919
    UINT32                  Register,
952
    void                    *Value,
920
    UINT64                  *Value,
953
    UINT32                  Width)
921
    UINT32                  Width)
Line 954... Line 922...
954
{
922
{
955
 
923
 
Line 959... Line 927...
959
 
927
 
960
/******************************************************************************
928
/******************************************************************************
961
 *
929
 *
962
 * FUNCTION:    AcpiOsWritePciConfiguration
930
 * FUNCTION:    AcpiOsWritePciConfiguration
963
 *
931
 *
964
 * PARAMETERS:  PciId               Seg/Bus/Dev
932
 * PARAMETERS:  PciId               - Seg/Bus/Dev
965
 *              Register            Device Register
933
 *              Register            - Device Register
966
 *              Value               Value to be written
934
 *              Value               - Value to be written
967
 *              Width               Number of bits
935
 *              Width               - Number of bits
968
 *
936
 *
969
 * RETURN:      Status.
937
 * RETURN:      Status.
970
 *
938
 *
971
 * DESCRIPTION: Write data to PCI configuration space
939
 * DESCRIPTION: Write data to PCI configuration space
Line 981... Line 949...
981
{
949
{
Line 982... Line 950...
982
 
950
 
983
    return (AE_OK);
951
    return (AE_OK);
Line 984... Line -...
984
}
-
 
985
 
-
 
986
/* TEMPORARY STUB FUNCTION */
-
 
987
void
-
 
988
AcpiOsDerivePciId(
-
 
989
    ACPI_HANDLE             Device,
-
 
990
    ACPI_HANDLE             Region,
-
 
991
    ACPI_PCI_ID             **PciId)
-
 
992
{
-
 
993
 
-
 
Line 994... Line 952...
994
}
952
}
995
 
953
 
996
 
954
 
997
/******************************************************************************
955
/******************************************************************************
998
 *
956
 *
999
 * FUNCTION:    AcpiOsReadPort
957
 * FUNCTION:    AcpiOsReadPort
1000
 *
958
 *
1001
 * PARAMETERS:  Address             Address of I/O port/register to read
959
 * PARAMETERS:  Address             - Address of I/O port/register to read
1002
 *              Value               Where value is placed
960
 *              Value               - Where value is placed
1003
 *              Width               Number of bits
961
 *              Width               - Number of bits
1004
 *
962
 *
1005
 * RETURN:      Value read from port
963
 * RETURN:      Value read from port
Line 1039... Line 997...
1039
 
997
 
1040
/******************************************************************************
998
/******************************************************************************
1041
 *
999
 *
1042
 * FUNCTION:    AcpiOsWritePort
1000
 * FUNCTION:    AcpiOsWritePort
1043
 *
1001
 *
1044
 * PARAMETERS:  Address             Address of I/O port/register to write
1002
 * PARAMETERS:  Address             - Address of I/O port/register to write
1045
 *              Value               Value to write
1003
 *              Value               - Value to write
1046
 *              Width               Number of bits
1004
 *              Width               - Number of bits
1047
 *
1005
 *
1048
 * RETURN:      None
1006
 * RETURN:      None
1049
 *
1007
 *
1050
 * DESCRIPTION: Write data to an I/O port or register
1008
 * DESCRIPTION: Write data to an I/O port or register
Line 1064... Line 1022...
1064
 
1022
 
1065
/******************************************************************************
1023
/******************************************************************************
1066
 *
1024
 *
1067
 * FUNCTION:    AcpiOsReadMemory
1025
 * FUNCTION:    AcpiOsReadMemory
1068
 *
1026
 *
1069
 * PARAMETERS:  Address             Physical Memory Address to read
1027
 * PARAMETERS:  Address             - Physical Memory Address to read
1070
 *              Value               Where value is placed
1028
 *              Value               - Where value is placed
1071
 *              Width               Number of bits
1029
 *              Width               - Number of bits
1072
 *
1030
 *
1073
 * RETURN:      Value read from physical memory address
1031
 * RETURN:      Value read from physical memory address
1074
 *
1032
 *
1075
 * DESCRIPTION: Read data from a physical memory address
1033
 * DESCRIPTION: Read data from a physical memory address
Line 1100... Line 1058...
1100
 
1058
 
1101
/******************************************************************************
1059
/******************************************************************************
1102
 *
1060
 *
1103
 * FUNCTION:    AcpiOsWriteMemory
1061
 * FUNCTION:    AcpiOsWriteMemory
1104
 *
1062
 *
1105
 * PARAMETERS:  Address             Physical Memory Address to write
1063
 * PARAMETERS:  Address             - Physical Memory Address to write
1106
 *              Value               Value to write
1064
 *              Value               - Value to write
1107
 *              Width               Number of bits
1065
 *              Width               - Number of bits
1108
 *
1066
 *
1109
 * RETURN:      None
1067
 * RETURN:      None
1110
 *
1068
 *
1111
 * DESCRIPTION: Write data to a physical memory address
1069
 * DESCRIPTION: Write data to a physical memory address
Line 1169... Line 1127...
1169
}
1127
}
Line 1170... Line 1128...
1170
 
1128
 
1171
 
1129
 
1172
/******************************************************************************
-
 
1173
 *
-
 
1174
 * FUNCTION:    AcpiOsGetThreadId
-
 
1175
 *
-
 
1176
 * PARAMETERS:  None
-
 
1177
 *
-
 
1178
 * RETURN:      Id of the running thread
-
 
1179
 *
-
 
1180
 * DESCRIPTION: Get the Id of the current (running) thread
-
 
1181
 *
-
 
1182
 * NOTE:        The environment header should contain this line:
-
 
1183
 *                  #define ACPI_THREAD_ID pthread_t
-
 
1184
 *
-
 
1185
 *****************************************************************************/
-
 
1186
 
-
 
1187
ACPI_THREAD_ID
-
 
1188
AcpiOsGetThreadId (void)
-
 
1189
{
-
 
1190
 
-
 
1191
    return (pthread_self ());
-
 
1192
}
-
 
1193
 
-
 
1194
 
-
 
1195
/******************************************************************************
1130
/******************************************************************************
1196
 *
1131
 *
1197
 * FUNCTION:    AcpiOsSignal
1132
 * FUNCTION:    AcpiOsSignal
1198
 *
1133
 *
1199
 * PARAMETERS:  Function            ACPI CA signal function code
1134
 * PARAMETERS:  Function            - ACPI CA signal function code
1200
 *              Info                Pointer to function-dependent structure
1135
 *              Info                - Pointer to function-dependent structure
1201
 *
1136
 *
1202
 * RETURN:      Status
1137
 * RETURN:      Status
1203
 *
1138
 *