Skip to content

Commit

Permalink
Moved aep.c and aep.h to sdk/gramine/
Browse files Browse the repository at this point in the history
  • Loading branch information
Anja Rabich committed Mar 2, 2023
1 parent 1e47ed1 commit 39816a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
11 changes: 6 additions & 5 deletions libsgxstep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ ifeq ($(M32), 1)
CFLAGS += -m32 -DM32=1
endif

ifeq ($(GRAMINE), 1)
CFLAGS += -DSGX_SSAFRAMESIZE=16384
endif

SOURCES = $(shell ls *.c)
ASM = $(shell ls *.S)
OBJECTS = $(SOURCES:.c=.o) $(ASM:.S=.o)
OUTPUT = libsgx-step.a

ifeq ($(GRAMINE), 1)
CFLAGS += -DSGX_SSAFRAMESIZE=16384
SOURCES += ./../sdk/gramine/aep.c
endif

all: $(OUTPUT)

$(OUTPUT): $(OBJECTS)
Expand All @@ -35,7 +36,7 @@ $(OUTPUT): $(OBJECTS)

%.o : %.c
echo "$(INDENT)[CC] " $<
$(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -c $<
$(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -c $< -o $@

%.o : %.S
echo "$(INDENT)[AS] " $<
Expand Down
22 changes: 11 additions & 11 deletions libsgxstep/aep.c → sdk/gramine/aep.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include "apic.h"
#include "pt.h"
#include "debug.h"
#include "enclave.h"
#include "sched.h"
#include "config.h"
#include "idt.h"
#include "cpu.h"
#include "gdt.h"
#include "../../libsgxstep/apic.h"
#include "../../libsgxstep/pt.h"
#include "../../libsgxstep/debug.h"
#include "../../libsgxstep/enclave.h"
#include "../../libsgxstep/sched.h"
#include "../../libsgxstep/config.h"
#include "../../libsgxstep/idt.h"
#include "../../libsgxstep/cpu.h"
#include "../../libsgxstep/gdt.h"
#include "aep.h"


Expand All @@ -30,12 +30,12 @@ const uint64_t main_end_offset = 0x116e;
* binary with Gramine in DEBUG mode. Note that ASLR must be turned off in the manifest for
* the addresses to remain constant.
*/
const uint64_t libos = 0xfd2b000;
const uint64_t libos = 0xf963000;
/*
* This is the address in the enclave where the binary starts. Gramine will also tell you this
* offset in DEBUG mode.
*/
const uint64_t bin_offset = 0xfc84000;
const uint64_t bin_offset = 0xb9ee000;

int irq_cnt = 0, do_irq = 1, reset_fault_handler = 0;
idt_t idt = {0};
Expand Down
File renamed without changes.

0 comments on commit 39816a5

Please sign in to comment.