1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
This commit is contained in:
Olivier Houchard 2005-10-20 20:30:51 +00:00
parent f9d8d64f45
commit b1e157f0e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151524

View File

@ -257,23 +257,11 @@ int
i80321_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, i80321_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
bus_space_handle_t *bshp) bus_space_handle_t *bshp)
{ {
vm_paddr_t pa, endpa;
vm_offset_t va;
uint32_t busbase;
vm_paddr_t pa, endpa, physbase;
/*
* Found the window -- PCI MEM space is not mapped by allocating
* some kernel VA space and mapping the pages with pmap_enter().
* pmap_enter() will map unmanaged pages as non-cacheable.
*/
pa = trunc_page((bpa - busbase) + physbase);
endpa = round_page(((bpa - busbase) + physbase) + size);
pa = trunc_page(bpa); pa = trunc_page(bpa);
endpa = round_page(bpa + size); endpa = round_page(bpa + size);
*bshp = va + (bpa & PAGE_MASK);
*bshp = pa;
*bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa);
return (0); return (0);