Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1042
-gerrit
commit 5e0503e0511dd37377917d874d2afd7ae41efdea
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue May 15 12:36:57 2012 -0700
Move subsystem IDs to devicetree.cb
A while back coreboot was changed to read the subsystem IDs from
devicetree.cb to allow each onboard PCI device to have its own
subsystem id. When we originally branched, this was not the case,
and the sandybridge/ivybridge mainboards have not been updated yet.
Also, drop the subsystem ID from Emerald Lake 2, since it's not a
Google device.
Change-Id: Ie96fd67cd2ff65ad6ff725914e3bad843e78712e
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/mainboard/intel/emeraldlake2/Kconfig | 8 --------
src/mainboard/samsung/lumpy/Kconfig | 8 --------
src/mainboard/samsung/lumpy/devicetree.cb | 1 +
src/mainboard/samsung/stumpy/Kconfig | 8 --------
src/mainboard/samsung/stumpy/devicetree.cb | 1 +
5 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/src/mainboard/intel/emeraldlake2/Kconfig b/src/mainboard/intel/emeraldlake2/Kconfig
index 9e4f347..873d273 100644
--- a/src/mainboard/intel/emeraldlake2/Kconfig
+++ b/src/mainboard/intel/emeraldlake2/Kconfig
@@ -43,12 +43,4 @@ config VGA_BIOS_FILE
string
default "pci8086,0166.rom"
-config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
- hex
- default 0x1ae0
-
-config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
- hex
- default 0xc000
-
endif # BOARD_INTEL_EMERALDLAKE2
diff --git a/src/mainboard/samsung/lumpy/Kconfig b/src/mainboard/samsung/lumpy/Kconfig
index 200edac..0835012 100644
--- a/src/mainboard/samsung/lumpy/Kconfig
+++ b/src/mainboard/samsung/lumpy/Kconfig
@@ -44,14 +44,6 @@ config VGA_BIOS_FILE
string
default "pci8086,0106.rom"
-config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
- hex
- default 0x1ae0
-
-config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
- hex
- default 0xc000
-
config MAINBOARD_POWER_ON_AFTER_POWER_FAIL
bool
default n
diff --git a/src/mainboard/samsung/lumpy/devicetree.cb b/src/mainboard/samsung/lumpy/devicetree.cb
index 36af1ca..3e93df4 100644
--- a/src/mainboard/samsung/lumpy/devicetree.cb
+++ b/src/mainboard/samsung/lumpy/devicetree.cb
@@ -33,6 +33,7 @@ chip northbridge/intel/sandybridge
end
device pci_domain 0 on
+ subsystemid 0x1ae0 0xc000 inherit
device pci 00.0 on end # host bridge
device pci 02.0 on end # vga controller
diff --git a/src/mainboard/samsung/stumpy/Kconfig b/src/mainboard/samsung/stumpy/Kconfig
index dda3002..18094cf 100644
--- a/src/mainboard/samsung/stumpy/Kconfig
+++ b/src/mainboard/samsung/stumpy/Kconfig
@@ -43,14 +43,6 @@ config VGA_BIOS_FILE
string
default "pci8086,0106.rom"
-config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
- hex
- default 0x1ae0
-
-config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
- hex
- default 0xc000
-
config MAINBOARD_POWER_ON_AFTER_POWER_FAIL
bool
default n
diff --git a/src/mainboard/samsung/stumpy/devicetree.cb b/src/mainboard/samsung/stumpy/devicetree.cb
index f10b283..b59dcb2 100644
--- a/src/mainboard/samsung/stumpy/devicetree.cb
+++ b/src/mainboard/samsung/stumpy/devicetree.cb
@@ -28,6 +28,7 @@ chip northbridge/intel/sandybridge
end
device pci_domain 0 on
+ subsystemid 0x1ae0 0xc000 inherit
device pci 00.0 on end # host bridge
device pci 02.0 on end # vga controller
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1043
-gerrit
commit 01b7d0786bc78115af3fd03727a2c48a3243468e
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue May 15 13:28:07 2012 -0700
Implement %zu / %zd in printk
The SPI drivers from u-boot make heavy use of %zu/%zd (size_t/ssize_t).
Implement this in our printk implementation so we get useful output.
Change-Id: I91798ff4f28b9c3cd4db204c7ec503596d247dcd
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/console/vtxprintf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index a370e5f..28c5a60 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -170,7 +170,7 @@ repeat:
/* get the conversion qualifier */
qualifier = -1;
- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'z') {
qualifier = *fmt;
++fmt;
if (*fmt == 'l') {
@@ -218,7 +218,6 @@ repeat:
field_width, precision, flags);
continue;
-
case 'n':
if (qualifier == 'L') {
long long *ip = va_arg(args, long long *);
@@ -265,6 +264,8 @@ repeat:
num = va_arg(args, unsigned long long);
} else if (qualifier == 'l') {
num = va_arg(args, unsigned long);
+ } else if (qualifier == 'z') {
+ num = va_arg(args, size_t);
} else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags & SIGN)
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1040
-gerrit
commit 595f2fcfb7492fa40b1a63acb0fb882d1fec0d73
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon May 14 13:21:08 2012 -0700
Fix size_t for certain versions of GCC
When compiling coreboot with the latest ChromeOS toolchain, GCC
complains that some printk calls use %zu in connection with size_t
types since it resolves the typedefs to long unsigned int.
The problem is solved by using the GCC built-in __SIZE_TYPE__ if it
exists and define __SIZE_TYPE__ to long unsigned int otherwise.
Change-Id: I449c3d385b5633a05e57204704e981de6e017b86
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/arch/x86/include/stddef.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/arch/x86/include/stddef.h b/src/arch/x86/include/stddef.h
index e4fc019..c737be1 100644
--- a/src/arch/x86/include/stddef.h
+++ b/src/arch/x86/include/stddef.h
@@ -2,7 +2,10 @@
#define I386_STDDEF_H
typedef long ptrdiff_t;
-typedef unsigned long size_t;
+#ifndef __SIZE_TYPE__
+#define __SIZE_TYPE__ long unsigned int
+#endif
+typedef __SIZE_TYPE__ size_t;
typedef long ssize_t;
typedef int wchar_t;
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1052
-gerrit
commit bafd5dc6ffc803ee5497d92ff83bb70245d2ca9a
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Wed May 23 14:20:18 2012 -0700
ChromeOS: Remove remnants of FDT support
Originally, on ChromeBooks, coreboot would provide a modified
u-boot device tree (FDT) to u-boot in CBMEM. However, u-boot
can now create all the information it needs from the coreboot
table and add it to its device tree itself. This means we can
drop this (anyways unused) code.
Change-Id: I4ab20bbb8525e7349b18764aa202bbe81958d06a
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/vendorcode/google/chromeos/gnvs.c | 42 ---------------------------------
src/vendorcode/google/chromeos/gnvs.h | 1 -
2 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 6b545f4..024dbf8 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -34,48 +34,6 @@ void chromeos_init_vboot(chromeos_acpi_t *chromeos)
memcpy(vboot_data->mehh, me_hash_saved, sizeof(vboot_data->mehh));
}
-void chromeos_set_vboot_data_ptr(void *blob)
-{
- /* This code has to be rewritten to pass the vboot table
- * pointer through the coreboot table instead of the
- * FDT, since FDT support was rejected upstream. For now
- * just make the code available for reference.
- */
-#if 0 // CONFIG_ADD_FDT
- int node_offset, addr_cell_len;
- const u32 *cell;
- uintptr_t table_addr = (uintptr_t)vboot_data;
- u32 table_addr32;
- u64 table_addr64;
- void *table_ptr;
-
- cell = fdt_getprop(blob, 0, "#address-cells", NULL);
- if (cell && *cell == 2) {
- addr_cell_len = 8;
- table_addr64 = cpu_to_fdt64(table_addr);
- table_ptr = &table_addr64;
- } else {
- addr_cell_len = 4;
- table_addr32 = cpu_to_fdt32(table_addr);
- table_ptr = &table_addr32;
- }
-
- node_offset = fdt_path_offset(blob, "/chromeos-config");
- if (node_offset < 0) {
- printk(BIOS_ERR,
- "Couldn't find /chromeos-config in the fdt.\n");
- return;
- }
-
- if (fdt_setprop(blob, node_offset, "gnvs-vboot-table",
- table_ptr, addr_cell_len) < 0) {
- printk(BIOS_ERR, "Couldn't set gnvs-vboot-table.\n");
- }
-#else
- printk(BIOS_ERR, "Can't set gnvs-vboot-table.\n");
-#endif
-}
-
void chromeos_set_me_hash(u32 *hash, int len)
{
if ((len*sizeof(u32)) > sizeof(vboot_data->mehh))
diff --git a/src/vendorcode/google/chromeos/gnvs.h b/src/vendorcode/google/chromeos/gnvs.h
index 36922ba..6dd740f 100644
--- a/src/vendorcode/google/chromeos/gnvs.h
+++ b/src/vendorcode/google/chromeos/gnvs.h
@@ -63,7 +63,6 @@ typedef struct {
extern chromeos_acpi_t *vboot_data;
void chromeos_init_vboot(chromeos_acpi_t *chromeos);
-void chromeos_set_vboot_data_ptr(void *);
void chromeos_set_me_hash(u32*, int);
#endif
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1050
-gerrit
commit edda0ffb213997d523b86ed230e200fa79fa0779
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Thu May 17 17:21:27 2012 -0700
Fix full reset for Ivy Bridge platforms
Experiments have shown that writing plain value of 6 at byte io
address of 0xcf9 causes the systems to reset and reboot reliably.
Change-Id: Ie900e4b4014cded868647372b027918b7ff72578
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/southbridge/intel/bd82x6x/reset.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/src/southbridge/intel/bd82x6x/reset.c b/src/southbridge/intel/bd82x6x/reset.c
index 29b69ff..5324142 100644
--- a/src/southbridge/intel/bd82x6x/reset.c
+++ b/src/southbridge/intel/bd82x6x/reset.c
@@ -26,16 +26,7 @@ void soft_reset(void)
outb(0x04, 0xcf9);
}
-#if 0
void hard_reset(void)
{
- /* Try rebooting through port 0xcf9. */
- outb((1 << 2) | (1 << 1), 0xcf9);
-}
-#endif
-
-void hard_reset(void)
-{
- outb(0x02, 0xcf9);
outb(0x06, 0xcf9);
}
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1051
-gerrit
commit f38818871e7fe1f046ac100f11f364335a7acd4d
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Wed May 23 14:16:47 2012 -0700
Sandybridge: Remove remnants of FDT support from MRC cache code
Originally, ChromeBooks would get the offset of the MRC cache
from an entry in the u-boot device tree. Not everyone wants to
use u-boot on Sandybridge systems, however.
Since the new code (based on Kconfig) is now fully working, we
can drop the u-boot device tree remnants.
Change-Id: I4e012ea981f16dce9a4d155254facd29874b28ef
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/northbridge/intel/sandybridge/mrccache.c | 80 ++++----------------------
1 files changed, 11 insertions(+), 69 deletions(-)
diff --git a/src/northbridge/intel/sandybridge/mrccache.c b/src/northbridge/intel/sandybridge/mrccache.c
index aad2b91..d774ff0 100644
--- a/src/northbridge/intel/sandybridge/mrccache.c
+++ b/src/northbridge/intel/sandybridge/mrccache.c
@@ -28,19 +28,6 @@
#include "sandybridge.h"
#include <spi.h>
#include <spi_flash.h>
-/* Using the FDT FMAP for finding the MRC cache area requires including FDT
- * support in coreboot, which we would like to avoid. There are a number of
- * options:
- * - Have each mainboard Kconfig supply a hard-coded offset
- * - For ChromeOS devices: implement native FMAP
- * - For non-ChromeOS devices: use CBFS
- * For now let's leave this code in here until the issue is sorted out in
- * a way that works for everyone.
- */
-#undef USE_FDT_FMAP_FOR_MRC_CACHE
-#ifdef USE_FDT_FMAP_FOR_MRC_CACHE
-#include <fdt/libfdt.h>
-#endif
struct mrc_data_container *next_mrc_block(struct mrc_data_container *mrc_cache)
{
@@ -61,64 +48,19 @@ int is_mrc_cache(struct mrc_data_container *mrc_cache)
return (!!mrc_cache) && (mrc_cache->mrc_signature == MRC_DATA_SIGNATURE);
}
+/* Right now, the offsets for the MRC cache area are hard-coded in the
+ * northbridge Kconfig. In order to make this more flexible, there are
+ * a number of options:
+ * - Have each mainboard Kconfig supply a hard-coded offset
+ * - For ChromeOS devices: implement native FMAP
+ * - For non-ChromeOS devices: use CBFS
+ */
u32 get_mrc_cache_region(struct mrc_data_container **mrc_region_ptr)
{
- u8 *mrc_region;
- u32 region_size;
-#ifdef USE_FDT_FMAP_FOR_MRC_CACHE
- u32 *data;
- const struct fdt_header *fdt_header;
- const struct fdt_property *fdtp;
- int offset, len;
- const char *compatible = "chromeos,flashmap";
- const char *subnode = "rw-mrc-cache";
- const char *property = "reg";
- u64 flashrom_base = 0;
-
- fdt_header = cbfs_find_file(CONFIG_FDT_FILE_NAME, CBFS_TYPE_FDT);
-
- if (!fdt_header) {
- printk(BIOS_ERR, "%s: no FDT found!\n", __func__);
- return 0;
- }
-
- offset = fdt_node_offset_by_compatible(fdt_header, 0, compatible);
- if (offset < 0) {
- printk(BIOS_ERR, "%s: no %s node found!\n",
- __func__, compatible);
- return 0;
- }
-
- if (fdt_get_base_addr(fdt_header, offset, &flashrom_base) < 0) {
- printk(BIOS_ERR, "%s: no base address in node name!\n",
- __func__);
- return 0;
- }
-
- offset = fdt_subnode_offset(fdt_header, offset, subnode);
- if (offset < 0) {
- printk(BIOS_ERR, "%s: no %s found!\n", __func__, subnode);
- return 0;
- }
-
- fdtp = fdt_get_property(fdt_header, offset, property, &len);
- if (!fdtp || (len != 8)) {
- printk(BIOS_ERR, "%s: property %s at %p, len %d!\n",
- __func__, property, fdtp, len);
- return 0;
- }
-
- data = (u32 *)fdtp->data;
-
- // Calculate actual address of the MRC cache in memory
- region_size = fdt32_to_cpu(data[1]);
- mrc_region = (u8*)((unsigned long)flashrom_base + fdt32_to_cpu(data[0]));
-#else
- region_size = CONFIG_MRC_CACHE_SIZE;
- mrc_region = (u8*)(CONFIG_MRC_CACHE_BASE + CONFIG_MRC_CACHE_LOCATION);
-#endif
- *mrc_region_ptr = (struct mrc_data_container *)mrc_region;
+ u32 region_size = CONFIG_MRC_CACHE_SIZE;
+ *mrc_region_ptr = (struct mrc_data_container *)
+ (CONFIG_MRC_CACHE_BASE + CONFIG_MRC_CACHE_LOCATION);
return region_size;
}
@@ -182,7 +124,7 @@ struct mrc_data_container *find_current_mrc_cache(void)
entry_id++;
mrc_cache = mrc_next;
mrc_next = next_mrc_block(mrc_cache);
- /* Stay in the mrcdata region defined in fdt */
+ /* Stay in the mrc data region */
if ((void*)mrc_next >= (void*)(mrc_region + region_size))
break;
}