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: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh 2023-09-08 13:47:18 -07:00
parent c519d1dde2
commit bbc4bc54f2

View file

@ -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,