A while back I sent a fix for the MCP55 azalia driver which prevented
coreboot from hanging and at the same time allowed per-board Azalia
VERBs. The attached patch implements per-board VERBs for all MCP55
boards, and as I don't have the correct VERBs for all boards, uses the
default MCP55 VERB for all of them.
Stefan
Author: stepan
Date: Sun May 30 15:44:32 2010
New Revision: 5600
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5600
Log:
don't generate C source code file but use objcopy to include the SMM blob.
Signed-off-by: Stefan Reinauer <stepan(a)coresystems.de>
Acked-by: Stefan Reinauer <stepan(a)coresystems.de>
Modified:
trunk/src/cpu/x86/smm/Makefile.inc
trunk/src/southbridge/intel/i82801dx/i82801dx_smi.c
trunk/src/southbridge/intel/i82801gx/i82801gx_smi.c
Modified: trunk/src/cpu/x86/smm/Makefile.inc
==============================================================================
--- trunk/src/cpu/x86/smm/Makefile.inc Sun May 30 14:56:17 2010 (r5599)
+++ trunk/src/cpu/x86/smm/Makefile.inc Sun May 30 15:44:32 2010 (r5600)
@@ -1,12 +1,11 @@
##
## This file is part of the coreboot project.
##
-## Copyright (C) 2008 coresystems GmbH
+## Copyright (C) 2008-2010 coresystems GmbH
##
## 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; either version 2 of the License, or
-## (at your option) any later version.
+## 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
@@ -19,7 +18,7 @@
##
obj-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.o
-obj-$(CONFIG_HAVE_SMI_HANDLER) += smm_bin.o
+obj-$(CONFIG_HAVE_SMI_HANDLER) += smm_wrap.o
smmobj-y += smmhandler.o
smmobj-y += smihandler.o
@@ -33,10 +32,9 @@
$(NM) -n $(obj)/cpu/x86/smm/smm.elf | sort > $(obj)/cpu/x86/smm/smm.map
$(OBJCOPY) -O binary $(obj)/cpu/x86/smm/smm.elf $(obj)/cpu/x86/smm/smm
-$(obj)/cpu/x86/smm/smm_bin.c: $(obj)/cpu/x86/smm/smm
- (echo 'unsigned char smm[] = {'; od -vtx1 $(obj)/cpu/x86/smm/smm | sed -e 's,^[0-9]* *,,' -e 's:[0-9a-f][0-9a-f] :0x&,:g' -e 's:[0-9a-f][0-9a-f]$$:0x&,:'; echo '}; unsigned int smm_len = '; wc -c $(obj)/cpu/x86/smm/smm |awk '{print $$1;}' ; echo ';') > $@
-
-$(obj)/cpu/x86/smm/smm_bin.o: $(obj)/cpu/x86/smm/smm_bin.c
- @printf " CC $(subst $(obj)/,,$(@))\n"
- $(CC) $(CFLAGS) -c -o $@ $<
+# change to the target path because objcopy will use the path name in its
+# ELF symbol names.
+$(obj)/cpu/x86/smm/smm_wrap.o: $(obj)/cpu/x86/smm/smm
+ @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
+ cd $(obj)/cpu/x86/smm; $(OBJCOPY) -I binary smm -O elf32-i386 -B i386 smm_wrap.o
Modified: trunk/src/southbridge/intel/i82801dx/i82801dx_smi.c
==============================================================================
--- trunk/src/southbridge/intel/i82801dx/i82801dx_smi.c Sun May 30 14:56:17 2010 (r5599)
+++ trunk/src/southbridge/intel/i82801dx/i82801dx_smi.c Sun May 30 15:44:32 2010 (r5600)
@@ -30,8 +30,8 @@
#include <string.h>
#include "i82801dx.h"
-extern unsigned char smm[];
-extern unsigned int smm_len;
+extern unsigned char _binary_smm_start;
+extern unsigned char _binary_smm_size;
/* I945 */
#define SMRAM 0x90
@@ -325,7 +325,7 @@
D_OPEN | G_SMRAME | C_BASE_SEG);
/* copy the real SMM handler */
- memcpy((void *)0xa0000, smm, smm_len);
+ memcpy((void *)0xa0000, &_binary_smm_start, (size_t)&_binary_smm_size);
wbinvd();
/* close the SMM memory window and enable normal SMM */
Modified: trunk/src/southbridge/intel/i82801gx/i82801gx_smi.c
==============================================================================
--- trunk/src/southbridge/intel/i82801gx/i82801gx_smi.c Sun May 30 14:56:17 2010 (r5599)
+++ trunk/src/southbridge/intel/i82801gx/i82801gx_smi.c Sun May 30 15:44:32 2010 (r5600)
@@ -30,8 +30,8 @@
#include <string.h>
#include "i82801gx.h"
-extern unsigned char smm[];
-extern unsigned int smm_len;
+extern unsigned char _binary_smm_start;
+extern unsigned char _binary_smm_size;
/* I945 */
#define SMRAM 0x9d
@@ -325,7 +325,7 @@
D_OPEN | G_SMRAME | C_BASE_SEG);
/* copy the real SMM handler */
- memcpy((void *)0xa0000, smm, smm_len);
+ memcpy((void *)0xa0000, &_binary_smm_start, (size_t)&_binary_smm_size);
wbinvd();
/* close the SMM memory window and enable normal SMM */
On 05/28/2010 10:13 PM, Nils wrote:
> Oliver wrote:
>
>> I know of the MTD driver yes, I did actually disable it in my kernel
>> that I built using openwrt 'doh'. Could you give me more information
>> int his regard?
>>
> I also don`t know that much about it,sorry.
> At one point i used an openwrt squashfs? image and that worked but was
> missing some drivers.
>
Well I get it all to work, just from USB and not MTD/IDE :)
>> What flash is being used though, something from the board? Or is the
>> IDE disk used as an MTD device?
>>
> As far as i know the flashboard is a MTD device.
> You have to be careful with write access for the operating system
> because the write and erase cycles are limited.
> It is not an real ide disk.
>
Well the docs mention there's 2 ports, and it is either flash, or IDE
based on a bios setting. The real question is, what is the mini-IDE port
wired too. I'll look up the specs of the chip and try to follow some
lines and maybe I can see. Probably not.
I actually got a Transcend 1GB Disk on Chip module; It has firmware and
everything, I think it's like a compact flash device, but since I
haven't been able to access it via the IDE port; I don't know. If it is
an MTD device, I suppose hdparm/smartctl won't work on an mtd device.
>> I get a message from the pata_cs5536 driver that IDE is disabled by
>> the bios; and of course no option to enable it.
>>
> I use linux kernel 2.6.24 witch is the only one i found that works
> with the flashboard with ide driver.(maybe a bug in 2.6.24?)
> I wil send you my config.
> I use it on a 2.5` laptop hdd connected to the ide port.
> I wil also send you a working version of coreboot + seabios you can
> play with.
> It is configured for ide.
> You wil need the geode video driver in the kernel to see something.
> Or you could use a serial connection.
> Beware there are some issues most notably loading fallback/coreboot_ram
> takes ~35 seconds so you have to be a little patience while booting.
>
> Nils
>
>
Hmm, maybe 2.6.24 does do something? I'll try to confirm it on 2.6.24
(maybe it's only an option?) and then bisect/diff with a more recent
kernel to see if they changed something.
That coreboot image sounds _Very_ interesting, would I be able to build
it myself? That file you sent me, is coreboot +seabios elf image
combined so 'ready' but without any video output until the kernel is
loaded? So the only way to choose a different boot option would be via
serial console? How about USB keyboard support; that in there as well?
As our S*0's only speak usb and not ps/2 :)
I guess i just flash it and I'm 'done', no VSA or video rom needs to be
added?
Oliver
Yes two of there boards, but what is your point? The board you asked about was ASUS, E2938. Do you also have another board?
Mvh Anders
----- Reply message -----
Fra: "am kara" <am_kara(a)yahoo.com>
Dato: søn., maj 30, 2010 08:57
Emne: Re [coreboot] Will coreboot work on my machine?
Til: "anders(a)jenbo.dk" <anders(a)jenbo.dk>