Skip to content
Merged
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
11 changes: 0 additions & 11 deletions src/a2a3/platform/include/aicpu/platform_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ void set_platform_pmu_reg_addrs(uint64_t pmu_regs);
*/
uint64_t get_platform_pmu_reg_addrs();

/**
* Set the ACL device ordinal. Latched once per device by simpler_aicpu_init
* (from InitArgs.device_id) into this resident-SO global; the executor reads it
* to make the staged orchestration SO filename unique per device so paired dies
* sharing the preinstall filesystem never collide.
*/
void set_orch_device_id(int device_id);

/** Get the ACL device ordinal set for the current run (0 if unset). */
int get_orch_device_id();

#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 0 additions & 5 deletions src/a2a3/platform/shared/aicpu/platform_regs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

static uint64_t g_platform_regs = 0;
static uint64_t g_platform_pmu_reg_addrs = 0;
static int g_orch_device_id = 0;

void set_platform_regs(uint64_t regs) { g_platform_regs = regs; }

Expand All @@ -47,10 +46,6 @@ void set_platform_pmu_reg_addrs(uint64_t pmu_regs) { g_platform_pmu_reg_addrs =

uint64_t get_platform_pmu_reg_addrs() { return g_platform_pmu_reg_addrs; }

void set_orch_device_id(int device_id) { g_orch_device_id = device_id; }

int get_orch_device_id() { return g_orch_device_id; }

volatile uint32_t *get_reg_ptr(uint64_t reg_base_addr, RegId reg) {
return reinterpret_cast<volatile uint32_t *>(reg_base_addr + reg_offset(reg));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "common/unified_log.h"

// Register-based communication
#include "aicpu/aicpu_device_config.h"
#include "aicpu/platform_aicpu_affinity.h"
#include "aicpu/platform_regs.h"
#include "common/platform_config.h"
Expand Down
11 changes: 0 additions & 11 deletions src/a5/platform/include/aicpu/platform_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ void set_platform_regs(uint64_t regs);
*/
uint64_t get_platform_regs();

/**
* Set the ACL device ordinal. Latched once per device by simpler_aicpu_init
* (from InitArgs.device_id) into this resident-SO global; the executor reads it
* to make the staged orchestration SO filename unique per device so paired dies
* sharing the preinstall filesystem never collide.
*/
void set_orch_device_id(int device_id);

/** Get the ACL device ordinal set for the current run (0 if unset). */
int get_orch_device_id();

#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 0 additions & 5 deletions src/a5/platform/shared/aicpu/platform_regs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@
#include "spin_hint.h"

static uint64_t g_platform_regs = 0;
static int g_orch_device_id = 0;

void set_platform_regs(uint64_t regs) { g_platform_regs = regs; }

uint64_t get_platform_regs() { return g_platform_regs; }

void set_orch_device_id(int device_id) { g_orch_device_id = device_id; }

int get_orch_device_id() { return g_orch_device_id; }

void platform_init_aicore_regs(uint64_t reg_addr) {
// Initialize task dispatch register to idle state
write_reg(reg_addr, RegId::DATA_MAIN_BASE, AICPU_IDLE_TASK_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "common/unified_log.h"

// Register-based communication
#include "aicpu/aicpu_device_config.h"
#include "aicpu/platform_regs.h"
#include "common/platform_config.h"

Expand Down
11 changes: 11 additions & 0 deletions src/common/platform/include/aicpu/aicpu_device_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
extern "C" {
#endif

/**
* Set the ACL device ordinal. Latched once per device by simpler_aicpu_init
* (from InitArgs.device_id) into this resident-SO global; the AICPU executor
* reads it to make the staged orchestration SO filename unique per device so
* paired dies sharing the preinstall filesystem never collide.
*/
void set_orch_device_id(int device_id);

/** Get the ACL device ordinal set for the current run (0 if unset). */
int get_orch_device_id();

/**
* Set the AICPU scheduler no-progress watchdog timeout (ms). Latched once per
* device by simpler_aicpu_init (from InitArgs.scheduler_timeout_ms); read by
Expand Down
7 changes: 6 additions & 1 deletion src/common/platform/shared/aicpu/aicpu_device_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
#include "aicpu/aicpu_device_config.h"

namespace {
// Latched once per device by simpler_aicpu_init; survives every per-task launch
// Latched once per device by simpler_aicpu_init; survive every per-task launch
// because the AICPU inner SO stays dlopen'd for the runner's life.
int g_orch_device_id = 0;
int g_scheduler_timeout_ms = 0;
} // namespace

void set_orch_device_id(int device_id) { g_orch_device_id = device_id; }

int get_orch_device_id() { return g_orch_device_id; }

void set_scheduler_timeout_ms(int timeout_ms) { g_scheduler_timeout_ms = timeout_ms; }

int get_scheduler_timeout_ms() { return g_scheduler_timeout_ms; }