Redo testbios utility to use all of YABEL
Drop buggy duplicate implementation of intXX handlers and provide enough glue to use all of YABEL. Change-Id: I2db77a56a2a991cb84876456dcbb3a843a0d9754 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/12117 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
committed by
Stefan Reinauer
parent
eb960f1af9
commit
05082737a9
24
util/vgabios/include/arch/byteorder.h
Normal file
24
util/vgabios/include/arch/byteorder.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Google Inc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _BYTEORDER_H
|
||||
#define _BYTEORDER_H
|
||||
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
|
||||
#define cpu_to_le16(x) ((uint16_t)(x))
|
||||
#define cpu_to_le32(x) ((uint32_t)(x))
|
||||
|
||||
#endif /* _BYTEORDER_H */
|
@@ -1,4 +0,0 @@
|
||||
#ifndef _ASM_IO_H
|
||||
#define _ASM_IO_H
|
||||
#include <sys/io.h>
|
||||
#endif
|
35
util/vgabios/include/config.h
Normal file
35
util/vgabios/include/config.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Google Inc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#define CONFIG_PCI_OPTION_ROM_RUN_YABEL 1
|
||||
#define CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES 0
|
||||
#define CONFIG_YABEL_DIRECTHW 1
|
||||
|
||||
#define CONFIG_X86EMU_DEBUG 1
|
||||
#define CONFIG_X86EMU_DEBUG_TIMINGS 0
|
||||
#define CONFIG_X86EMU_DEBUG_JMP 0
|
||||
#define CONFIG_X86EMU_DEBUG_TRACE 0
|
||||
#define CONFIG_X86EMU_DEBUG_PNP 0
|
||||
#define CONFIG_X86EMU_DEBUG_DISK 0
|
||||
#define CONFIG_X86EMU_DEBUG_PMM 0
|
||||
#define CONFIG_X86EMU_DEBUG_VBE 0
|
||||
#define CONFIG_X86EMU_DEBUG_INT10 0
|
||||
#define CONFIG_X86EMU_DEBUG_INTERRUPTS 0
|
||||
#define CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS 0
|
||||
#define CONFIG_X86EMU_DEBUG_MEM 0
|
||||
#define CONFIG_X86EMU_DEBUG_IO 0
|
||||
|
||||
#define CONFIG_ARCH_X86 1
|
||||
#define CONFIG_ARCH_ARM 0
|
@@ -1,6 +1,21 @@
|
||||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Google Inc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _CONSOLE_CONSOLE_H
|
||||
#define _CONSOLE_CONSOLE_H
|
||||
#define CONFIG_X86EMU_DEBUG 1
|
||||
|
||||
int printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Google Inc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _STDTYPES_H
|
||||
#define _STDTYPES_H
|
||||
|
||||
|
57
util/vgabios/include/swab.h
Normal file
57
util/vgabios/include/swab.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _SWAB_H
|
||||
#define _SWAB_H
|
||||
|
||||
/*
|
||||
* linux/byteorder/swab.h
|
||||
* Byte-swapping, independently from CPU endianness
|
||||
* swabXX[ps]?(foo)
|
||||
*
|
||||
* Francois-Rene Rideau <fare@tunes.org> 19971205
|
||||
* separated swab functions from cpu_to_XX,
|
||||
* to clean up support for bizarre-endian architectures.
|
||||
*
|
||||
* See asm-i386/byteorder.h and such for examples of how to provide
|
||||
* architecture-dependent optimized versions
|
||||
*
|
||||
*/
|
||||
|
||||
/* casts are necessary for constants, because we never know how for sure
|
||||
* how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
|
||||
*/
|
||||
#define swab16(x) \
|
||||
((unsigned short)( \
|
||||
(((unsigned short)(x) & (unsigned short)0x00ffU) << 8) | \
|
||||
(((unsigned short)(x) & (unsigned short)0xff00U) >> 8) ))
|
||||
|
||||
#define swab32(x) \
|
||||
((unsigned int)( \
|
||||
(((unsigned int)(x) & (unsigned int)0x000000ffUL) << 24) | \
|
||||
(((unsigned int)(x) & (unsigned int)0x0000ff00UL) << 8) | \
|
||||
(((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \
|
||||
(((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) ))
|
||||
|
||||
#define swab64(x) \
|
||||
((uint64_t)( \
|
||||
(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
|
||||
(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
|
||||
(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) ))
|
||||
|
||||
#endif /* _SWAB_H */
|
Reference in New Issue
Block a user