[coreboot] Re: "Fixing" `1 << 31` (technically undefined behavior with known implementation-specific results)

2021-01-08 Thread Nico Huber
Hi Peter, On 08.01.21 01:12, Peter Stuge wrote: > Felix Held wrote: >> While I find the BIT() macro to be much better than the BITx defines > > Why? for me it's that the BITx defines provide no separation between the BIT and the number. Also, the all-caps BIT letters come close to decimal digits;

[coreboot] Re: "Fixing" `1 << 31` (technically undefined behavior with known implementation-specific results)

2021-01-08 Thread Nico Huber
Hi, On 08.01.21 01:26, Peter Stuge wrote: > Nico Huber wrote: >> So, it's wrong but not broken > > ..yet that's right. But I think chances are incredibly low that C compilers would change this behavior. Of all the things that I'm worried about that could change, this case -- shifting out of the r

[coreboot] Re: "Fixing" `1 << 31` (technically undefined behavior with known implementation-specific results)

2021-01-08 Thread Nico Huber
Hi Harshit, On 08.01.21 01:35, Harshit Sharma wrote: > Although, I agree that 1u << 31 is much better, I believe 1 << 31 is not > wrong either as long as it is assigned to an 'unsigned int' as the compiler > performs an implicit conversion from a lower data type to a higher data > type ('int' to '

[coreboot] GCC warnings about brackets -Wparentheses (was Re: "Fixing" `1 << 31` (technically undefined behavior with known implementation-specific results))

2021-01-08 Thread Nico Huber
Hi Angel, as you brought it up, I guess we may as well discuss this on the list, too. I assume because some developers often don't remember that `+` takes precedence before `<<`, GCC warns now that one should place brackets in such cases even if they aren't necessary. On 08.01.21 01:37, Angel Po

[coreboot] New Defects reported by Coverity Scan for coreboot

2021-01-08 Thread scan-admin--- via coreboot
Hi, Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan. 1 new defect(s) introduced to coreboot found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1441844:(NULL_RETURNS) /util/intelmetool/intelmeto

[coreboot] Supporting a new board

2021-01-08 Thread Alif Ilhan
I previously wanted to port coreboot to my machine. But due to the lack of FSPs, specially the MRC.bin for Cedar trail platforms, I couldn't do it. But, I have recently found the source code for an Intel Cedar trail bios. It is actually an AMI bios source code. It has a huge amount of very useful i