2009-08-11 23:28:25 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
2010-04-21 22:06:10 +02:00
|
|
|
* Copyright (C) 2007 Advanced Micro Devices, Inc.
|
|
|
|
* Copyright (C) 2009-2010 coresystems GmbH
|
2009-08-11 23:28:25 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2009-09-23 23:52:45 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-08-11 23:28:25 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <arch/io.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
#include <arch/interrupt.h>
|
2009-10-24 02:47:07 +02:00
|
|
|
#include <arch/registers.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
#include <boot/coreboot_tables.h>
|
2014-07-29 14:28:19 +02:00
|
|
|
#include <cbfs.h>
|
2009-08-11 23:28:25 +02:00
|
|
|
#include <console/console.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
#include <cpu/amd/lxdef.h>
|
|
|
|
#include <cpu/amd/vr.h>
|
2011-10-12 23:30:59 +02:00
|
|
|
#include <delay.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
#include <device/pci.h>
|
|
|
|
#include <device/pci_ids.h>
|
|
|
|
#include <lib/jpeg.h>
|
2011-10-12 23:35:54 +02:00
|
|
|
#include <pc80/i8259.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
#include <string.h>
|
2013-04-23 19:59:11 +02:00
|
|
|
#include <vbe.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
/* we use x86emu's register file representation */
|
|
|
|
#include <x86emu/regs.h>
|
2014-07-30 05:53:04 +02:00
|
|
|
|
|
|
|
#include "x86.h"
|
2012-11-22 12:46:12 +01:00
|
|
|
|
2013-02-08 23:56:51 +01:00
|
|
|
/* The following symbols cannot be used directly. They need to be fixed up
|
|
|
|
* to point to the correct address location after the code has been copied
|
|
|
|
* to REALMODE_BASE. Absolute symbols are not used because those symbols are
|
|
|
|
* relocated when a relocatable ramstage is enabled.
|
|
|
|
*/
|
|
|
|
extern unsigned char __realmode_call, __realmode_interrupt;
|
|
|
|
extern unsigned char __realmode_buffer;
|
|
|
|
|
|
|
|
#define PTR_TO_REAL_MODE(sym)\
|
|
|
|
(void *)(REALMODE_BASE + ((char *)&(sym) - (char *)&__realmode_code))
|
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
/* to have a common register file for interrupt handlers */
|
|
|
|
X86EMU_sysEnv _X86EMU_env;
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2010-05-11 17:39:20 +02:00
|
|
|
void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx,
|
2013-02-08 23:56:51 +01:00
|
|
|
u32 esi, u32 edi) asmlinkage;
|
2010-05-11 17:39:20 +02:00
|
|
|
|
2011-10-31 20:56:45 +01:00
|
|
|
void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx,
|
2013-02-08 23:56:51 +01:00
|
|
|
u32 esi, u32 edi) asmlinkage;
|
|
|
|
|
|
|
|
static void setup_realmode_code(void)
|
|
|
|
{
|
|
|
|
memcpy(REALMODE_BASE, &__realmode_code, __realmode_code_size);
|
|
|
|
|
|
|
|
/* Ensure the global pointers are relocated properly. */
|
|
|
|
realmode_call = PTR_TO_REAL_MODE(__realmode_call);
|
|
|
|
realmode_interrupt = PTR_TO_REAL_MODE(__realmode_interrupt);
|
|
|
|
|
|
|
|
printk(BIOS_SPEW, "Real mode stub @%p: %d bytes\n", REALMODE_BASE,
|
|
|
|
__realmode_code_size);
|
|
|
|
}
|
2010-05-11 17:39:20 +02:00
|
|
|
|
|
|
|
static void setup_rombios(void)
|
|
|
|
{
|
|
|
|
const char date[] = "06/11/99";
|
|
|
|
memcpy((void *)0xffff5, &date, 8);
|
|
|
|
|
|
|
|
const char ident[] = "PCI_ISA";
|
|
|
|
memcpy((void *)0xfffd9, &ident, 7);
|
|
|
|
|
|
|
|
/* system model: IBM-AT */
|
|
|
|
write8(0xffffe, 0xfc);
|
|
|
|
}
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
static int (*intXX_handler[256])(void) = { NULL };
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
static int intXX_exception_handler(void)
|
2009-08-11 23:28:25 +02:00
|
|
|
{
|
2012-11-22 12:46:12 +01:00
|
|
|
/* compatibility shim */
|
|
|
|
struct eregs reg_info = {
|
|
|
|
.eax=X86_EAX,
|
|
|
|
.ecx=X86_ECX,
|
|
|
|
.edx=X86_EDX,
|
|
|
|
.ebx=X86_EBX,
|
|
|
|
.esp=X86_ESP,
|
|
|
|
.ebp=X86_EBP,
|
|
|
|
.esi=X86_ESI,
|
|
|
|
.edi=X86_EDI,
|
|
|
|
.vector=M.x86.intno,
|
|
|
|
.error_code=0, // FIXME: fill in
|
|
|
|
.eip=X86_EIP,
|
|
|
|
.cs=X86_CS,
|
|
|
|
.eflags=X86_EFLAGS
|
|
|
|
};
|
|
|
|
struct eregs *regs = ®_info;
|
|
|
|
|
2010-04-27 08:56:47 +02:00
|
|
|
printk(BIOS_INFO, "Oops, exception %d while executing option rom\n",
|
2009-08-11 23:28:25 +02:00
|
|
|
regs->vector);
|
2010-04-27 08:56:47 +02:00
|
|
|
x86_exception(regs); // Call coreboot exception handler
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2011-10-12 23:35:54 +02:00
|
|
|
return 0; // Never really returns
|
2009-08-11 23:28:25 +02:00
|
|
|
}
|
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
static int intXX_unknown_handler(void)
|
2009-08-11 23:28:25 +02:00
|
|
|
{
|
2010-09-09 16:42:58 +02:00
|
|
|
printk(BIOS_INFO, "Unsupported software interrupt #0x%x eax 0x%x\n",
|
2012-11-22 12:46:12 +01:00
|
|
|
M.x86.intno, X86_EAX);
|
2009-08-11 23:28:25 +02:00
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2009-12-23 20:16:47 +01:00
|
|
|
/* setup interrupt handlers for mainboard */
|
2013-04-23 17:25:34 +02:00
|
|
|
void mainboard_interrupt_handlers(int intXX, int (*intXX_func)(void))
|
2009-12-23 20:16:47 +01:00
|
|
|
{
|
|
|
|
intXX_handler[intXX] = intXX_func;
|
|
|
|
}
|
|
|
|
|
2009-08-11 23:28:25 +02:00
|
|
|
static void setup_interrupt_handlers(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2010-04-27 08:56:47 +02:00
|
|
|
/* The first 16 intXX functions are not BIOS services,
|
2009-08-11 23:28:25 +02:00
|
|
|
* but the CPU-generated exceptions ("hardware interrupts")
|
|
|
|
*/
|
|
|
|
for (i = 0; i < 0x10; i++)
|
|
|
|
intXX_handler[i] = &intXX_exception_handler;
|
2010-04-27 08:56:47 +02:00
|
|
|
|
2009-08-11 23:28:25 +02:00
|
|
|
/* Mark all other intXX calls as unknown first */
|
|
|
|
for (i = 0x10; i < 0x100; i++)
|
2009-12-23 20:16:47 +01:00
|
|
|
{
|
|
|
|
/* If the mainboard_interrupt_handler isn't called first.
|
|
|
|
*/
|
|
|
|
if(!intXX_handler[i])
|
|
|
|
{
|
|
|
|
/* Now set the default functions that are actually
|
2011-10-12 23:30:59 +02:00
|
|
|
* needed to initialize the option roms. This is
|
|
|
|
* very slick, as it allows us to implement mainboard
|
|
|
|
* specific interrupt handlers, such as the int15.
|
2009-12-23 20:16:47 +01:00
|
|
|
*/
|
|
|
|
switch (i) {
|
2010-09-09 16:42:58 +02:00
|
|
|
case 0x10:
|
|
|
|
intXX_handler[0x10] = &int10_handler;
|
|
|
|
break;
|
2009-12-23 20:16:47 +01:00
|
|
|
case 0x12:
|
|
|
|
intXX_handler[0x12] = &int12_handler;
|
|
|
|
break;
|
2010-09-09 16:42:58 +02:00
|
|
|
case 0x16:
|
|
|
|
intXX_handler[0x16] = &int16_handler;
|
|
|
|
break;
|
2009-12-23 20:16:47 +01:00
|
|
|
case 0x1a:
|
|
|
|
intXX_handler[0x1a] = &int1a_handler;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
intXX_handler[i] = &intXX_unknown_handler;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-08-11 23:28:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void write_idt_stub(void *target, u8 intnum)
|
|
|
|
{
|
|
|
|
unsigned char *codeptr;
|
|
|
|
codeptr = (unsigned char *) target;
|
2013-02-08 23:56:51 +01:00
|
|
|
memcpy(codeptr, &__idt_handler, __idt_handler_size);
|
2009-08-11 23:28:25 +02:00
|
|
|
codeptr[3] = intnum; /* modify int# in the code stub. */
|
|
|
|
}
|
|
|
|
|
|
|
|
static void setup_realmode_idt(void)
|
|
|
|
{
|
|
|
|
struct realmode_idt *idts = (struct realmode_idt *) 0;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* Copy IDT stub code for each interrupt. This might seem wasteful
|
|
|
|
* but it is really simple
|
|
|
|
*/
|
|
|
|
for (i = 0; i < 256; i++) {
|
|
|
|
idts[i].cs = 0;
|
2013-02-08 23:56:51 +01:00
|
|
|
idts[i].offset = 0x1000 + (i * __idt_handler_size);
|
2009-08-11 23:28:25 +02:00
|
|
|
write_idt_stub((void *)((u32 )idts[i].offset), i);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Many option ROMs use the hard coded interrupt entry points in the
|
2010-04-27 08:56:47 +02:00
|
|
|
* system bios. So install them at the known locations.
|
2009-08-11 23:28:25 +02:00
|
|
|
*/
|
2010-04-27 08:56:47 +02:00
|
|
|
|
2009-08-11 23:28:25 +02:00
|
|
|
/* int42 is the relocated int10 */
|
2010-04-25 01:15:23 +02:00
|
|
|
write_idt_stub((void *)0xff065, 0x42);
|
2010-05-11 17:39:20 +02:00
|
|
|
/* BIOS Int 11 Handler F000:F84D */
|
|
|
|
write_idt_stub((void *)0xff84d, 0x11);
|
|
|
|
/* BIOS Int 12 Handler F000:F841 */
|
|
|
|
write_idt_stub((void *)0xff841, 0x12);
|
|
|
|
/* BIOS Int 13 Handler F000:EC59 */
|
|
|
|
write_idt_stub((void *)0xfec59, 0x13);
|
|
|
|
/* BIOS Int 14 Handler F000:E739 */
|
|
|
|
write_idt_stub((void *)0xfe739, 0x14);
|
|
|
|
/* BIOS Int 15 Handler F000:F859 */
|
2010-04-27 08:56:47 +02:00
|
|
|
write_idt_stub((void *)0xff859, 0x15);
|
2010-05-11 17:39:20 +02:00
|
|
|
/* BIOS Int 16 Handler F000:E82E */
|
|
|
|
write_idt_stub((void *)0xfe82e, 0x16);
|
|
|
|
/* BIOS Int 17 Handler F000:EFD2 */
|
|
|
|
write_idt_stub((void *)0xfefd2, 0x17);
|
|
|
|
/* ROM BIOS Int 1A Handler F000:FE6E */
|
|
|
|
write_idt_stub((void *)0xffe6e, 0x1a);
|
2009-08-11 23:28:25 +02:00
|
|
|
}
|
|
|
|
|
2011-10-12 23:30:59 +02:00
|
|
|
#if CONFIG_FRAMEBUFFER_SET_VESA_MODE
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
vbe_mode_info_t mode_info;
|
|
|
|
static int mode_info_valid;
|
|
|
|
|
|
|
|
int vbe_mode_info_valid(void)
|
|
|
|
{
|
|
|
|
return mode_info_valid;
|
|
|
|
}
|
|
|
|
|
|
|
|
static u8 vbe_get_mode_info(vbe_mode_info_t * mi)
|
2011-10-12 23:30:59 +02:00
|
|
|
{
|
2012-08-29 18:28:52 +02:00
|
|
|
printk(BIOS_DEBUG, "VBE: Getting information about VESA mode %04x\n",
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
mi->video_mode);
|
2013-02-08 23:56:51 +01:00
|
|
|
char *buffer = PTR_TO_REAL_MODE(__realmode_buffer);
|
2011-10-12 23:30:59 +02:00
|
|
|
u16 buffer_seg = (((unsigned long)buffer) >> 4) & 0xff00;
|
|
|
|
u16 buffer_adr = ((unsigned long)buffer) & 0xffff;
|
|
|
|
realmode_interrupt(0x10, VESA_GET_MODE_INFO, 0x0000,
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
mi->video_mode, 0x0000, buffer_seg, buffer_adr);
|
2014-12-24 04:13:34 +01:00
|
|
|
memcpy(mi->mode_info_block, buffer, sizeof(mi->mode_info_block));
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
mode_info_valid = 1;
|
2011-10-12 23:30:59 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
static u8 vbe_set_mode(vbe_mode_info_t * mi)
|
2011-10-12 23:30:59 +02:00
|
|
|
{
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
printk(BIOS_DEBUG, "VBE: Setting VESA mode %04x\n", mi->video_mode);
|
2011-10-12 23:30:59 +02:00
|
|
|
// request linear framebuffer mode
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
mi->video_mode |= (1 << 14);
|
2011-10-12 23:30:59 +02:00
|
|
|
// request clearing of framebuffer
|
oprom: Ensure that mode information is valid before putting it in the tables.
At least when CONFIG_CHROMEOS is turned on, it's possible for
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE to be set but for there not to be any valid
information to put into the framebuffer coreboot table. That means that what's
put in there is junk, probably all zeroes from the uninitialized global
variable the mode information is stored in (mode_info).
When a payload uses libpayload and turns on the coreboot framebuffer console,
that console will attempt to scroll at some point and decrease the cursor's y
coordinate until it is less than the number of rows claimed by the console.
The number of rows is computed by taking the vertical resolution of the
framebuffer and dividing it by the height of the font. Because the mode
information was all zeroes, the coreboot table info is all zeroes, and that
means that the number of rows the console claims is zero. You can't get the
unsigned y coordinate of the cursor to be less than zero, so libpayload gets
stuck in an infinite loop.
The solution this change implements is to add a new function,
vbe_mode_info_valid, which simply returns whether or not mode_info has anything
in it. If not, the framebuffer coreboot table is not created, and libpayload
doesn't get stuck.
Change-Id: I08f3ec628e4453f0cfe9e15c4d8dfd40327f91c9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1758
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-09-30 13:47:48 +02:00
|
|
|
mi->video_mode &= ~(1 << 15);
|
|
|
|
realmode_interrupt(0x10, VESA_SET_MODE, mi->video_mode,
|
2011-10-12 23:30:59 +02:00
|
|
|
0x0000, 0x0000, 0x0000, 0x0000);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* These two functions could probably even be generic between
|
|
|
|
* yabel and x86 native. TBD later.
|
|
|
|
*/
|
|
|
|
void vbe_set_graphics(void)
|
|
|
|
{
|
|
|
|
mode_info.video_mode = (1 << 14) | CONFIG_FRAMEBUFFER_VESA_MODE;
|
|
|
|
vbe_get_mode_info(&mode_info);
|
|
|
|
unsigned char *framebuffer =
|
2011-10-12 23:35:54 +02:00
|
|
|
(unsigned char *)mode_info.vesa.phys_base_ptr;
|
2012-08-29 18:28:52 +02:00
|
|
|
printk(BIOS_DEBUG, "VBE: resolution: %dx%d@%d\n",
|
|
|
|
le16_to_cpu(mode_info.vesa.x_resolution),
|
|
|
|
le16_to_cpu(mode_info.vesa.y_resolution),
|
|
|
|
mode_info.vesa.bits_per_pixel);
|
|
|
|
printk(BIOS_DEBUG, "VBE: framebuffer: %p\n", framebuffer);
|
|
|
|
if (!framebuffer) {
|
|
|
|
printk(BIOS_DEBUG, "VBE: Mode does not support linear "
|
|
|
|
"framebuffer\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-10-12 23:30:59 +02:00
|
|
|
vbe_set_mode(&mode_info);
|
|
|
|
#if CONFIG_BOOTSPLASH
|
|
|
|
struct jpeg_decdata *decdata;
|
Extend CBFS to support arbitrary ROM source media.
Summary:
Isolate CBFS underlying I/O to board/arch-specific implementations as
"media stream", to allow loading and booting romstage on non-x86.
CBFS functions now all take a new "media source" parameter; use
CBFS_DEFAULT_MEDIA if you simply want to load from main firmware.
API Changes:
cbfs_find => cbfs_get_file.
cbfs_find_file => cbfs_get_file_content.
cbfs_get_file => cbfs_get_file_content with correct type.
CBFS used to work only on memory-mapped ROM (all x86). For platforms like ARM,
the ROM may come from USB, UART, or SPI -- any serial devices and not available
for memory mapping.
To support these devices (and allowing CBFS to read from multiple source
at the same time), CBFS operations are now virtual-ized into "cbfs_media". To
simplify porting existing code, every media source must support both "reading
into pre-allocated memory (read)" and "read and return an allocated buffer
(map)". For devices without native memory-mapped ROM, "cbfs_simple_buffer*"
provides simple memory mapping simulation.
Every CBFS function now takes a cbfs_media* as parameter. CBFS_DEFAULT_MEDIA
is defined for CBFS functions to automatically initialize a per-board default
media (CBFS will internally calls init_default_cbfs_media). Also revised CBFS
function names relying on memory mapped backend (ex, "cbfs_find" => actually
loads files). Now we only have two getters:
struct cbfs_file *entry = cbfs_get_file(media, name);
void *data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, name, type);
Test results:
- Verified to work on x86/qemu.
- Compiles on ARM, and follow up commit will provide working SPI driver.
Change-Id: Iac911ded25a6f2feffbf3101a81364625bb07746
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2182
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-01-22 11:57:56 +01:00
|
|
|
unsigned char *jpeg = cbfs_get_file_content(CBFS_DEFAULT_MEDIA,
|
|
|
|
"bootsplash.jpg",
|
2014-01-12 13:45:52 +01:00
|
|
|
CBFS_TYPE_BOOTSPLASH,
|
|
|
|
NULL);
|
2011-10-12 23:30:59 +02:00
|
|
|
if (!jpeg) {
|
2012-08-29 18:28:52 +02:00
|
|
|
printk(BIOS_DEBUG, "VBE: No bootsplash found.\n");
|
2011-10-12 23:30:59 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-07-26 11:32:16 +02:00
|
|
|
decdata = malloc(sizeof(*decdata));
|
2011-10-12 23:30:59 +02:00
|
|
|
int ret = 0;
|
|
|
|
ret = jpeg_decode(jpeg, framebuffer, 1024, 768, 16, decdata);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void vbe_textmode_console(void)
|
|
|
|
{
|
|
|
|
delay(2);
|
|
|
|
realmode_interrupt(0x10, 0x0003, 0x0000, 0x0000,
|
|
|
|
0x0000, 0x0000, 0x0000);
|
|
|
|
}
|
|
|
|
|
|
|
|
void fill_lb_framebuffer(struct lb_framebuffer *framebuffer)
|
|
|
|
{
|
2011-10-12 23:35:54 +02:00
|
|
|
framebuffer->physical_address = mode_info.vesa.phys_base_ptr;
|
2011-10-12 23:30:59 +02:00
|
|
|
|
|
|
|
framebuffer->x_resolution = le16_to_cpu(mode_info.vesa.x_resolution);
|
|
|
|
framebuffer->y_resolution = le16_to_cpu(mode_info.vesa.y_resolution);
|
|
|
|
framebuffer->bytes_per_line =
|
|
|
|
le16_to_cpu(mode_info.vesa.bytes_per_scanline);
|
|
|
|
framebuffer->bits_per_pixel = mode_info.vesa.bits_per_pixel;
|
|
|
|
|
|
|
|
framebuffer->red_mask_pos = mode_info.vesa.red_mask_pos;
|
|
|
|
framebuffer->red_mask_size = mode_info.vesa.red_mask_size;
|
|
|
|
|
|
|
|
framebuffer->green_mask_pos = mode_info.vesa.green_mask_pos;
|
|
|
|
framebuffer->green_mask_size = mode_info.vesa.green_mask_size;
|
|
|
|
|
|
|
|
framebuffer->blue_mask_pos = mode_info.vesa.blue_mask_pos;
|
|
|
|
framebuffer->blue_mask_size = mode_info.vesa.blue_mask_size;
|
|
|
|
|
|
|
|
framebuffer->reserved_mask_pos = mode_info.vesa.reserved_mask_pos;
|
|
|
|
framebuffer->reserved_mask_size = mode_info.vesa.reserved_mask_size;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-08-11 23:28:25 +02:00
|
|
|
void run_bios(struct device *dev, unsigned long addr)
|
|
|
|
{
|
2010-05-11 17:39:20 +02:00
|
|
|
u32 num_dev = (dev->bus->secondary << 8) | dev->path.pci.devfn;
|
|
|
|
|
2011-10-12 23:35:54 +02:00
|
|
|
/* Setting up required hardware.
|
|
|
|
* Removing this will cause random illegal instruction exceptions
|
|
|
|
* in some option roms.
|
|
|
|
*/
|
|
|
|
setup_i8259();
|
|
|
|
|
2010-05-11 17:39:20 +02:00
|
|
|
/* Set up some legacy information in the F segment */
|
|
|
|
setup_rombios();
|
2009-12-23 20:16:47 +01:00
|
|
|
|
2009-08-11 23:28:25 +02:00
|
|
|
/* Set up C interrupt handlers */
|
|
|
|
setup_interrupt_handlers();
|
|
|
|
|
2010-05-11 17:39:20 +02:00
|
|
|
/* Set up real-mode IDT */
|
2009-08-11 23:28:25 +02:00
|
|
|
setup_realmode_idt();
|
|
|
|
|
2013-02-08 23:56:51 +01:00
|
|
|
/* Make sure the code is placed. */
|
|
|
|
setup_realmode_code();
|
2009-08-11 23:28:25 +02:00
|
|
|
|
|
|
|
printk(BIOS_DEBUG, "Calling Option ROM...\n");
|
2010-05-11 17:39:20 +02:00
|
|
|
/* TODO ES:DI Pointer to System BIOS PnP Installation Check Structure */
|
|
|
|
/* Option ROM entry point is at OPROM start + 3 */
|
|
|
|
realmode_call(addr + 0x0003, num_dev, 0xffff, 0x0000, 0xffff, 0x0, 0x0);
|
2009-08-11 23:28:25 +02:00
|
|
|
printk(BIOS_DEBUG, "... Option ROM returned.\n");
|
2011-10-12 23:30:59 +02:00
|
|
|
|
|
|
|
#if CONFIG_FRAMEBUFFER_SET_VESA_MODE
|
2013-02-08 17:48:20 +01:00
|
|
|
if ((dev->class >> 8)== PCI_CLASS_DISPLAY_VGA)
|
|
|
|
vbe_set_graphics();
|
2011-10-12 23:30:59 +02:00
|
|
|
#endif
|
2009-08-11 23:28:25 +02:00
|
|
|
}
|
|
|
|
|
2011-04-21 22:45:45 +02:00
|
|
|
#if CONFIG_GEODE_VSA
|
2010-04-21 22:06:10 +02:00
|
|
|
|
|
|
|
#define VSA2_BUFFER 0x60000
|
|
|
|
#define VSA2_ENTRY_POINT 0x60020
|
|
|
|
|
|
|
|
// TODO move to a header file.
|
|
|
|
void do_vsmbios(void);
|
|
|
|
|
|
|
|
/* VSA virtual register helper */
|
|
|
|
static u32 VSA_vrRead(u16 classIndex)
|
|
|
|
{
|
|
|
|
u32 eax, ebx, ecx, edx;
|
|
|
|
asm volatile (
|
|
|
|
"movw $0x0AC1C, %%dx\n"
|
|
|
|
"orl $0x0FC530000, %%eax\n"
|
|
|
|
"outl %%eax, %%dx\n"
|
|
|
|
"addb $2, %%dl\n"
|
|
|
|
"inw %%dx, %%ax\n"
|
2010-04-27 08:56:47 +02:00
|
|
|
: "=a" (eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
|
2010-04-21 22:06:10 +02:00
|
|
|
: "a"(classIndex)
|
|
|
|
);
|
|
|
|
|
|
|
|
return eax;
|
|
|
|
}
|
|
|
|
|
|
|
|
void do_vsmbios(void)
|
|
|
|
{
|
|
|
|
printk(BIOS_DEBUG, "Preparing for VSA...\n");
|
|
|
|
|
|
|
|
/* Set up C interrupt handlers */
|
|
|
|
setup_interrupt_handlers();
|
|
|
|
|
|
|
|
/* Setting up realmode IDT */
|
|
|
|
setup_realmode_idt();
|
|
|
|
|
2013-02-08 23:56:51 +01:00
|
|
|
/* Make sure the code is placed. */
|
|
|
|
setup_realmode_code();
|
2010-04-21 22:06:10 +02:00
|
|
|
|
Extend CBFS to support arbitrary ROM source media.
Summary:
Isolate CBFS underlying I/O to board/arch-specific implementations as
"media stream", to allow loading and booting romstage on non-x86.
CBFS functions now all take a new "media source" parameter; use
CBFS_DEFAULT_MEDIA if you simply want to load from main firmware.
API Changes:
cbfs_find => cbfs_get_file.
cbfs_find_file => cbfs_get_file_content.
cbfs_get_file => cbfs_get_file_content with correct type.
CBFS used to work only on memory-mapped ROM (all x86). For platforms like ARM,
the ROM may come from USB, UART, or SPI -- any serial devices and not available
for memory mapping.
To support these devices (and allowing CBFS to read from multiple source
at the same time), CBFS operations are now virtual-ized into "cbfs_media". To
simplify porting existing code, every media source must support both "reading
into pre-allocated memory (read)" and "read and return an allocated buffer
(map)". For devices without native memory-mapped ROM, "cbfs_simple_buffer*"
provides simple memory mapping simulation.
Every CBFS function now takes a cbfs_media* as parameter. CBFS_DEFAULT_MEDIA
is defined for CBFS functions to automatically initialize a per-board default
media (CBFS will internally calls init_default_cbfs_media). Also revised CBFS
function names relying on memory mapped backend (ex, "cbfs_find" => actually
loads files). Now we only have two getters:
struct cbfs_file *entry = cbfs_get_file(media, name);
void *data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, name, type);
Test results:
- Verified to work on x86/qemu.
- Compiles on ARM, and follow up commit will provide working SPI driver.
Change-Id: Iac911ded25a6f2feffbf3101a81364625bb07746
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2182
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-01-22 11:57:56 +01:00
|
|
|
if ((unsigned int)cbfs_load_stage(CBFS_DEFAULT_MEDIA, "vsa") !=
|
|
|
|
VSA2_ENTRY_POINT) {
|
2010-04-21 22:06:10 +02:00
|
|
|
printk(BIOS_ERR, "Failed to load VSA.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned char *buf = (unsigned char *)VSA2_BUFFER;
|
|
|
|
printk(BIOS_DEBUG, "VSA: Buffer @%p *[0k]=%02x\n", buf, buf[0]);
|
|
|
|
printk(BIOS_DEBUG, "VSA: Signature *[0x20-0x23] is %02x:%02x:%02x:%02x\n",
|
|
|
|
buf[0x20], buf[0x21], buf[0x22], buf[0x23]);
|
|
|
|
|
|
|
|
/* Check for code to emit POST code at start of VSA. */
|
|
|
|
if ((buf[0x20] != 0xb0) || (buf[0x21] != 0x10) ||
|
|
|
|
(buf[0x22] != 0xe6) || (buf[0x23] != 0x80)) {
|
|
|
|
printk(BIOS_WARNING, "VSA: Signature incorrect. Install failed.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
printk(BIOS_DEBUG, "Calling VSA module...\n");
|
2010-05-11 17:39:20 +02:00
|
|
|
|
2010-04-21 22:06:10 +02:00
|
|
|
/* ECX gets SMM, EDX gets SYSMEM */
|
2011-10-31 20:56:45 +01:00
|
|
|
realmode_call(VSA2_ENTRY_POINT, 0x0, 0x0, MSR_GLIU0_SMM,
|
2010-05-11 17:39:20 +02:00
|
|
|
MSR_GLIU0_SYSMEM, 0x0, 0x0);
|
|
|
|
|
2010-04-21 22:06:10 +02:00
|
|
|
printk(BIOS_DEBUG, "... VSA module returned.\n");
|
|
|
|
|
|
|
|
/* Restart timer 1 */
|
|
|
|
outb(0x56, 0x43);
|
|
|
|
outb(0x12, 0x41);
|
|
|
|
|
|
|
|
/* Check that VSA is running OK */
|
|
|
|
if (VSA_vrRead(SIGNATURE) == VSA2_SIGNATURE)
|
|
|
|
printk(BIOS_DEBUG, "VSM: VSA2 VR signature verified.\n");
|
|
|
|
else
|
|
|
|
printk(BIOS_ERR, "VSM: VSA2 VR signature not valid. Install failed.\n");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-04-27 08:56:47 +02:00
|
|
|
/* interrupt_handler() is called from assembler code only,
|
2010-04-21 22:06:10 +02:00
|
|
|
* so there is no use in putting the prototype into a header file.
|
|
|
|
*/
|
2012-12-06 22:54:29 +01:00
|
|
|
int asmlinkage interrupt_handler(u32 intnumber,
|
2009-10-27 22:49:33 +01:00
|
|
|
u32 gsfs, u32 dses,
|
|
|
|
u32 edi, u32 esi,
|
|
|
|
u32 ebp, u32 esp,
|
|
|
|
u32 ebx, u32 edx,
|
|
|
|
u32 ecx, u32 eax,
|
|
|
|
u32 cs_ip, u16 stackflags);
|
|
|
|
|
2012-12-06 22:54:29 +01:00
|
|
|
int asmlinkage interrupt_handler(u32 intnumber,
|
2009-08-11 23:28:25 +02:00
|
|
|
u32 gsfs, u32 dses,
|
|
|
|
u32 edi, u32 esi,
|
|
|
|
u32 ebp, u32 esp,
|
|
|
|
u32 ebx, u32 edx,
|
|
|
|
u32 ecx, u32 eax,
|
|
|
|
u32 cs_ip, u16 stackflags)
|
|
|
|
{
|
|
|
|
u32 ip;
|
|
|
|
u32 cs;
|
|
|
|
u32 flags;
|
2012-11-22 10:48:18 +01:00
|
|
|
int ret = 0;
|
2009-08-11 23:28:25 +02:00
|
|
|
|
|
|
|
ip = cs_ip & 0xffff;
|
|
|
|
cs = cs_ip >> 16;
|
|
|
|
flags = stackflags;
|
|
|
|
|
2010-09-08 00:30:15 +02:00
|
|
|
#if CONFIG_REALMODE_DEBUG
|
2009-08-11 23:28:25 +02:00
|
|
|
printk(BIOS_DEBUG, "oprom: INT# 0x%x\n", intnumber);
|
|
|
|
printk(BIOS_DEBUG, "oprom: eax: %08x ebx: %08x ecx: %08x edx: %08x\n",
|
|
|
|
eax, ebx, ecx, edx);
|
|
|
|
printk(BIOS_DEBUG, "oprom: ebp: %08x esp: %08x edi: %08x esi: %08x\n",
|
|
|
|
ebp, esp, edi, esi);
|
|
|
|
printk(BIOS_DEBUG, "oprom: ip: %04x cs: %04x flags: %08x\n",
|
|
|
|
ip, cs, flags);
|
2010-09-08 00:30:15 +02:00
|
|
|
#endif
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2012-11-22 12:46:12 +01:00
|
|
|
// Fetch arguments from the stack and put them to a place
|
|
|
|
// suitable for the interrupt handlers
|
|
|
|
X86_EAX = eax;
|
|
|
|
X86_ECX = ecx;
|
|
|
|
X86_EDX = edx;
|
|
|
|
X86_EBX = ebx;
|
|
|
|
X86_ESP = esp;
|
|
|
|
X86_EBP = ebp;
|
|
|
|
X86_ESI = esi;
|
|
|
|
X86_EDI = edi;
|
|
|
|
M.x86.intno = intnumber;
|
|
|
|
/* TODO: error_code must be stored somewhere */
|
|
|
|
X86_EIP = ip;
|
|
|
|
X86_CS = cs;
|
|
|
|
X86_EFLAGS = flags;
|
2009-08-11 23:28:25 +02:00
|
|
|
|
|
|
|
// Call the interrupt handler for this int#
|
2012-11-22 12:46:12 +01:00
|
|
|
ret = intXX_handler[intnumber]();
|
2009-08-11 23:28:25 +02:00
|
|
|
|
|
|
|
// Put registers back on the stack. The assembler code
|
|
|
|
// will later pop them.
|
|
|
|
// What happens here is that we force (volatile!) changing
|
|
|
|
// the values of the parameters of this function. We do this
|
2010-04-27 08:56:47 +02:00
|
|
|
// because we know that they stay alive on the stack after
|
2009-08-11 23:28:25 +02:00
|
|
|
// we leave this function. Don't say this is bollocks.
|
2012-11-22 12:46:12 +01:00
|
|
|
*(volatile u32 *)&eax = X86_EAX;
|
|
|
|
*(volatile u32 *)&ecx = X86_ECX;
|
|
|
|
*(volatile u32 *)&edx = X86_EDX;
|
|
|
|
*(volatile u32 *)&ebx = X86_EBX;
|
|
|
|
*(volatile u32 *)&esi = X86_ESI;
|
|
|
|
*(volatile u32 *)&edi = X86_EDI;
|
|
|
|
flags = X86_EFLAGS;
|
2009-08-11 23:28:25 +02:00
|
|
|
|
2012-11-22 10:48:18 +01:00
|
|
|
/* Pass success or error back to our caller via the CARRY flag */
|
2009-08-11 23:28:25 +02:00
|
|
|
if (ret) {
|
2012-11-22 10:48:18 +01:00
|
|
|
flags &= ~1; // no error: clear carry
|
|
|
|
}else{
|
2010-04-22 20:15:32 +02:00
|
|
|
printk(BIOS_DEBUG,"int%02x call returned error.\n", intnumber);
|
2009-08-11 23:28:25 +02:00
|
|
|
flags |= 1; // error: set carry
|
|
|
|
}
|
|
|
|
*(volatile u16 *)&stackflags = flags;
|
|
|
|
|
2012-11-22 10:48:18 +01:00
|
|
|
/* The assembler code doesn't actually care for the return value,
|
|
|
|
* but keep it around so its expectations are met */
|
2009-08-11 23:28:25 +02:00
|
|
|
return ret;
|
|
|
|
}
|