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
18 changes: 9 additions & 9 deletions uefi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ OBJS += core_loader.o

include acpi/Makefile

OBJS += hooks/hooks_loader.o
OBJS += hooks/loaders/get_memory_map.o
OBJS += hooks/loaders/set_variable.o
OBJS += hooks/loaders/virtual_address_map_event.o
OBJS += services/hooks_loader.o
OBJS += services/loaders/get_memory_map.o
OBJS += services/loaders/set_variable.o
OBJS += services/loaders/virtual_address_map_event.o

# Shipped core binary
OBJS += core.o
Expand All @@ -47,17 +47,17 @@ OBJS += $(addprefix shared/,$(SHARED_OBJS))

OBJS := $(addprefix obj/,$(OBJS))

hooks/raw/build/hooks.o:
services/hooks/build/hooks.o:
@mkdir -p $(@D)
$(MAKE) -C hooks/raw
$(MAKE) -C services/hooks

.PHONY: hooks/raw/build/hooks.o
.PHONY: services/hooks/build/hooks.o

obj/%.o: %.c
mkdir -p $(dir $@)
$(CC) -c $< -o $@ $(CFLAGS)

obj/app.so: $(OBJS) $(GNU_EFI)/x86_64/gnuefi/crt0-efi-x86_64.o hooks/raw/build/hooks.o
obj/app.so: $(OBJS) $(GNU_EFI)/x86_64/gnuefi/crt0-efi-x86_64.o services/hooks/build/hooks.o
mkdir -p $(dir $@)
$(LD) $(LDFLAGS) $^ -o $@ -lgnuefi -lefi

Expand All @@ -69,7 +69,7 @@ all: build/app.efi
.DEFAULT_GOAL := all

clean:
$(MAKE) -C hooks/raw clean
$(MAKE) -C services/hooks clean
rm -rf obj/*
rm -rf build/*

Expand Down
2 changes: 1 addition & 1 deletion uefi/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "acpi/tables.h"
#include "core_header_utils.h"
#include "core_loader.h"
#include "hooks/hooks_loader.h"
#include "services/hooks_loader.h"

EFI_STATUS
efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE* SystemTable) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion uefi/hooks/hooks_loader.h → uefi/services/hooks_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void free_hook(struct loaded_hook* loaded_hook, size_t hook_size);

/**
* Place hooks on the required UEFI runtime and boot services, and register any additional events that are required.
* See the `loaders` and `raw` directories for a list of all hooks.
* See the `loaders` and `hooks` directories for a list of all hooks.
*/
err_t hook_services(void);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <stdint.h>

#include "acpi/tables.h"
#include "hooks/headers.h"
#include "hooks/hooks_loader.h"
#include "services/headers.h"
#include "services/hooks_loader.h"

DECLARE_HOOK_BINARY(get_memory_map);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <stdint.h>

#include "acpi/tables.h"
#include "hooks/headers.h"
#include "hooks/hooks_loader.h"
#include "services/headers.h"
#include "services/hooks_loader.h"

DECLARE_HOOK_BINARY(set_variable);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <stdint.h>

#include "get_memory_map.h"
#include "hooks/headers.h"
#include "hooks/hooks_loader.h"
#include "services/headers.h"
#include "services/hooks_loader.h"
#include "set_variable.h"

#define EFI_EVENT_VIRTUAL_ADDRESS_CHANGE_GUID \
Expand Down
File renamed without changes.