Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 1995 10:11:53 -0700
From:      David Greenman <davidg@Root.COM>
To:        uhclem@nemesis.lonestar.org (Frank Durda IV)
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: Memory init pattern 
Message-ID:  <199504151711.KAA00834@corbin.Root.COM>
In-Reply-To: Your message of "Sat, 15 Apr 95 10:12:00 CDT." <m0s09Wp-0004vsC@nemesis.lonestar.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>[1]On Fri, 14 Apr 1995, Rodney W. Grimes wrote:
>[1]Yes, setting it to 0xDeadBeef is a very good idea, that way you
>[1]can find out some times when you pick up a wild pointer by the
>[1]value in it :-).
>
>Ugh.  You do realize that selected Microsoft products used this
>same pattern for a while in 1992 (I know Modular Windows did).
>
>Then MS removed it because of protests from leaders of a somewhat large
>group of people (millions?) out there whose religion doesn't eat beef and
>didn't like this message being in something that they or their children
>might see.   I know Tandy demanded its removal as well so they wouldn't
>have any trouble at the retail level over something so easily avoided.

   If we cared about religious concerns, we wouldn't be using the "daemon"
mascott.

>It might be wise to avoid something that even managed to trip up The
>Great Bill.   :-)

   There is already substantial precedence of 0xdeadbeef in the kernel. It is
the value used by the memory allocator to fill memory with when using options
DIAGNOSTIC in the kernel - for the same purpose we're proposing here. I'd
prefer to continue using this value as it is easily identified in trap/panic
and other diagnostic messages (as well as easily spotted in the debugger).

>What has happened more recently is that TI has been suing computer
>makers for performing power-on diagnostics and the memory test
>(not the initialization) was considered to be one of them.  That is

   Operating system startup memory tests have been done for longer than Tandy
has been in business (even late 60's DEC machines did this).

>Also, any pattern written must be unique across adjacent two 32-bit
>values.  In other words, don't write 0x12345678 and in the next 32 bits
>write 0x12345678.  You are setting yourself up for ghosting in 64/32-bit

   I disagree. We're not trying to use this to size memory. The memory test
that was originally in FreeBSD was there only to do a quick verification of
the values returned by the BIOS. What we're proposing is filling memory with a
known pattern as a diagnostic aid in finding usage of uninitialized memory.

-DG



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504151711.KAA00834>