[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 2/2] plat: Register eh_frame and eh_frame_hdr in memory.h
Hi Vlad,This code looks fine to me. However, I would feel safer if Simon, as the author of the memory regions logic, gives it a short cursory look to check this is in line with the idea. Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx> On 12/12/18 6:08 PM, Vlad-Andrei BĂDOIU (78692) wrote: Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> --- plat/kvm/memory.c | 27 +++++++++++++++++++++++++-- plat/xen/memory.c | 23 +++++++++++++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/plat/kvm/memory.c b/plat/kvm/memory.c index 11c993d..d724ed6 100644 --- a/plat/kvm/memory.c +++ b/plat/kvm/memory.c @@ -32,13 +32,14 @@ extern void *_libkvmplat_mem_end;int ukplat_memregion_count(void){ - return 7; + return 9; }int ukplat_memregion_get(int i, struct ukplat_memregion_desc *m){ extern char _text, _etext, _data, _edata, _rodata, _erodata, - _ctors, _ectors, __bss_start, _end; + _ctors, _ectors, __bss_start, _end, __eh_frame_start, + __eh_frame_end, __eh_frame_hdr_start, __eh_frame_hdr_end; int ret;UK_ASSERT(m);@@ -118,6 +119,28 @@ int ukplat_memregion_get(int i, struct ukplat_memregion_desc *m) m->name = "bstack"; #endif break; + case 7: /* eh frame */ + m->base = &__eh_frame_start; + m->len = (size_t) &__eh_frame_end - (size_t) &__eh_frame_start; + m->flags = (UKPLAT_MEMRF_RESERVED + | UKPLAT_MEMRF_READABLE); + ret = 0; +#if CONFIG_UKPLAT_MEMRNAME + m->name = "eh_frame"; +#endif + break; + + case 8: /* eh frame header*/ + m->base = &__eh_frame_hdr_start; + m->len = (size_t) &__eh_frame_hdr_end - (size_t) &__eh_frame_hdr_start; + m->flags = (UKPLAT_MEMRF_RESERVED + | UKPLAT_MEMRF_READABLE); + ret = 0; +#if CONFIG_UKPLAT_MEMRNAME + m->name = "eh_frame_hdr"; +#endif + break; + default: m->base = __NULL; m->len = 0; diff --git a/plat/xen/memory.c b/plat/xen/memory.c index f84dca7..629c533 100644 --- a/plat/xen/memory.c +++ b/plat/xen/memory.c @@ -46,12 +46,13 @@int ukplat_memregion_count(void){ - return (int) _libxenplat_mrd_num + 5; + return (int) _libxenplat_mrd_num + 7; }int ukplat_memregion_get(int i, struct ukplat_memregion_desc *m){ - extern char _text, _etext, _data, _edata, _rodata, _erodata, _ctors, _ectors, _end, __bss_start; + extern char _text, _etext, _data, _edata, _rodata, _erodata, _ctors, _ectors, _end, __bss_start, + __eh_frame_start, __eh_frame_end, __eh_frame_hdr_start, __eh_frame_hdr_end;UK_ASSERT(m); @@ -103,6 +104,24 @@ int ukplat_memregion_get(int i, struct ukplat_memregion_desc *m)m->name = "bss"; #endif break; + + case 5: /* eh frame */ + m->base = &__eh_frame_start; + m->len = (size_t) &__eh_frame_end - (size_t) &__eh_frame_start; + m->flags = (UKPLAT_MEMRF_RESERVED + | UKPLAT_MEMRF_READABLE); +#if CONFIG_UKPLAT_MEMRNAME + m->name = "eh_frame"; +#endif + + case 6: /* eh frame header */ + m->base = &__eh_frame_hdr_start; + m->len = (size_t) &__eh_frame_hdr_end - (size_t) &__eh_frame_hdr_start; + m->flags = (UKPLAT_MEMRF_RESERVED + | UKPLAT_MEMRF_READABLE); +#if CONFIG_UKPLAT_MEMRNAME + m->name = "eh_frame_hdr"; +#endif default: if (i < 0 || i >= ukplat_memregion_count()) { m->base = __NULL; -- Dr. Florian Schmidt フローリアン・シュミット Research Scientist, Systems and Machine Learning Group NEC Laboratories Europe Kurfürsten-Anlage 36, D-69115 Heidelberg Tel. +49 (0)6221 4342-265 Fax: +49 (0)6221 4342-155 e-mail: florian.schmidt@xxxxxxxxx ============================================================ Registered at Amtsgericht Mannheim, Germany, HRB728558 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |