diff --git a/bbl/bbl.lds b/bbl/bbl.lds index c06aa13..6833e47 100644 --- a/bbl/bbl.lds +++ b/bbl/bbl.lds @@ -40,6 +40,16 @@ SECTIONS PROVIDE( etext = . ); _etext = .; + /*--------------------------------------------------------------------*/ + /* HTIF, isolated onto separate page */ + /*--------------------------------------------------------------------*/ + . = ALIGN(0x1000); + htif : + { + *(htif) + } + . = ALIGN(0x1000); + /*--------------------------------------------------------------------*/ /* Initialized data segment */ /*--------------------------------------------------------------------*/ diff --git a/machine/mtrap.c b/machine/mtrap.c index bf02fab..a68c0d9 100644 --- a/machine/mtrap.c +++ b/machine/mtrap.c @@ -7,8 +7,8 @@ #include #include -volatile uint64_t tohost __attribute__((aligned(64))); -volatile uint64_t fromhost __attribute__((aligned(64))); +volatile uint64_t tohost __attribute__((aligned(64))) __attribute__((section("htif"))); +volatile uint64_t fromhost __attribute__((aligned(64))) __attribute__((section("htif"))); void __attribute__((noreturn)) bad_trap() { diff --git a/pk/pk.lds b/pk/pk.lds index 522e4a8..1bc9adf 100644 --- a/pk/pk.lds +++ b/pk/pk.lds @@ -40,6 +40,16 @@ SECTIONS PROVIDE( etext = . ); _etext = .; + /*--------------------------------------------------------------------*/ + /* HTIF, isolated onto separate page */ + /*--------------------------------------------------------------------*/ + . = ALIGN(0x1000); + htif : + { + *(htif) + } + . = ALIGN(0x1000); + /*--------------------------------------------------------------------*/ /* Initialized data segment */ /*--------------------------------------------------------------------*/