From owner-freebsd-current Sat Apr 15 10:12:19 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA17124 for current-outgoing; Sat, 15 Apr 1995 10:12:19 -0700 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA17105 for ; Sat, 15 Apr 1995 10:11:59 -0700 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id KAA19730; Sat, 15 Apr 1995 10:11:54 -0700 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id KAA00834; Sat, 15 Apr 1995 10:11:54 -0700 Message-Id: <199504151711.KAA00834@corbin.Root.COM> To: uhclem@nemesis.lonestar.org (Frank Durda IV) cc: freebsd-current@FreeBSD.org Subject: Re: Memory init pattern In-reply-to: Your message of "Sat, 15 Apr 95 10:12:00 CDT." From: David Greenman Reply-To: davidg@Root.COM Date: Sat, 15 Apr 1995 10:11:53 -0700 Sender: current-owner@FreeBSD.org Precedence: bulk >[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