Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: lib/chromeos/os_storage.c

Issue 6804009: HACK: Pass data from firmware to kernel (Closed) Base URL: ssh://gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « arch/arm/lib/bootm.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/chromeos/os_storage.c
diff --git a/lib/chromeos/os_storage.c b/lib/chromeos/os_storage.c
index b3bec425d094e04d334ef548e669b1353e72659c..c80ce043c286c02daabb2267c74bc10dac9535d0 100644
--- a/lib/chromeos/os_storage.c
+++ b/lib/chromeos/os_storage.c
@@ -214,5 +214,34 @@ EXIT:
(int) params->bootloader_size);
}
+ /*
+ * TODO(clchiou): This is an urgent hack for bringing up factory. We
+ * fill in data that will be used by kernel at last 1MB space.
+ *
+ * Rewrite this part after the protocol specification between
+ * Chrome OS firmware and kernel is finalized.
+ */
+ if (status == LOAD_KERNEL_SUCCESS) {
+ DECLARE_GLOBAL_DATA_PTR;
+
+ struct kernel_shared_data {
+ uint32_t chsw;
+ uint8_t hwid[256];
+ uint32_t fwid;
rongchang 2011/04/06 11:52:04 fwid & frid are asciiz too
Che-Liang Chiou 2011/04/07 11:17:32 Done.
+ uint32_t frid;
+ uint32_t binf[4];
rongchang 2011/04/06 11:52:04 binf[5]
Che-Liang Chiou 2011/04/07 11:17:32 Done.
+ uint32_t gpio;
rongchang 2011/04/06 11:52:04 gpio[11]
Che-Liang Chiou 2011/04/07 11:17:32 Done.
+ uint32_t vbnv[2];
+ uint64_t fmap_start_address;
+ } __attributed__((packed)) *sd;
+ sd = (struct kernel_shared_data*) (
+ gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS-1].start +
+ gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS-1].size -
+ SZ_1M);
+
+ /* TODO fill in shared data */
+ memset(sd, '\0', sizeof(*sd));
+ }
+
return status;
}
« no previous file with comments | « arch/arm/lib/bootm.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698