Chritoph wrote: 04 Oct 2024 10:03
Memory allocation for the buffer is done by OS before asking the FileSystem (here: PFS3) to fill the buffer.
With the given buffer, PFS can detect mask not matching, show an error message, but that's about it.
But why should it throw an error? The mask exactly tells PFS3 which range is allowed, meaning it needs to make sure that all filebuffers are allocated in this region, and when the destination is outside of the region, using cpu memcopy to copy it. Doesn't seem too complicated, right?
Or does PFS3 allocate memory from top to bottom, and recognizes "whoops, my buffer is outside of the mask" ?
That would be a stupid strategy in any case, since the way how the masking is defined historically assumes that non-DMA memory is at the top of the memory map - which is not at all in all cases correct, because in case of the TF4060, I still might have a BigRam or GottaGoFaZt3r in one of the ZIII slots, which is DMA capable.
Some people write it's an "idiot proofing measure" on behalf of the Filesystem. I have more the feeling that the authors just took the easy way out and just wanted to avoid questions like "duh, why is PFS3 sooooo slow???" and thus plainly sacrificing functionality out of convenience.
Anyway, my recommendation is to limit the memory to 128MB, or at least offering 128MB versions. This way, any broken concepts / frameworks are avoided.