Skip to content

Commit 5ccefc2

Browse files
committed
refactor: clean repo focus on RDNA3 GPU driver, sanitize sensitive data, add LICENSE and CI
1 parent 228d789 commit 5ccefc2

369 files changed

Lines changed: 465 additions & 85552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y clang make
21+
22+
- name: Build and run unit tests
23+
run: |
24+
make test CXX=clang++

‎.gitignore‎

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
# Temp / Agent artifacts
2-
.omo/
3-
.slim/
4-
.current_notepad
5-
.DS_Store
6-
._*
1+
# Build outputs and compilation artifacts
2+
build/
3+
dist/
74
*.o
85
*.dylib
96
*.bin
10-
build/
11-
dist/
12-
__pycache__/
7+
*.kext/
8+
*.bundle/
9+
*.dSYM/
1310
*.pyc
11+
__pycache__/
12+
13+
# macOS and OS metadata
14+
.DS_Store
15+
._*
16+
17+
# Editor, IDE and local agent metadata
18+
.vscode/
19+
.idea/
20+
.omo/
21+
.slim/
22+
memory/
23+
.current_notepad
24+
25+
# Reference dumps and vendor assets if downloaded locally
1426
reference/
15-
tests/test_*

‎.ignore‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎LICENSE‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licenses & Attribution
2+
3+
This repository contains code with different open-source and noncommercial licenses depending on the component.
4+
5+
---
6+
7+
## 1. Core Kernel Driver & Utilities (`PhxBringup.kext`, `phxctl`)
8+
9+
The core silicon bringup driver (`PhxBringup.kext`), registers, IP discovery, and command submission logic are licensed under the **GNU General Public License v2.0** (GPL-2.0-only) or MIT License, compatible with the upstream Linux `amdgpu` driver components they interface with.
10+
11+
Copyright (c) 2026 luuumi-dev and contributors.
12+
13+
---
14+
15+
## 2. Accelerator & Display Controller (`PhxAccel` / `src/phxaccel`)
16+
17+
The `PhxAccel` kernel extension, framebuffer interface (`PhxAMDFB`), display timing controller (`PhxAGDC`), and `NVMTLDriver` window server patches are derived from NullMoth's driver architecture and are licensed under the **PolyForm Noncommercial License 1.0.0**.
18+
19+
**Required Notice:**
20+
```
21+
NullMoth NVIDIA driver for macOS
22+
Copyright (c) 2026 NullMoth Systems.
23+
SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
24+
```
25+
26+
> **Commercial Use Prohibited:** Under the terms of the PolyForm Noncommercial License 1.0.0, you may not use this software for any commercial purpose (any purpose intended for or directed towards commercial advantage or monetary compensation).
27+
28+
Full text of the PolyForm Noncommercial License 1.0.0:
29+
https://polyformproject.org/licenses/noncommercial/1.0.0/
30+
31+
---
32+
33+
## 3. Mesa RADV Patches (`mesa-patches-phoenix`)
34+
35+
All patches to the Mesa 3-D Graphics Library (`mesa-patches-phoenix`) remain licensed under the original **MIT License**:
36+
37+
```
38+
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
39+
Copyright (c) 2026 Mesa / RADV contributors.
40+
41+
Permission is hereby granted, free of charge, to any person obtaining a
42+
copy of this software and associated documentation files (the "Software"),
43+
to deal in the Software without restriction, including without limitation
44+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
45+
and/or sell copies of the Software, and to permit persons to whom the
46+
Software is furnished to do so, subject to the following conditions:
47+
48+
The above copyright notice and this permission notice shall be included
49+
in all copies or substantial portions of the Software.
50+
51+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
52+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
54+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
56+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
57+
DEALINGS IN THE SOFTWARE.
58+
```

‎Makefile‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Makefile for AMD RDNA 3 (Radeon 780M) macOS Driver Project
2+
3+
CXX ?= clang++
4+
CXXFLAGS ?= -std=c++17 -Wall -Wextra -Werror -O2
5+
INCLUDES = -Isrc -Isrc/amd -Isrc/uapi -Isrc/winsys
6+
7+
TEST_BIN_DIR = build/tests
8+
TESTS = $(TEST_BIN_DIR)/test_rdna3_discovery_uma \
9+
$(TEST_BIN_DIR)/test_rdna3_ip_dcn \
10+
$(TEST_BIN_DIR)/test_rdna3_ucode \
11+
$(TEST_BIN_DIR)/test_r3n_abi
12+
13+
.PHONY: all test clean kext
14+
15+
all: test
16+
17+
$(TEST_BIN_DIR):
18+
mkdir -p $(TEST_BIN_DIR)
19+
20+
$(TEST_BIN_DIR)/test_rdna3_discovery_uma: src/amd/rdna3_ip_discovery.cpp src/amd/rdna3_rebar_uma.cpp tests/test_rdna3_discovery_uma.cpp | $(TEST_BIN_DIR)
21+
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@
22+
23+
$(TEST_BIN_DIR)/test_rdna3_ip_dcn: src/amd/rdna3_ip_blocks.cpp src/amd/rdna3_dcn314_scanout.cpp src/amd/rdna3_rebar_uma.cpp tests/test_rdna3_ip_dcn.cpp | $(TEST_BIN_DIR)
24+
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@
25+
26+
$(TEST_BIN_DIR)/test_rdna3_ucode: src/amd/rdna3_ucode_extract.cpp tests/test_rdna3_ucode.cpp | $(TEST_BIN_DIR)
27+
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@
28+
29+
$(TEST_BIN_DIR)/test_r3n_abi: src/uapi/r3n_user_client.cpp src/winsys/radv_r3n_winsys.cpp tests/test_r3n_abi.cpp | $(TEST_BIN_DIR)
30+
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ -o $@
31+
32+
test: $(TESTS)
33+
@echo "=== Running RDNA 3 Driver Unit Tests ==="
34+
@for t in $(TESTS); do \
35+
echo "Running $$t..."; \
36+
$$t || exit 1; \
37+
done
38+
@echo "All unit tests passed successfully!"
39+
40+
kext:
41+
@echo "Building PhxBringup.kext..."
42+
python3 tools/build_kext.py
43+
44+
clean:
45+
rm -rf build/

0 commit comments

Comments
 (0)