2 * Mikrotik's RouterBOOT definitions
4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
17 struct rb_bios_settings
{
18 u32 hs_offs
; /* hard settings offset */
19 u32 hs_size
; /* hard settings size */
20 u32 fw_offs
; /* firmware offset */
21 u32 ss_offs
; /* soft settings offset */
22 u32 ss_size
; /* soft settings size */
25 struct rb_hard_settings
{
26 char *name
; /* board name */
27 char *bios_ver
; /* BIOS version */
28 u32 mem_size
; /* memory size in bytes */
29 u32 mac_count
; /* number of mac addresses */
30 u8
*mac_base
; /* mac address base */
36 #define RB_MAGIC_HARD 0x64726148 /* "Hard" */
37 #define RB_MAGIC_SOFT 0x74666F53 /* "Soft" */
38 #define RB_MAGIC_DAWN 0x6E776144 /* "Dawn" */
40 #define RB_ID_TERMINATOR 0
43 * ID values for Hardware settings
45 #define RB_ID_HARD_01 1
46 #define RB_ID_HARD_02 2
47 #define RB_ID_FLASH_INFO 3
48 #define RB_ID_MAC_ADDRESS_PACK 4
49 #define RB_ID_BOARD_NAME 5
50 #define RB_ID_BIOS_VERSION 6
51 #define RB_ID_HARD_07 7
52 #define RB_ID_SDRAM_TIMINGS 8
53 #define RB_ID_DEVICE_TIMINGS 9
54 #define RB_ID_SOFTWARE_ID 10
55 #define RB_ID_SERIAL_NUMBER 11
56 #define RB_ID_HARD_12 12
57 #define RB_ID_MEMORY_SIZE 13
58 #define RB_ID_MAC_ADDRESS_COUNT 14
61 * ID values for Software settings
63 #define RB_ID_UART_SPEED 1
64 #define RB_ID_BOOT_DELAY 2
65 #define RB_ID_BOOT_DEVICE 3
66 #define RB_ID_BOOT_KEY 4
67 #define RB_ID_CPU_MODE 5
68 #define RB_ID_FW_VERSION 6
69 #define RB_ID_SOFT_07 7
70 #define RB_ID_SOFT_08 8
71 #define RB_ID_BOOT_PROTOCOL 9
72 #define RB_ID_SOFT_10 10
73 #define RB_ID_SOFT_11 11
78 #define RB_UART_SPEED_115200 0
79 #define RB_UART_SPEED_57600 1
80 #define RB_UART_SPEED_38400 2
81 #define RB_UART_SPEED_19200 3
82 #define RB_UART_SPEED_9600 4
83 #define RB_UART_SPEED_4800 5
84 #define RB_UART_SPEED_2400 6
85 #define RB_UART_SPEED_1200 7
90 #define RB_BOOT_DELAY_0SEC 0
91 #define RB_BOOT_DELAY_1SEC 1
92 #define RB_BOOT_DELAY_2SEC 2
97 #define RB_BOOT_DEVICE_ETHER 0
98 #define RB_BOOT_DEVICE_NANDETH 1
99 #define RB_BOOT_DEVICE_ETHONCE 2
100 #define RB_BOOT_DEVICE_NANDONLY 3
105 #define RB_BOOT_KEY_ANY 0
106 #define RB_BOOT_KEY_DEL 1
111 #define RB_CPU_MODE_POWERSAVE 0
112 #define RB_CPU_MODE_REGULAR 1
115 * BOOT_PROTOCOL values
117 #define RB_BOOT_PROTOCOL_BOOTP 0
118 #define RB_BOOT_PROTOCOL_DHCP 1
120 extern int routerboot_present(void) __init
;
121 extern char *routerboot_get_boardname(void);
123 extern struct rb_hard_settings rb_hs
;
125 #endif /* _ROUTERBOOT_H */
This page took 0.051232 seconds and 5 git commands to generate.