]>
git.saurik.com Git - apple/boot.git/blob - i386/libsa/memory.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 #ifndef __BOOT_MEMORY_H
26 #define __BOOT_MEMORY_H
28 /* Memory addresses used by booter and friends */
30 /* These are all "virtual" addresses...
31 * which are physical addresses plus MEMBASE.
37 #define BIOS_ADDR 0x000C00 // BIOS buffer
38 #define BIOS_LEN 0x002400 // 9k
39 #define BOOTER_LOAD_ADDR 0x003000 // loaded here for compat.
40 #define BOOTER_ADDR 0x003000 // start of booter code
41 #define BOOTER_LEN 0x00B000
42 #define STACK_ADDR 0x00FFF0
43 #define BOOTSTRUCT_ADDR 0x011000
44 #define BOOTSTRUCT_LEN 0x00F000 // it's slightly smaller
45 #define EISA_CONFIG_ADDR 0x020000
46 #define EISA_CONFIG_LEN 0x010000
47 #define RLD_ADDR 0x030000
48 #define RLD_LEN 0x070000
49 #define VIDEO_ADDR 0x0A0000 // unusable space
50 #define VIDEO_LEN 0x060000
51 #define KERNEL_ADDR 0x100000
52 #define KERNEL_LEN 0x400000
53 #define RLD_MEM_ADDR 0x500000
54 #define RLD_MEM_LEN 0x100000
55 #define ZALLOC_ADDR 0x600000
56 #define ZALLOC_LEN 0x100000
57 #define MODULE_ADDR 0x700000 // to be used for compression..
58 #define MODULE_LEN 0x080000
59 #define KSYM_ADDR 0x780000
60 #define KSYM_LEN 0x080000 // 512k
61 #define TFTP_ADDR 0x800000 // 8MB
62 #define TFTP_LEN 0x400000 // 4MB buffer size
64 /* these are physical values */
66 #define CONVENTIONAL_LEN 0x0A0000 // 640k
67 #define EXTENDED_ADDR 0x100000 // 1024k
68 #define KERNEL_BOOT_ADDR KERNEL_ADDR /* load at 1Mb */
70 #define SAIO_TABLE_POINTER (BOOTER_ADDR + SAIO_TABLE_PTR_OFFSET)
71 #define SAIO_TABLE_PTR_OFFSET 0x30
73 #define ptov(paddr) ((paddr) - MEMBASE)
74 #define vtop(vaddr) ((vaddr) + MEMBASE)
77 * Limits to the size of various things...
80 /* We need a minimum of 12Mb of system memory. */
81 #define MIN_SYS_MEM_KB (12 * 1024)
83 #endif /* !__BOOT_MEMORY_H */