coreboot-kgpe-d16/util/nvramtool/accessors/cmos-mem.c
Elyes HAOUAS 52648623e0 Remove empty lines at end of file
Used command line to remove empty lines at end of file:
find . -type f -exec sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;

Change-Id: I816ac9666b6dbb7c7e47843672f0d5cc499766a3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: http://review.coreboot.org/10446
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-06-08 00:55:07 +02:00

36 lines
826 B
C

#include <assert.h>
#include "cmos_lowlevel.h"
static void mem_hal_init(void* data);
static unsigned char mem_hal_read(unsigned addr);
static void mem_hal_write(unsigned addr, unsigned char value);
static void mem_set_iopl(int level);
static unsigned char* mem_hal_data = (unsigned char*)-1;
static void mem_hal_init(void *data)
{
mem_hal_data = data;
}
static unsigned char mem_hal_read(unsigned index)
{
assert(mem_hal_data != (unsigned char*)-1);
return mem_hal_data[index];
}
static void mem_hal_write(unsigned index, unsigned char value)
{
assert(mem_hal_data != (unsigned char*)-1);
mem_hal_data[index] = value;
}
static void mem_set_iopl(__attribute__ ((unused)) int level)
{
}
cmos_access_t memory_hal = {
.init = mem_hal_init,
.read = mem_hal_read,
.write = mem_hal_write,
.set_iopl = mem_set_iopl,
};