[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 1/2] include/plat: Remove plat/common/include/memory.h



On 10/12/19 5:19 PM, Justin He (Arm Technology China) wrote:
> Hi Costin
> 
>> -----Original Message-----
>> From: Minios-devel <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf
>> Of Costin Lupu
>> Sent: Saturday, October 12, 2019 7:12 PM
>> To: Justin He (Arm Technology China) <Justin.He@xxxxxxx>; minios-
>> devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
>> Cc: Felipe Huici <felipe.huici@xxxxxxxxx>; Kaly Xin (Arm Technology China)
>> <Kaly.Xin@xxxxxxx>; Julien Grall <Julien.Grall@xxxxxxx>;
>> Sharan.Santhanam@xxxxxxxxx; Santiago.Pagani@xxxxxxxxx; nd
>> <nd@xxxxxxx>
>> Subject: Re: [Minios-devel] [UNIKRAFT PATCH v2 1/2] include/plat: Remove
>> plat/common/include/memory.h
>>
>> Hi Jia He,
>>
>> I agree that this warning has to be fixed. However, we cannot fix it by
>> removing `plat/common/include/memory.h`, we should find another
>> solution
>> and this is why.
>>
>> Headers under `include` directory, such as `include/uk/plat/memory.h`,
>> declare functions that are part of the platform public API. Headers
>> under `plat/common/include/` declare functions that are used by more
>> platforms, but that are not public. Therefore, we cannot make
>> `_ukplat_mem_mappings_init()` public because that wasn't the intention
>> behind defining it.
>>
>> Maybe we should think again whether we really need to include newlib's
>> memory.h header in platform code and, if not, then find an elegant way
>> to skip including that one.
> If we can't remove include/uk/plat/memory.h, how about rename it with another
> name? Otherwise this might be conflicted with newlibc/.../memory.h.
In deed, renaming the header would temporary fix it. However, the real
problem would remain. For the platform source, we should not include the
external libs headers at all because platform code doesn't depend on
external libs - this is one of the main design principles in Unikraft.
Therefore we should discriminate between the include paths and skip
using the ones coming from external libs at least when building platform
sources.

I think that Simon should shed some light on how to do it properly.

Cheers,
Costin

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.