Commit 02173853 authored by Wez's avatar Wez Committed by Commit Bot

Migrate VMAR calls to temporary _old() API variants.

The VMAR syscall signatures are being updated, so migrate to the
temporarily-provided *_old() variants, in advance of the Fuchsia SDK
roll that updates the real APIs.

TBR: hpayer
Change-Id: I10da4df97b122262de04a2417bd91b921f3a63d5
Reviewed-on: https://chromium-review.googlesource.com/1194429
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55473}
parent ed42a71d
......@@ -57,8 +57,8 @@ void* OS::Allocate(void* address, size_t size, size_t alignment,
strlen(kVirtualMemoryName));
uintptr_t reservation;
uint32_t prot = GetProtectionFromMemoryPermission(access);
zx_status_t status = zx_vmar_map(zx_vmar_root_self(), 0, vmo, 0, request_size,
prot, &reservation);
zx_status_t status = zx_vmar_map_old(zx_vmar_root_self(), 0, vmo, 0,
request_size, prot, &reservation);
// Either the vmo is now referenced by the vmar, or we failed and are bailing,
// so close the vmo either way.
zx_handle_close(vmo);
......@@ -114,9 +114,9 @@ bool OS::SetPermissions(void* address, size_t size, MemoryPermission access) {
DCHECK_EQ(0, reinterpret_cast<uintptr_t>(address) % CommitPageSize());
DCHECK_EQ(0, size % CommitPageSize());
uint32_t prot = GetProtectionFromMemoryPermission(access);
return zx_vmar_protect(zx_vmar_root_self(),
reinterpret_cast<uintptr_t>(address), size,
prot) == ZX_OK;
return zx_vmar_protect_old(zx_vmar_root_self(),
reinterpret_cast<uintptr_t>(address), size,
prot) == ZX_OK;
}
// static
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment