Commit fd3f80f1 authored by Adam Barth's avatar Adam Barth Committed by Commit Bot

[base][fuchsia] Migrate to new VMAR methods

These methods are the same as before. They just take their arguments in
a different order, which now matches the C syscalls.

Change-Id: I864b4593adbab59ec636f65b26ea463a11f45e3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2458784
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814915}
parent 0f6a46e6
......@@ -107,8 +107,8 @@ void* SystemAllocPagesInternal(void* hint,
uint64_t address;
status =
zx::vmar::root_self()->map(vmar_offset, vmo,
/*vmo_offset=*/0, length, options, &address);
zx::vmar::root_self()->map(options, vmar_offset, vmo,
/*vmo_offset=*/0, length, &address);
if (status != ZX_OK) {
// map() is expected to fail if |hint| is set to an already-in-use location.
if (!hint) {
......@@ -151,9 +151,9 @@ bool TrySetSystemPagesAccessInternal(
void* address,
size_t length,
PageAccessibilityConfiguration accessibility) {
zx_status_t status = zx::vmar::root_self()->protect(
reinterpret_cast<uint64_t>(address), length,
PageAccessibilityToZxVmOptions(accessibility));
zx_status_t status = zx::vmar::root_self()->protect2(
PageAccessibilityToZxVmOptions(accessibility),
reinterpret_cast<uint64_t>(address), length);
return status == ZX_OK;
}
......@@ -161,9 +161,9 @@ void SetSystemPagesAccessInternal(
void* address,
size_t length,
PageAccessibilityConfiguration accessibility) {
zx_status_t status = zx::vmar::root_self()->protect(
reinterpret_cast<uint64_t>(address), length,
PageAccessibilityToZxVmOptions(accessibility));
zx_status_t status = zx::vmar::root_self()->protect2(
PageAccessibilityToZxVmOptions(accessibility),
reinterpret_cast<uint64_t>(address), length);
ZX_CHECK(status == ZX_OK, status);
}
......
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