[coreboot] [PATCH][v3] Check that CAR and ROM areas don'tcollide
Myles Watson
mylesgw at gmail.com
Wed Dec 10 19:29:56 CET 2008
> -----Original Message-----
> From: coreboot-bounces at coreboot.org [mailto:coreboot-bounces at coreboot.org]
> On Behalf Of Carl-Daniel Hailfinger
> Sent: Wednesday, December 10, 2008 11:18 AM
> To: Corey Osgood
> Cc: Segher Boessenkool; coreboot
> Subject: Re: [coreboot] [PATCH][v3] Check that CAR and ROM areas
> don'tcollide
>
> Hi Segher,
>
> is the last test below with 0x100000000 (2^32) in the formula guaranteed
> to work or may cpp truncate the results to 32 bit? I'd rather avoid
> introducing a test that can never trigger.
...snip...
> What you actually want is this test:
> #if CONFIG_CARBASE + CONFIG_CARSIZE + (CONFIG_COREBOOT_ROMSIZE_KB * 1024)
> > 0x100000000
To avoid that problem, maybe we should /1024 instead of *.
#if CONFIG_CARBASE/1024 + CONFIG_CARSIZE/1024 + CONFIG_COREBOOT_ROMSIZE_KB >
1<<22
I realize that 1<<22 isn't pretty, but the rest doesn't seem too bad.
Thanks,
Myles
More information about the coreboot
mailing list