[PATCH v3] Add mmap

Christian Mauderer list at c-mauderer.de
Wed Jul 17 19:29:21 UTC 2019


On 17/07/2019 11:10, Nils Hölscher wrote:
>  Hi,
> 
>     +#define VM_MEMATTR_DEFAULT 0
>     +#define VM_MEMATTR_UNCACHEABLE 1
> 
> 
> Are you sure that these values are correct in general?
> BSD defines this only for ARM versions smaller 6.
> https://github.com/freebsd/freebsd/blob/1d6e4247415d264485ee94b59fdbc12e0c566fd0/sys/arm/include/vm.h 

Hello Nils,

the VM_MEMATTR_* defines are machine dependent:

https://github.com/freebsd/freebsd/blob/1d6e4247415d264485ee94b59fdbc12e0c566fd0/sys/vm/vm.h#L117

Our "machine" is RTEMS. So theoretically every value could be defined
here. It's just relevant that the RTEMS implementation of the functions
handling these flags know how to use them. Currently the handling is to
ignore them (till someone has a problem with it). So I think the values
should be OK.

By the way: sparc64 in FreeBSD ignores them too. They even define both to 0.

Best regards

Christian



More information about the devel mailing list