File: layout.h

package info (click to toggle)
quik 2.1-9.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 772 kB
  • ctags: 969
  • sloc: ansic: 3,813; asm: 524; makefile: 105; perl: 74; sh: 43
file content (59 lines) | stat: -rw-r--r-- 2,164 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * layout.h - definitions for where the 1st and 2nd stage bootstraps
 * go in memory and the structures they use to communicate.
 *
 * Copyright (C) 1996 Paul Mackerras
 *
 * 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.
 */

#define VERSION		"3.0"

#define FIRST_BASE	0x3f4000 /* dec: 4145152 */
#define FIRST_SIZE	0x400 /* dec: 1024 */

#define SECOND_BASE	0x3b0000 /* dec: 3866624 */
#define SECOND_SIZE	0x40000 /* dec: 262144 max size of second.b */

#define SECOND_MAP_BASE 0x3efc00 /* Last 1K of SECOND's memory range,
					which we can overwrite on last
					transfer if needed */
#define SECOND_MAP_SIZE	0x400 /* dec: 1024 */

#define STACK_TOP	0x400000 /* dec: 4194304 */

/* 0x400000 - 0x500000 is one of OF's favourite places to be. */

/* We malloc in low memory now and load kernel at 0x500000 instead, we
 * also map 64MB with BATs. This is all done to help loading larger
 * kernels. --BenH.
 */
#define MALLOC_BASE	0x300000 /* dec: 3145728 */

#ifndef __ASSEMBLY__
struct first_info {
    char	quik_vers[8];
    int		nblocks; /* blocks in second.b */
    int		blocksize;
    unsigned	second_base;
    unsigned	second_map_base; /* load address of second.map */
    int		conf_part;
    char	conf_file[32];
    unsigned	blknos[1]; /* block used for second.map */
};
#endif	/* __ASSEMBLY__ */

/*
 * If you change FIRST_SIZE or sizeof(struct first_info),
 * be sure to change the definition of FIRST_INFO_OFF.
 */
#define FIRST_INFO_OFF	0x2c8	/* was FIRST_SIZE - sizeof(struct first_info) */
                                /* now it is stuck because openbios           */
                                /* for qemu hardcoded it rather than just     */
                                /* booting the bootable partition and I       */
                                /* don't know how the openbios forth code     */
                                /* works well enough to fix it.               */
#define FIRST_INFO	(FIRST_BASE + FIRST_INFO_OFF)