<div dir="ltr"><div>I looked up the datasheet for the vs6624 chip. All of the memory positions with a meaningful #define on vs6624_regs.h are the ones documented on the datasheet. There are a few without #defines but with somewhat meaningful names placed on comments. I suspect that those were either figured out by reverse engineering or else the developer of this driver got access to complementary docs.</div><div><br></div><div>There is also a large number of undocumented memory positions that are written to the chip (the vs6624_p1 array). I was curious to see if these "look like code" so I wrote a small python script to create a 64kbyte file with the contents resulting from performing all those writes. By inspecting the result on a hex editor, I see that a few mostly contiguous memory regions are filled with those bytes, which could either mean some code-blocks or some special-purpose range of registers. I also observed that these values are all written to a different memory range (mostly at 9xxx) than the documented registers (from 0x0000 to 0x2616). So it might indeed have a different purpose.</div><div><br></div><div>The datasheet also mentions that this 64k address range contains a mix of RAM, ROM and "real registers". My hunch is that ROM has firmware written on the factory that uses RAM for its stack and run-time variables but also for reading user-provided settings. Those settings would be the ones documented on the datasheet.<br></div><div><br></div><div>There's some small chance that the ROM code is written with hooks to optional extensions to be loaded on RAM by the user, but that sounds way too fancy, in my opinion. <br></div><div><br></div><div>Since the chip is manufactured by ST MicroElectronics, the embedded MCU must be one of the cores that ST has. So it might be something like SMT8x perhaps. Maybe we could try disassembling that block of bytes with the opcode table of one of these ST cores to see if it makes any sense.</div><div><br></div><div>Also, I could not find which devices use this camera other than a very old and discontinued phone. And the only parts I could find to buy are on ebay for ~20 dollars and listed as "old-new stock". And these chips are also listed as "obsolete" on some online electronic parts catalogs.<br></div><div><br></div><div>So here's my suggestion for the LinuxLibre project, I have a more pragmatic approach.</div><div>We lack info on this and it could really be anything. I suggest removing it and waiting until someone complains. Probably nobody will ever complain because it is extremely unlikely someone is nowadays running LinuxLibre on a device that uses this chip. And if such person exists, then we may have the chance of actually poking the device to figure out more technical info about it (such as dumping its internal ROM and disassemblying it to figure out what is it actually doing with the values written to all of those undocumented memory positions).<br></div><div><br></div><div>Happy Hacking!</div><div>Felipe "Juca" Sanches<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex., 20 de ago. de 2021 às 02:15, Alexandre Oliva <<a href="mailto:lxoliva@fsfla.org">lxoliva@fsfla.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello, Legimet,<br>
<br>
Thanks for the report.<br>
<br>
On Aug 18, 2021, Legimet <<a href="mailto:legimet.calc@gmail.com" target="_blank">legimet.calc@gmail.com</a>> wrote:<br>
<br>
> I noticed that there are some files which are included in Linux-libre,<br>
> but stripped from Debian's kernel: <br>
<br>
That's not so surprising. Debian has different standards. They even<br>
have a different Free Software definition, that they apply equally to<br>
software, documentation, functional and non-functional data.<br>
<br>
We follow the original Free Software definition, as it applies to<br>
software and other works for practical use. We don't mind<br>
non-executable configuration data, which leads to different decisions.<br>
<br>
> arch/powerpc/platforms/8xx/micropatch.c<br>
<br>
I found this one suspicious, as I inherited the package from BLAG<br>
maintainers that followed gNewSense's decision from back then. I have<br>
never challenged or reversed that decision, out of understanding that<br>
gNewSense had looked into and debated where to draw the line.<br>
<br>
> drivers/media/i2c/vs6624.c<br>
<br>
This one looks more like configuration data than code to me. It's hard<br>
to tell why, and such hunches are by no means absolute, but there are<br>
plenty of other arrays that comes across as data rather than as code,<br>
and that we've retained. deblob-check explicitly authorizes this one.<br>
<br>
The filename is indeed different nowadays, but the filename annotations<br>
are completely ignored by deblob-check.<br>
<br>
<br>
> drivers/video/fbdev/nvidia<br>
> drivers/video/fbdev/riva<br>
<br>
> The nvidia and riva drivers contain obfuscated source code, according to<br>
> the Debian dfsg patches:<br>
<br>
Source code provided with insufficient documentation is less desirable<br>
than properly documented source code, but that's not enough to make it<br>
non-Free Software.<br>
<br>
Whether it meets the requirements for corresponding sources under the<br>
GPL would be more relevant if we'd received it as object code at first,<br>
and had requested the corresponding sources. Getting obfuscated code<br>
could then be challenged as failing to meet the obligation to provide<br>
the source code.<br>
<br>
We got poor, debatable source code, but it's hardly debatable that, once<br>
one of us compiles that and distributes the object code, that *is* the<br>
corresponding source code we had at our disposal, that we've used to<br>
compile into the object form. We've never even had access to something<br>
that would be superior as source code, and we don't even know whether it<br>
exists. So there's no issue of GPL compliance for *us*, or for our<br>
downstream.<br>
<br>
<br>
Absent evidence that there is a better version that was precompiled into<br>
what we're using as sources, we keep it. I'm not even sure we'd have a<br>
case for removal if there was such evidence.<br>
<br>
I compare this situation with that of the decompiled version of the<br>
Brazilian tax software that I've been using to maintain and update it<br>
since 2007. The binaries I got at first were LGPLed compiled Java code<br>
with debug info, that decompiled into compilable Java without comments.<br>
That's not the corresponding source code for the binaries I got, but<br>
once I adopted that as the sources I was going to modify to develop it<br>
further, and started mofiying it, it became source code, and, more than<br>
that, it became corresponding source code for the binaries I've built<br>
and distributed out of it.<br>
<br>
In this case again Debian uses different criteria. And that's fine.<br>
They don't have to ship code (or data) they're not comfortable shipping,<br>
and they're free to modify the software to suit their needs, and to<br>
distribute the modified software if they wish.<br>
<br>
>> These drivers are also largely redundant with nouveau. The RIVA 128<br>
>> (NV3) is not supported by nouveau but is about 15 years old and<br>
>> probably discontinued 10 years ago.<br>
<br>
This is not a relevant argument for us.<br>
<br>
If it's Free Software, or if it's not software but data, we keep it.<br>
<br>
If it's non-Free Software, or if it's software or documentation that<br>
induces to the use of non-Free Software, we drop it.<br>
<br>
<br>
Thanks again,<br>
<br>
-- <br>
Alexandre Oliva, happy hacker <a href="https://FSFLA.org/blogs/lxo/" rel="noreferrer" target="_blank">https://FSFLA.org/blogs/lxo/</a><br>
Free Software Activist GNU Toolchain Engineer<br>
Disinformation flourishes because many people care deeply about injustice<br>
but very few check the facts. Ask me about <<a href="https://stallmansupport.org" rel="noreferrer" target="_blank">https://stallmansupport.org</a>><br>
_______________________________________________<br>
linux-libre mailing list<br>
<a href="mailto:linux-libre@fsfla.org" target="_blank">linux-libre@fsfla.org</a><br>
<a href="http://www.fsfla.org/cgi-bin/mailman/listinfo/linux-libre" rel="noreferrer" target="_blank">http://www.fsfla.org/cgi-bin/mailman/listinfo/linux-libre</a><br>
</blockquote></div>