diff options
author | Tom Rini <trini@konsulko.com> | 2024-11-14 10:51:13 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-11-14 10:51:28 -0600 |
commit | 2b14d12067709bca97a0b7239dffd23b7c4a1ea3 (patch) | |
tree | 1d352f33bd39e4176ee4483c24618edbafee90a4 /examples/api/demo.c | |
parent | f6ee67126492f07d400d677e82467de3f8ad2bda (diff) | |
parent | 9e7d7f95ecfe0dd94b17c8dddff0e9f4934c2ad2 (diff) |
Merge patch series "examples: fix building on arm64"
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:
Commit f9886bc60f42 ("Added arm64 assembly for examples/api crt0") added
the arm64 architecture but the code does not even build.
With the changes the 'demo' program runs on qemu_arm64_defconfig using
setenv autostart no
dhcp demo
setenv autostart yes
bootelf $loadaddr
Link: https://lore.kernel.org/r/20241103053551.52715-1-heinrich.schuchardt@canonical.com
Diffstat (limited to 'examples/api/demo.c')
-rw-r--r-- | examples/api/demo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/api/demo.c b/examples/api/demo.c index 677d13b307a..9a55f76c504 100644 --- a/examples/api/demo.c +++ b/examples/api/demo.c @@ -43,12 +43,11 @@ int main(int argc, char *const argv[]) if (sig->version > API_SIG_VERSION) return -3; - printf("API signature found @%x\n", (unsigned int)sig); + printf("API signature found @%p\n", sig); test_dump_sig(sig); printf("\n*** Consumer API test ***\n"); - printf("syscall ptr 0x%08x@%08x\n", (unsigned int)syscall_ptr, - (unsigned int)&syscall_ptr); + printf("syscall ptr 0x%p@%p\n", syscall_ptr, &syscall_ptr); /* console activities */ ub_putc('B'); @@ -203,7 +202,7 @@ void test_dump_sig(struct api_signature *sig) printf("signature:\n"); printf(" version\t= %d\n", sig->version); printf(" checksum\t= 0x%08x\n", sig->checksum); - printf(" sc entry\t= 0x%08x\n", (unsigned int)sig->syscall); + printf(" sc entry\t= 0x%p\n", sig->syscall); } void test_dump_si(struct sys_info *si) @@ -296,7 +295,7 @@ void test_dump_di(int handle) struct device_info *di = ub_dev_get(handle); printf("device info (%d):\n", handle); - printf(" cookie\t= 0x%08x\n", (uint32_t)di->cookie); + printf(" cookie\t= 0x%p\n", di->cookie); printf(" type\t\t= 0x%08x\n", di->type); if (di->type == DEV_TYP_NET) { |