Deleted Added
sdiff udiff text old ( 193529 ) new ( 199337 )
full compact
1
2/******************************************************************************
3 *
4 * Module Name: exregion - ACPI default OpRegion (address space) handlers
5 *
6 *****************************************************************************/
7
8/******************************************************************************

--- 143 unchanged lines hidden (view full) ---

152 ACPI_INTEGER *Value,
153 void *HandlerContext,
154 void *RegionContext)
155{
156 ACPI_STATUS Status = AE_OK;
157 void *LogicalAddrPtr = NULL;
158 ACPI_MEM_SPACE_CONTEXT *MemInfo = RegionContext;
159 UINT32 Length;
160 ACPI_SIZE WindowSize;
161#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
162 UINT32 Remainder;
163#endif
164
165
166 ACPI_FUNCTION_TRACE (ExSystemMemorySpaceHandler);
167
168

--- 53 unchanged lines hidden (view full) ---

222 {
223 /* Valid mapping, delete it */
224
225 AcpiOsUnmapMemory (MemInfo->MappedLogicalAddress,
226 MemInfo->MappedLength);
227 }
228
229 /*
230 * Don't attempt to map memory beyond the end of the region, and
231 * constrain the maximum mapping size to something reasonable.
232 */
233 WindowSize = (ACPI_SIZE)
234 ((MemInfo->Address + MemInfo->Length) - Address);
235
236 if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE)
237 {
238 WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE;
239 }
240
241 /* Create a new mapping starting at the address given */
242
243 MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
244 (ACPI_PHYSICAL_ADDRESS) Address, WindowSize);
245 if (!MemInfo->MappedLogicalAddress)
246 {
247 ACPI_ERROR ((AE_INFO,
248 "Could not map memory at %8.8X%8.8X, size %X",
249 ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) WindowSize));
250 MemInfo->MappedLength = 0;
251 return_ACPI_STATUS (AE_NO_MEMORY);
252 }
253
254 /* Save the physical address and mapping size */
255
256 MemInfo->MappedPhysicalAddress = Address;
257 MemInfo->MappedLength = WindowSize;
258 }
259
260 /*
261 * Generate a logical pointer corresponding to the address we want to
262 * access
263 */
264 LogicalAddrPtr = MemInfo->MappedLogicalAddress +
265 ((ACPI_INTEGER) Address - (ACPI_INTEGER) MemInfo->MappedPhysicalAddress);

--- 345 unchanged lines hidden ---