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

Side by Side Diff: arch/arm/lib/bootm.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/chromeos/os_storage.c » ('j') | lib/chromeos/os_storage.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) Copyright 2002 2 * (C) Copyright 2002
3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de> 4 * Marius Groeger <mgroeger@sysgo.de>
5 * 5 *
6 * Copyright (C) 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) 6 * Copyright (C) 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
(...skipping 12 matching lines...) Expand all
23 23
24 #include <common.h> 24 #include <common.h>
25 #include <command.h> 25 #include <command.h>
26 #include <image.h> 26 #include <image.h>
27 #include <u-boot/zlib.h> 27 #include <u-boot/zlib.h>
28 #include <asm/byteorder.h> 28 #include <asm/byteorder.h>
29 #include <fdt.h> 29 #include <fdt.h>
30 #include <libfdt.h> 30 #include <libfdt.h>
31 #include <fdt_support.h> 31 #include <fdt_support.h>
32 32
33 /*
34 * TODO(clchiou): This is an urgent hack for bringing up factory. We need to
35 * enable setup memory tags.
36 *
37 * Remove this part or move to config headers after the protocol specification
38 * between Chrome OS firmware and kernel is finalized.
39 */
40 #ifndef CONFIG_SETUP_MEMORY_TAGS
41 #define CONFIG_SETUP_MEMORY_TAGS
42 #endif
43
33 DECLARE_GLOBAL_DATA_PTR; 44 DECLARE_GLOBAL_DATA_PTR;
34 45
35 #if defined (CONFIG_SETUP_MEMORY_TAGS) || \ 46 #if defined (CONFIG_SETUP_MEMORY_TAGS) || \
36 defined (CONFIG_CMDLINE_TAG) || \ 47 defined (CONFIG_CMDLINE_TAG) || \
37 defined (CONFIG_INITRD_TAG) || \ 48 defined (CONFIG_INITRD_TAG) || \
38 defined (CONFIG_SERIAL_TAG) || \ 49 defined (CONFIG_SERIAL_TAG) || \
39 defined (CONFIG_REVISION_TAG) 50 defined (CONFIG_REVISION_TAG)
40 static void setup_start_tag (bd_t *bd); 51 static void setup_start_tag (bd_t *bd);
41 52
42 # ifdef CONFIG_SETUP_MEMORY_TAGS 53 # ifdef CONFIG_SETUP_MEMORY_TAGS
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 { 271 {
261 int i; 272 int i;
262 273
263 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { 274 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
264 params->hdr.tag = ATAG_MEM; 275 params->hdr.tag = ATAG_MEM;
265 params->hdr.size = tag_size (tag_mem32); 276 params->hdr.size = tag_size (tag_mem32);
266 277
267 params->u.mem.start = bd->bi_dram[i].start; 278 params->u.mem.start = bd->bi_dram[i].start;
268 params->u.mem.size = bd->bi_dram[i].size; 279 params->u.mem.size = bd->bi_dram[i].size;
269 280
281 /*
282 * TODO(clchiou): This is an urgent hack for bringing up
283 * factory. Here we reserve 1MB static area for passing data
284 * from firmware to kernel.
285 *
286 * Rewrite this part after the protocol specification between
287 * Chrome OS firmware and kernel is finalized.
288 */
289 if (i == CONFIG_NR_DRAM_BANKS - 1)
290 params->u.mem.size -= SZ_1M;
291
270 params = tag_next (params); 292 params = tag_next (params);
271 } 293 }
272 } 294 }
273 #endif /* CONFIG_SETUP_MEMORY_TAGS */ 295 #endif /* CONFIG_SETUP_MEMORY_TAGS */
274 296
275 297
276 static void setup_commandline_tag (bd_t *bd, char *commandline) 298 static void setup_commandline_tag (bd_t *bd, char *commandline)
277 { 299 {
278 char *p; 300 char *p;
279 301
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 402
381 static ulong get_sp(void) 403 static ulong get_sp(void)
382 { 404 {
383 ulong ret; 405 ulong ret;
384 406
385 asm("mov %0, sp" : "=r"(ret) : ); 407 asm("mov %0, sp" : "=r"(ret) : );
386 return ret; 408 return ret;
387 } 409 }
388 410
389 #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */ 411 #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
OLDNEW
« no previous file with comments | « no previous file | lib/chromeos/os_storage.c » ('j') | lib/chromeos/os_storage.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698