[coreboot] [PATCH][v3] Check that CAR and ROM areas don'tcollide
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
> 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.
> 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 >
I realize that 1<<22 isn't pretty, but the rest doesn't seem too bad.
More information about the coreboot