usb: map registers or allocate area for the kernel only.

This commit is contained in:
Jérôme Duval 2018-01-14 21:33:38 +01:00
parent ce029df2d8
commit 05a859ebd7
4 changed files with 5 additions and 4 deletions

View File

@ -77,7 +77,8 @@ PhysicalMemoryAllocator::PhysicalMemoryAllocator(const char *name,
roundedSize = (roundedSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1);
fArea = create_area(fName, &fLogicalBase, B_ANY_KERNEL_ADDRESS,
roundedSize, B_32_BIT_CONTIGUOUS, B_READ_AREA | B_WRITE_AREA);
roundedSize, B_32_BIT_CONTIGUOUS,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA);
if (fArea < B_OK) {
TRACE_ERROR(("PMA: failed to create memory area\n"));
return;

View File

@ -225,7 +225,7 @@ EHCI::EHCI(pci_info *info, Stack *stack)
fRegisterArea = map_physical_memory("EHCI memory mapped registers",
physicalAddress, mapSize, B_ANY_KERNEL_BLOCK_ADDRESS,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_READ_AREA | B_WRITE_AREA,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA,
(void **)&fCapabilityRegisters);
if (fRegisterArea < 0) {
TRACE_ERROR("failed to map register memory\n");

View File

@ -108,7 +108,7 @@ OHCI::OHCI(pci_info *info, Stack *stack)
TRACE_ALWAYS("iospace offset: 0x%" B_PRIx32 "\n", offset);
fRegisterArea = map_physical_memory("OHCI memory mapped registers",
offset, B_PAGE_SIZE, B_ANY_KERNEL_BLOCK_ADDRESS,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_READ_AREA | B_WRITE_AREA,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA,
(void **)&fOperationalRegisters);
if (fRegisterArea < B_OK) {
TRACE_ERROR("failed to map register memory\n");

View File

@ -173,7 +173,7 @@ XHCI::XHCI(pci_info *info, Stack *stack)
fRegisterArea = map_physical_memory("XHCI memory mapped registers",
physicalAddressAligned, mapSize, B_ANY_KERNEL_BLOCK_ADDRESS,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_READ_AREA | B_WRITE_AREA,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA,
(void **)&fCapabilityRegisters);
if (fRegisterArea < B_OK) {
TRACE("failed to map register memory\n");