s3: fixes for SMAP.

untested.

Change-Id: Icbb3ddf8c0f840fae0e2107ca211728036ba8aa7
Reviewed-on: https://review.haiku-os.org/510
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
Jérôme Duval 2018-09-04 15:31:10 +02:00 committed by Alexander von Gluck IV
parent 89780a095e
commit 0ff73852d1

View File

@ -245,7 +245,7 @@ MapDevice(DeviceInfo& di)
si.regsArea = map_physical_memory(areaName, regsBase, regAreaSize,
B_ANY_KERNEL_ADDRESS,
0, // neither read nor write, to hide it from user space apps
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA,
(void**)(&(di.regs)));
if (si.regsArea < 0)
@ -411,7 +411,8 @@ InitDevice(DeviceInfo& di)
di.sharedArea = create_area(sharedName, (void**) &(di.sharedInfo),
B_ANY_KERNEL_ADDRESS,
((sizeof(SharedInfo) + (B_PAGE_SIZE - 1)) & ~(B_PAGE_SIZE - 1)),
B_FULL_LOCK, 0);
B_FULL_LOCK,
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA);
if (di.sharedArea < 0)
return di.sharedArea; // return error code