public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: John Baboval <baboval@mclinux.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Memory clearing at reboot
Date: Tue, 22 Aug 2000 18:49:57 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205378@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

I have a small test program that I run at the EFI shell prompt to set an
area of memory and then perform a warm reboot. After the reboot our BigSur
still contains the values written, but the Lion is cleared to zero. (We
check the contents with the mem command, and the ResetSystem() is called
with the EfiResetWarm parameter.)

Does anyone know if there is a way to cause the Lion *not* to clear memory?
Also, our Lion has newer firmware then the BigSur. Perhaps the newer
firmware causes the reset? 

If someone out there has a BigSur with the latest firmware/CPU rev., could
you run my program and tell me if your machine resets it's memory? The
source code is attached, and you can build it with gnu-efi-0.9.

Basically, you run the program and write down the address, and then when the
machine comes back up type 'mem <Address>' and see if the memory is zero or
not.

Not reseting memory makes taking kernel core dumps with our in-memory core
dump patches MUCH easier! Thanks for any help,

-- 
--John
jbaboval@missioncriticallinux.com

[-- Attachment #2: set_reset.c --]
[-- Type: text/x-csrc, Size: 1339 bytes --]

#include <efi.h>
#include <efilib.h>

EFI_STATUS
efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
{
	unsigned long bytes, mbytes;
	CHAR16 *prompt = W2U(L"Enter number of Mbytes: ");
	CHAR16 input[255];
	int input_len = 255;
	void *buffer;
	EFI_STATUS status;
	unsigned long i;
	long *temp;
	CHAR16 *ugh = W2U(L"test");

	InitializeLib(image, systab);

	Input(prompt, input, input_len);
	mbytes = Atoi(input);
	bytes = mbytes*1024*1024;

	Print (W2U(L"\nAllocating pool of %d bytes\n"), bytes);
	status = BS->AllocatePool(EfiBootServicesData, bytes, &buffer);

	if(status != EFI_SUCCESS) {
		Print(W2U(L"AllocatePool Failed with "));
		switch(status) {
			case EFI_OUT_OF_RESOURCES:
				Print(W2U(L"EFI_OUT_OF_RESOURCES\n"));
				break;
			case EFI_INVALID_PARAMETER:
				Print(W2U(L"EFI_INVALID_PARAMETER\n"));
				break;
			default:
				Print(W2U(L"%d\n"), status);
		}
		return status;
	}

	Print(W2U(L"Allocation succeeded. Buffer start :%016x\n"), buffer);

	Print(W2U(L"Setting Memory to 0xDEADBEEF"));
	for(i=0; i<bytes/8; i++) {
		temp = (long *)(buffer + i*8);
		*temp = (0xEFBEADDEEFBEADDE);
		if(((i*8)%(1024*1024)) == 0)
			Print(W2U(L"."));
	}

	Print(W2U(L"Press any key to reboot\n"));
        WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
	RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
		
	return EFI_SUCCESS;
}

             reply	other threads:[~2000-08-22 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-22 18:49 John Baboval [this message]
2000-08-23  0:37 ` [Linux-ia64] Memory clearing at reboot Saxena, Sunil
2000-08-23  1:01 ` Gerrit.Huizenga
2000-08-23 23:16 ` Gerrit.Huizenga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590678205378@msgid-missing \
    --to=baboval@mclinux.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox