Print out bytes after we read them
This commit is contained in:
@@ -89,7 +89,7 @@ int main(void)
|
|||||||
|
|
||||||
|
|
||||||
printf("Allocating 1024 bytes as destination\n");
|
printf("Allocating 1024 bytes as destination\n");
|
||||||
uint32_t* dst = (uint32_t*)malloc(1024);
|
char* dst = (char*)malloc(1024);
|
||||||
printf("Virtual address: %p\n", dst);
|
printf("Virtual address: %p\n", dst);
|
||||||
uintptr_t dst_phys;
|
uintptr_t dst_phys;
|
||||||
virt_to_phys_user(&dst_phys, (uintptr_t)dst);
|
virt_to_phys_user(&dst_phys, (uintptr_t)dst);
|
||||||
@@ -136,6 +136,7 @@ int main(void)
|
|||||||
printf("%d\n", pcie_base[12]);
|
printf("%d\n", pcie_base[12]);
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
|
|
||||||
printf("%x\n", dst[0]);
|
printf("strlen(dst)=%d\n", strlen(dst));
|
||||||
|
printf("%s\n", dst);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user