Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbc4bc54 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

keymaster: Remove usage of PAGE_SIZE



bionic provides PAGE_SIZE macro which happens to also match the
size keymaster send buffer (4096) and half the size of the recv
buffer.

PAGE_SIZE is being removed as no other libc provides this and
Android is moving towards being page-size-agnostic.

Use a 4096 constant instead.

Test: Boot 16k device
Bug: 294914413
Change-Id:  I2dc10b48811e24d25ba08cfe4ffb514e94d42a8f
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent c519d1dd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@

__BEGIN_DECLS

const uint32_t TRUSTY_KEYMASTER_RECV_BUF_SIZE = 2 * PAGE_SIZE;
const uint32_t TRUSTY_KEYMASTER_RECV_BUF_SIZE = 2 * 4096;
const uint32_t TRUSTY_KEYMASTER_SEND_BUF_SIZE =
        (PAGE_SIZE - sizeof(struct keymaster_message) - 16 /* tipc header */);
        (4096 - sizeof(struct keymaster_message) - 16 /* tipc header */);

int trusty_keymaster_connect(void);
int trusty_keymaster_call(uint32_t cmd, void* in, uint32_t in_size, uint8_t* out,