Skip to content

Commit 8c5a783

Browse files
committed
minor update
1 parent e79f905 commit 8c5a783

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

kernel/scripts/vxbin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_vma_size(elf_file):
4242
min_vma = min(min_vma, vma)
4343
max_vma = max(max_vma, end_vma)
4444
vma_size = max_vma - min_vma
45-
#print("vma={0:x}, size={1}, min_vma={2:x}, max_vma={3:x}, vma_size={4}".format(vma, size, min_vma, max_vma, vma_size))
45+
#print("vma={0:x}, size={1}, min_vma=0x{2:x}, max_vma=0x{3:x}, vma_size={4}".format(vma, size, min_vma, max_vma, vma_size))
4646

4747
return min_vma, max_vma
4848

runtime/stub/utils.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,13 @@ extern int vx_upload_kernel_bytes(vx_device_h hdevice, const void* content, uint
5454

5555
auto min_vma = *bytes++;
5656
auto max_vma = *bytes++;
57-
auto bin_size = size - 16;
57+
auto bin_size = size - 2 * 8;
5858
auto runtime_size = (max_vma - min_vma);
5959

6060
vx_buffer_h _hbuffer;
61-
#ifndef NDEBUG
6261
CHECK_ERR(vx_mem_reserve(hdevice, min_vma, runtime_size, 0, &_hbuffer), {
6362
return err;
6463
});
65-
#else
66-
CHECK_ERR(vx_mem_alloc(hdevice, runtime_size, 0, &_hbuffer), {
67-
return err;
68-
});
69-
#endif
7064

7165
// mask binary region as read-only
7266
CHECK_ERR(vx_mem_access(_hbuffer, 0, bin_size, VX_MEM_READ), {

0 commit comments

Comments
 (0)