Skip to content

Commit

Permalink
fix BAREMETAL build
Browse files Browse the repository at this point in the history
  • Loading branch information
algrant-arm committed Nov 21, 2022
1 parent c359846 commit 1b12a49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ lib:

.PHONY: demos
demos:
ifeq ($(BAREMETAL),1)
@echo "** Not building demos in BAREMETAL configuration"
else
cd ./demos && make
endif

.PHONY: experimental
experimental:
Expand Down
5 changes: 5 additions & 0 deletions source/cs_util_create_snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ static const char *get_core_name(unsigned int cpu_id)
}


#ifdef UNIX_USERSPACE
static unsigned long kernel_virtual_address(void)
{
static unsigned long addr = 0;
Expand All @@ -99,6 +100,8 @@ static unsigned long kernel_virtual_address(void)
}
return addr;
}
#endif /* UNIX_USERSPACE */


static void create_dump_ini(int index, cs_device_t device, bool zeroindex,
char *name_buf, size_t name_buf_size)
Expand Down Expand Up @@ -126,6 +129,7 @@ static void create_dump_ini(int index, cs_device_t device, bool zeroindex,
}


#ifdef UNIX_USERSPACE
/* Returns the physical base address of the "Kernel code" entry in "/proc/iomem". A return value of 1 indicates failure */
#define IOMEM_BUF_SIZE 128
static unsigned long physical_kernel_code_base_address(void)
Expand Down Expand Up @@ -160,6 +164,7 @@ static unsigned long physical_kernel_code_base_address(void)

return start;
}
#endif /* UNIX_USERSPACE */


int dump_kernel_memory(char const *fn, unsigned long start,
Expand Down

0 comments on commit 1b12a49

Please sign in to comment.