-
Notifications
You must be signed in to change notification settings - Fork 26
mmap/munmap EL1 fastpath #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,33 @@ | ||
| # EL1 kernel shim assembly pipeline | ||
| # EL1 kernel shim pipeline | ||
| # | ||
| # shim.S -> shim.o -> shim.bin -> shim_blob.h (C byte array) | ||
| # shim.S + freestanding shim-mmap.c -> shim.o -> shim.bin -> shim_blob.h | ||
|
|
||
| $(BUILD_DIR)/shim.o: src/core/shim.S | $(BUILD_DIR) | ||
| # Disable RCpc codegen so acquire loads remain cumulative LDARs. The retire | ||
| # snapshot rule carries cross-vCPU causality through different atomic words; | ||
| # LDAPR is intentionally too weak for that protocol. | ||
| SHIM_CFLAGS := -O2 -Wall -Wextra -Wpedantic -Wshadow \ | ||
| -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 \ | ||
| -Wimplicit-fallthrough -Wundef -Wnull-dereference \ | ||
| -Wno-unused-parameter -ffreestanding -fno-builtin \ | ||
| -fno-stack-protector -fno-unwind-tables \ | ||
| -fno-asynchronous-unwind-tables -mno-outline-atomics \ | ||
| -Xclang -target-feature -Xclang -rcpc | ||
| SHIM_LD ?= ld | ||
|
|
||
| $(BUILD_DIR)/shim-asm.o: src/core/shim.S | $(BUILD_DIR) | ||
| @echo " AS $<" | ||
| $(Q)$(SHIM_AS) $(SHIM_ASFLAGS) -o $@ $< | ||
|
|
||
| $(BUILD_DIR)/shim-mmap.o: src/core/shim-mmap.c src/core/shim-mmap.h \ | ||
| src/core/mmap-fastpath.h src/core/shim-globals.h | $(BUILD_DIR) | ||
| @echo " CC $<" | ||
| $(Q)$(CC) $(SHIM_CFLAGS) -MMD -MP -MF $(BUILD_DIR)/shim-mmap.d \ | ||
| -Isrc -c -o $@ $< | ||
|
|
||
| $(BUILD_DIR)/shim.o: $(BUILD_DIR)/shim-asm.o $(BUILD_DIR)/shim-mmap.o | ||
| @echo " LD $@" | ||
| $(Q)$(SHIM_LD) -static -arch arm64 -e _start -o $@ $^ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: With the documented default Prompt for AI agents |
||
|
|
||
| $(BUILD_DIR)/shim.bin: $(BUILD_DIR)/shim.o | ||
| @echo " OBJCOPY $@" | ||
| $(Q)$(OBJCOPY) -O binary $< $@ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: When
GUEST_TEST_BINARIESis set, the surroundingifndefskips these additions.make test-mmap-lazyandmake test-mmap-fastpaththen fail with no rule instead of running the supplied binaries. Move the phony runners outside the guard and use$(TEST_DIR)/...; keep only local compile rules conditional.Prompt for AI agents