[coreboot-gerrit] New patch to review for coreboot: 5dae14b Drop resetcf
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Wed May 6 01:41:19 CEST 2015
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10119
-gerrit
commit 5dae14bf4e944a3dffeca1ab71ce717eb506d9f4
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date: Tue May 5 16:39:25 2015 -0700
Drop resetcf
This utility was useful on older VIA Epia-M boards, which we
have dropped from the tree a while ago. Hence drop the utility
as well.
Change-Id: Ie0d6303f4f4cfb6b21cd90696c60e124f0a5f4d8
Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
util/resetcf/resetcf.c | 42 ------------------------------------------
1 file changed, 42 deletions(-)
diff --git a/util/resetcf/resetcf.c b/util/resetcf/resetcf.c
deleted file mode 100644
index 01e270c..0000000
--- a/util/resetcf/resetcf.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-
-#include <unistd.h>
-#include <sys/mman.h>
-
-main(int argc, char *argv[])
-{
- int i;
- volatile unsigned char *cp;
- int fd;
- void *v;
- off_t nvram;
- size_t length = 0x1000;
-
- fd = open("/proc/bus/pci/00/0a.1",O_RDONLY);
- lseek(fd,0x10,0);
- read(fd,&nvram,sizeof(nvram));
- close(fd);
- //printf("Star %x\n",nvram);
-
- if((fd = open("/dev/mem",O_RDWR)) != -1)
- {
- v = mmap(0, length, PROT_READ | PROT_WRITE, MAP_SHARED,fd,nvram);
- fprintf(stderr, "mmap returns %p\n", v);
-
- if ( v == (void *) -1)
- {
- perror("mmap");
- exit(1);
- }
- } else {
- perror("open /dev/mem");
- exit(1);
- }
-
- for( i = 0x836 ; i < 0x840 ; i++){
- *(unsigned char *)(v+i) = 0;
- }
-
-
-}
More information about the coreboot-gerrit
mailing list