interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / native / linux / aien-gpu / Makefile

37 lines · 1978 bytes Raw Blame History
1# aien-gpu: the Linux host shim for our own GB10 GPU driver (L332 rung 2). Build only; loading it is a
2# coordinator-scheduled window step (docs/GPU_DRIVER.md, evidence/own-gpu-driver/rung2/RUNBOOK.md).
3# make the module (needs /lib/modules/$(uname -r)/build)
4# make tools aien_gpu_check and aien_gsp_boot (user space; the start-up tool links the AGPL driver core)
5# make sim-test aien_gsp_boot built against the simulated SEC2 + GSP, plain and sanitized, then
6# evidence/own-gpu-driver/rung2/window1_sim_test.sh on both
7KDIR ?= /lib/modules/$(shell uname -r)/build
8CORE := $(CURDIR)/../../kernel
9OUT ?= $(CURDIR)/build
10CC ?= cc
11TCFLAGS := -std=c11 -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE -O2 -g -Wall -Wextra -Werror \
12 -I$(CORE)/gpu -I$(CORE)/dev -I$(CURDIR)
13BOOT_SRCS := aien_gsp_boot.c $(CORE)/gpu/gsp_mmio.c $(CORE)/gpu/gsp_seq.c $(CORE)/dev/gb10_gsp_boot.c
14SIM_TEST := $(CURDIR)/../../../evidence/own-gpu-driver/rung2/window1_sim_test.sh
15all:
16 $(MAKE) -C $(KDIR) M=$(CURDIR) modules
17tools: $(OUT)/aien_gpu_check $(OUT)/aien_gsp_boot
18$(OUT)/aien_gpu_check: aien_gpu_check.c aien_gpu_uapi.h
19 @mkdir -p $(OUT)
20 $(CC) $(TCFLAGS) -o $@ aien_gpu_check.c
21$(OUT)/aien_gsp_boot: $(BOOT_SRCS) aien_gpu_uapi.h
22 @mkdir -p $(OUT)
23 $(CC) $(TCFLAGS) -o $@ $(BOOT_SRCS)
24$(OUT)/aien_gsp_boot_sim: $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c
25 @mkdir -p $(OUT)
26 $(CC) $(TCFLAGS) -DAIEN_GSP_BOOT_SIM -o $@ $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c
27$(OUT)/aien_gsp_boot_sim_san: $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c
28 @mkdir -p $(OUT)
29 $(CC) $(TCFLAGS) -O1 -fsanitize=address,undefined -fno-sanitize-recover=all -DAIEN_GSP_BOOT_SIM -o $@ \
30 $(BOOT_SRCS) $(CORE)/gpu/gsp_sim.c
31sim-test: $(OUT)/aien_gsp_boot_sim $(OUT)/aien_gsp_boot_sim_san
32 bash $(SIM_TEST) $(OUT)/aien_gsp_boot_sim $(CURDIR)/aien_gpu.c
33 bash $(SIM_TEST) $(OUT)/aien_gsp_boot_sim_san $(CURDIR)/aien_gpu.c
34clean:
35 $(MAKE) -C $(KDIR) M=$(CURDIR) clean
36 rm -rf $(OUT)
37.PHONY: all tools sim-test clean