Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions benchmark/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ struct bench *b;

static inline uint64_t read_cycle_count()
{
uint64_t cycle_count;
uint64_t cycle_count = 0;
#if defined(CONFIG_ARCH_ARM)
SEL4BENCH_READ_CCNT(cycle_count);
#elif defined(CONFIG_ARCH_RISCV)
asm volatile("rdcycle %0" : "=r"(cycle_count));
#elif defined(CONFIG_ARCH_X86_64)
// Do nothing only for build atm
uint32_t lo, hi, unused;
__asm__ __volatile__("rdtscp" : "=a"(lo), "=d"(hi), "=c"(unused));
__asm__ __volatile__("lfence" ::: "memory");
cycle_count = ((uint64_t)hi << 32) | lo;
Comment on lines +29 to +32

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works for just measuring CPU utilisation, it is kind of sus because the TSC frequency is != to the CPU frequency. You should use the PMU counter for this kind of job. Given that the ARM and RISC-V already uses the proper cycle counter.

#else
#error "read_cycle_count: unsupported architecture"
#endif
Expand Down
4 changes: 4 additions & 0 deletions ci/examples/echo_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ async def test(backend: HardwareBackend, test_config: common.TestConfig):
# See https://github.com/au-ts/sddf/issues/698 for details
timeout = 30

if test_config.board.startswith("vb_105"):
# This x86 machine takes around 3 mintues to boot
timeout = 200

Comment on lines +50 to +53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The boot timeout is separate from the test timeout, this shouldn't be here, see https://github.com/au-ts/systems-ci/blob/f1127dfb4c47d0c5bc3512d3678b3434c3835c34/ts_ci/backends/machine_queue.py#L19

So this block should be removed

async with asyncio.timeout(timeout):
await wait_for_output(backend, b"DHCP request finished")
dhcp_client1 = await wait_for_output(backend, b"\r\n")
Expand Down
28 changes: 28 additions & 0 deletions drivers/network/ixgbe/eth_driver.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright 2026, UNSW
#
# SPDX-License-Identifier: BSD-2-Clause
#
# Include this snippet in your project Makefile to build
# the IXGBE NIC driver
#
# NOTES
# Generates eth_driver.elf (alternative unique name eth_driver_ixgbe.elf)
# Expects libsddf_util_debug.a to be in LIBS

ETHERNET_DRIVER_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
CHECK_NETDRV_FLAGS_MD5:=.netdrv_cflags-$(shell echo -- ${CFLAGS} ${CFLAGS_network} | shasum | sed 's/ *-//')

${CHECK_NETDRV_FLAGS_MD5}:
-rm -f .netdrv_cflags-*
touch $@

eth_driver_ixgbe.elf: network/ixgbe/ethernet.o
$(LD) $(LDFLAGS) $< $(LIBS) -o $@

network/ixgbe/ethernet.o: ${ETHERNET_DRIVER_DIR}/ethernet.c ${CHECK_NETDRV_FLAGS_MD5}
mkdir -p network/ixgbe
${CC} -c ${CFLAGS} ${CFLAGS_network} -I ${ETHERNET_DRIVER_DIR} -o $@ $<


-include ixgbe/ethernet.d
Loading
Loading