* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Intel Corporation. All rights reserved. * \brief PCI consistent, DMA-accessible memory functions. * \author Eric Anholt <anholt@FreeBSD.org> * Copyright 2003 Eric Anholt. * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /**********************************************************************/ * During AGP mapping initialization, we map AGP aperture * into kernel space. So, when we access the memory which * managed by agp gart in kernel space, we have to go * through two-level address translation: kernel virtual * address --> aperture address --> physical address. For * improving this, here in opensourced code, agp_remap() * gets invoking to dispose the mapping between agp aperture * and kernel space, and directly map the actual physical * memory which is allocated to agp gart to kernel space. * After that, access to physical memory managed by agp gart * hardware in kernel space doesn't go through agp hardware, * it will be: kernel virtual ---> physical address. * Obviously, it is more efficient. But in Solaris operating * system, the ioctl AGPIOC_ALLOCATE of agpgart driver does * not return physical address. We are unable to create the * direct mapping between kernel space and agp memory. So, * we remove the calling to agp_remap(). DRM_DEBUG(
"drm_core_ioremap: skipping agp_remap\n");
* Refer to the comments in drm_core_ioremap() where we removed * the calling to agp_remap(), correspondingly, we remove the * calling to agp_remap_free(dev, map); DRM_DEBUG(
"drm_core_ioremap: skipping agp_remap_free\n");
0xffffffff,
/* addr_hi */ 0xffffffff,
/* count_max */ 0xffffffff,
/* maxxfer */ /* allocate continous physical memory for hw status page */ DRM_ERROR(
"ddi_dma_addr_bind_handle() failed");
DRM_ERROR(
"do_get_pci_res: ddi_getlongprop failed!\n");
DRM_ERROR(
"drm_get_resource_start: ioctl failed");
DRM_ERROR(
"drm_get_resource_len: ioctl failed");