Skip to content

Fix undefined reference to PHYS_TO_VIRT in acpi.c#26

Merged
m4rcel-lol merged 2 commits intomainfrom
copilot/add-phys-to-virt-macro
Mar 18, 2026
Merged

Fix undefined reference to PHYS_TO_VIRT in acpi.c#26
m4rcel-lol merged 2 commits intomainfrom
copilot/add-phys-to-virt-macro

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

PHYS_TO_VIRT is defined as a macro in kernel/include/mm.h but drivers/acpi/acpi.c never included it, causing three undefined-reference linker errors.

Changes

  • kernel/drivers/acpi/acpi.c: Add missing #include "../../include/mm.h" so the PHYS_TO_VIRT macro is visible at compile time.
#include "../../include/kernel.h"
+#include "../../include/mm.h"
#include "../../include/acpi.h"
#include "../../arch/x86_64/include/asm.h"

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: m4rcel-lol <187956479+m4rcel-lol@users.noreply.github.com>
Copilot AI changed the title [WIP] Add PHYS_TO_VIRT macro definition and include in acpi.c Fix undefined reference to PHYS_TO_VIRT in acpi.c Mar 18, 2026
Copilot AI requested a review from m4rcel-lol March 18, 2026 15:20
@m4rcel-lol m4rcel-lol marked this pull request as ready for review March 18, 2026 15:21
@m4rcel-lol m4rcel-lol merged commit 2dbbae3 into main Mar 18, 2026
4 checks passed
@m4rcel-lol m4rcel-lol deleted the copilot/add-phys-to-virt-macro branch March 18, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants