Subversion Repositories Kolibri OS

Rev

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

Rev 1498 Rev 2187
Line 700... Line 700...
700
AcpiOsInstallInterruptHandler (
700
AcpiOsInstallInterruptHandler (
701
    UINT32                  InterruptNumber,
701
    UINT32                  InterruptNumber,
702
    ACPI_OSD_HANDLER        ServiceRoutine,
702
    ACPI_OSD_HANDLER        ServiceRoutine,
703
    void                    *Context)
703
    void                    *Context)
704
{
704
{
705
 
-
 
-
 
705
    dbgprintf("%s irq %d\n", InterruptNumber );
706
    return (AE_OK);
706
    return (AE_OK);
707
}
707
}
Line 708... Line 708...
708
 
708
 
Line 993... Line 993...
993
 
993
 
994
    default:
994
    default:
995
        return (AE_BAD_PARAMETER);
995
        return (AE_BAD_PARAMETER);
Line -... Line 996...
-
 
996
    }
-
 
997
 
996
    }
998
    dbgprintf("%s %x, %x\n",__FUNCTION__, Address, *Value);
997
 
999
 
Line 998... Line 1000...
998
    return (AE_OK);
1000
    return (AE_OK);
Line 1035... Line 1037...
1035
 
1037
 
1036
		default:
1038
		default:
1037
			return (AE_ERROR);
1039
			return (AE_ERROR);
Line -... Line 1040...
-
 
1040
	}
-
 
1041
 
1038
	}
1042
    dbgprintf("%s %x, %x\n",__FUNCTION__, Address, Value);
1039
 
1043
 
Line 1040... Line 1044...
1040
	return (AE_OK);
1044
	return (AE_OK);
1041
};
1045
};
Line 1058... Line 1062...
1058
AcpiOsReadMemory (
1062
AcpiOsReadMemory (
1059
    ACPI_PHYSICAL_ADDRESS   Address,
1063
    ACPI_PHYSICAL_ADDRESS   Address,
1060
    UINT32                  *Value,
1064
    UINT32                  *Value,
1061
    UINT32                  Width)
1065
    UINT32                  Width)
1062
{
1066
{
-
 
1067
    void        *memptr;
-
 
1068
    ACPI_STATUS  status = AE_ERROR;
Line -... Line 1069...
-
 
1069
 
-
 
1070
    dbgprintf("%s %x\n",__FUNCTION__, Address);
1063
 
1071
 
-
 
1072
    if( Address >= 0x400000)
-
 
1073
    {
-
 
1074
        memptr = AcpiOsMapMemory(Address, Width);
-
 
1075
 
-
 
1076
        if(memptr)
1064
	if( Address > 0x400000)
1077
        {
Line -... Line 1078...
-
 
1078
            status = AE_OK;
-
 
1079
 
-
 
1080
            switch (Width)
-
 
1081
            {
-
 
1082
                case 8:
-
 
1083
                    *Value = *(UINT8*)Address;
-
 
1084
                    break;
-
 
1085
 
-
 
1086
                case 16:
-
 
1087
                    *Value = *(UINT16*)Address;
-
 
1088
                    break;
-
 
1089
 
-
 
1090
                case 32:
-
 
1091
                    *Value = *(UINT32*)Address;
-
 
1092
                    break;
-
 
1093
 
-
 
1094
                default:
-
 
1095
                    status = (AE_BAD_PARAMETER);
-
 
1096
            }
-
 
1097
            FreeKernelSpace(memptr);
-
 
1098
        }
1065
		return (AE_BAD_PARAMETER);
1099
        return status;
1066
 
1100
    }
Line 1067... Line 1101...
1067
	else
1101
	else
1068
		Address+= 0x80000000;
1102
		Address+= 0x80000000;
1069
 
1103
 
-
 
1104
    switch (Width)
-
 
1105
    {
-
 
1106
        case 8:
1070
    switch (Width)
1107
            *Value = *(UINT8*)Address;
-
 
1108
            break;
-
 
1109
 
-
 
1110
        case 16:
1071
    {
1111
            *Value = *(UINT16*)Address;
1072
    case 8:
1112
            break;
1073
    case 16:
1113
 
Line 1074... Line 1114...
1074
    case 32:
1114
        case 32:
Line 1101... Line 1141...
1101
    ACPI_PHYSICAL_ADDRESS   Address,
1141
    ACPI_PHYSICAL_ADDRESS   Address,
1102
    UINT32                  Value,
1142
    UINT32                  Value,
1103
    UINT32                  Width)
1143
    UINT32                  Width)
1104
{
1144
{
Line -... Line 1145...
-
 
1145
 
-
 
1146
    void        *memptr;
-
 
1147
    ACPI_STATUS  status = AE_ERROR;
-
 
1148
 
-
 
1149
    dbgprintf("%s %x, %x\n",__FUNCTION__, Address, Value);
1105
 
1150
 
-
 
1151
    if( Address >= 0x400000)
-
 
1152
    {
-
 
1153
        memptr = AcpiOsMapMemory(Address, Width);
-
 
1154
 
-
 
1155
        if(memptr)
1106
	if( Address > 0x400000)
1156
        {
Line -... Line 1157...
-
 
1157
            status = AE_OK;
-
 
1158
 
-
 
1159
            switch (Width)
-
 
1160
            {
-
 
1161
                case 8:
-
 
1162
                    *(UINT8*)Address = (UINT8)Value;
-
 
1163
                    break;
-
 
1164
 
-
 
1165
                case 16:
-
 
1166
                    *(UINT16*)Address = (UINT16)Value;
-
 
1167
                    break;
-
 
1168
 
-
 
1169
                case 32:
-
 
1170
                    *(UINT32*)Address = Value;
-
 
1171
                    break;
-
 
1172
 
-
 
1173
                default:
-
 
1174
                    status = (AE_BAD_PARAMETER);
-
 
1175
            }
-
 
1176
            FreeKernelSpace(memptr);
-
 
1177
        }
1107
		return (AE_BAD_PARAMETER);
1178
        return status;
1108
 
1179
    }
Line 1109... Line 1180...
1109
	else
1180
	else
1110
		Address+= 0x80000000;
1181
		Address+= 0x80000000;
1111
 
1182
 
-
 
1183
    switch (Width)
-
 
1184
    {
-
 
1185
    case 8:
1112
    switch (Width)
1186
        *(UINT8*)Address = (UINT8)Value;
-
 
1187
        break;
-
 
1188
 
-
 
1189
    case 16:
1113
    {
1190
        *(UINT16*)Address = (UINT16)Value;
1114
    case 8:
1191
        break;
1115
    case 16:
1192
 
Line 1116... Line 1193...
1116
    case 32:
1193
    case 32: