Beispiel #1
0
void bamboo_init(void)
{
	platform_ops.fixups = bamboo_fixups;
	platform_ops.exit = ibm44x_dbcr_reset;
	ft_init(_dtb_start, 0, 32);
	serial_console_init();
}
Beispiel #2
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
	CUBOOT_INIT();
	ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
	serial_console_init();
	platform_ops.fixups = platform_fixups;
}
Beispiel #3
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
{
	u32 heapsize = 0x8000000 - (u32)_end; /* 128M */

	simple_alloc_init(_end, heapsize, 32, 64);
	fdt_init(_dtb_start);
	serial_console_init();
}
Beispiel #4
0
static int __init early_printk_setup(char* arg) 
{ 
 /* early printk only works for serial ports now */ 
 console_setup(arg); 
 serial_console_init(); 
 
 printk( "early printk enabled \n" ); 
 return 1; 
} 
Beispiel #5
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
           unsigned long r6, unsigned long r7)
{
    CUBOOT_INIT();

    platform_ops.fixups = katmai_fixups;
    fdt_init(_dtb_start);
    serial_console_init();
}
Beispiel #6
0
void bamboo_init(void *mac0, void *mac1)
{
	platform_ops.fixups = bamboo_fixups;
	platform_ops.exit = ibm44x_dbcr_reset;
	bamboo_mac0 = mac0;
	bamboo_mac1 = mac1;
	fdt_init(_dtb_start);
	serial_console_init();
}
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
	CUBOOT_INIT();
	platform_ops.fixups = sequoia_fixups;
	platform_ops.exit = ibm44x_dbcr_reset;
	fdt_init(_dtb_start);
	serial_console_init();
}
Beispiel #8
0
void ebony_init(void *mac0, void *mac1)
{
	platform_ops.fixups = ebony_fixups;
	platform_ops.exit = ibm44x_dbcr_reset;
	ebony_mac0 = mac0;
	ebony_mac1 = mac1;
	fdt_init(_dtb_start);
	serial_console_init();
}
#include <stdarg.h>
#include <stddef.h>
#include "types.h"
#include "elf.h"
#include "string.h"
#include "stdio.h"
#include "page.h"
#include "ops.h"
#include "reg.h"
#include "io.h"
#include "dcr.h"
#include "4xx.h"
#include "44x.h"
#include "libfdt.h"

BSS_STACK(4096);

static void iss_4xx_fixups(void)
{
	ibm4xx_sdram_fixup_memsize();
}

#define SPRN_PIR	0x11E	/* Processor Indentification Register */
void platform_init(void)
{
	unsigned long end_of_ram = 0x08000000;
	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
	u32 pir_reg;

	simple_alloc_init(_end, avail_ram, 128, 64);
	platform_ops.fixups = iss_4xx_fixups;
	platform_ops.exit = ibm44x_dbcr_reset;
	pir_reg = mfspr(SPRN_PIR);
	fdt_set_boot_cpuid_phys(_dtb_start, pir_reg);
	fdt_init(_dtb_start);
	serial_console_init();
}
Beispiel #10
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
			unsigned long r6, unsigned long r7)
{
	CUBOOT_INIT();

	fdt_init(_dtb_start);

	bridge_base = mv64x60_get_bridge_base();

	platform_ops.fixups = c2k_fixups;
	platform_ops.exit = c2k_reset;

	if (serial_console_init() < 0)
		exit();
}
Beispiel #11
0
void console_init(void)
{
#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
	video_console_init();
#endif
#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
	serial_console_init();
#endif
#if IS_ENABLED(CONFIG_LP_PC_KEYBOARD)
	keyboard_init();
#endif
#if IS_ENABLED(CONFIG_LP_CBMEM_CONSOLE)
	cbmem_console_init();
#endif
}
Beispiel #12
0
void epapr_platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
			 unsigned long r6, unsigned long r7)
{
	epapr_magic = r6;
	ima_size = r7;
	fdt_addr = r3;

	/* FIXME: we should process reserve entries */

	simple_alloc_init(_end, ima_size - (unsigned long)_end, 32, 64);

	fdt_init((void *)fdt_addr);

	serial_console_init();
	platform_ops.fixups = platform_fixups;
}
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
	mem_size = 64 * 1024 * 1024;

	simple_alloc_init(_end, mem_size - (u32)_end - 1024*1024, 32, 64);

	fdt_init(_dtb_start);
	serial_console_init();

	printf("\n\r-- TL-WDR4900 v1 boot wrapper --\n\r");

	process_boot_dtb((void *) r3);

	platform_ops.fixups = platform_fixups;
}
Beispiel #14
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
	unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize;
	unsigned long avail_ram = end_of_ram - (unsigned long)_end;

	memcpy(&bd, (bd_t *)r3, sizeof(bd));
	loader_info.initrd_addr = r4;
	loader_info.initrd_size = r4 ? r5 - r4 : 0;
	loader_info.cmdline = (char *)r6;
	loader_info.cmdline_len = r7 - r6;

	simple_alloc_init(_end, avail_ram - 1024*1024, 32, 64);
	ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
	serial_console_init();
	platform_ops.fixups = platform_fixups;
}
Beispiel #15
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
    table = (char *)r3;
    planetcore_prepare_table(table);

    if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
        return;

    mem_size *= 1024 * 1024;
    simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);

    fdt_init(_dtb_start);

    planetcore_set_stdout_path(table);

    serial_console_init();
    platform_ops.fixups = platform_fixups;
}
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                   unsigned long r6, unsigned long r7)
{
	memcpy(&bd, (char *)r3, sizeof(bd));

	if (bd.bi_tag != 0x42444944)
		return;

	simple_alloc_init(_end,
	                  bd.bi_memstart + bd.bi_memsize - (unsigned long)_end,
	                  32, 64);

	fdt_init(_dtb_start);
	serial_console_init();
	platform_ops.fixups = platform_fixups;

	loader_info.cmdline = (char *)bd.bi_cmdline;
	loader_info.cmdline_len = strlen((char *)bd.bi_cmdline);
}
Beispiel #17
0
int main(void)
{
	NetbootParam *param;

	// Initialize some consoles.
	serial_console_init();
	cbmem_console_init();
	video_console_init();
	input_init();

	printf("\n\nStarting netboot on " CONFIG_BOARD "...\n");

	timestamp_init();

	if (run_init_funcs())
		halt();

	// Make sure graphics are available if they aren't already.
	enable_graphics();

	dc_usb_initialize();

	srand(timer_raw_value());

	printf("Looking for network device... ");
	while (!net_get_device())
		usb_poll();
	printf("done.\n");

	printf("Waiting for link... ");
	int ready = 0;
	while (!ready) {
		if (net_ready(&ready))
			halt();
	}
	mdelay(200);	// some dongles need more time than they think
	printf("done.\n");

	// Start up the network stack.
	uip_init();

	// Plug in the MAC address.
	const uip_eth_addr *mac_addr = net_get_mac();
	if (!mac_addr)
		halt();
	printf("MAC: ");
	print_mac_addr(mac_addr);
	printf("\n");
	uip_setethaddr(*mac_addr);

	// Find out who we are.
	uip_ipaddr_t my_ip, next_ip, server_ip;
	const char *dhcp_bootfile;
	while (dhcp_request(&next_ip, &server_ip, &dhcp_bootfile))
		printf("Dhcp failed, retrying.\n");

	printf("My ip is ");
	uip_gethostaddr(&my_ip);
	print_ip_addr(&my_ip);
	printf("\nThe DHCP server ip is ");
	print_ip_addr(&server_ip);
	printf("\n");

	// Retrieve settings from the shared data area.
	FmapArea shared_data;
	if (fmap_find_area("SHARED_DATA", &shared_data)) {
		printf("Couldn't find the shared data area.\n");
		halt();
	}
	void *data = flash_read(shared_data.offset, shared_data.size);
	netboot_params_init(data, shared_data.size);

	// Get TFTP server IP and file name from params with DHCP as fallback
	uip_ipaddr_t *tftp_ip = NULL;
	param = netboot_params_val(NetbootParamIdTftpServerIp);
	if (param->data && param->size >= sizeof(uip_ipaddr_t)) {
		tftp_ip = (uip_ipaddr_t *)param->data;
		printf("TFTP server IP set from firmware parameters: ");
	} else {
		tftp_ip = &next_ip;
		printf("TFTP server IP supplied by DHCP server: ");
	}
	print_ip_addr(tftp_ip);
	printf("\n");

	const char *bootfile = NULL;
	param = netboot_params_val(NetbootParamIdBootfile);
	if (param->data && param->size > 0 && strnlen((const char *)param->data,
			param->size) < param->size) {
		bootfile = (const char *)param->data;
		printf("Bootfile set from firmware parameters: %s\n", bootfile);
	} else {
		bootfile = dhcp_bootfile;
		printf("Bootfile supplied by DHCP server: %s\n", bootfile);
	}

	// Download the bootfile.
	uint32_t size;
	if (tftp_read(payload, tftp_ip, bootfile, &size, MaxPayloadSize)) {
		printf("Tftp failed.\n");
		if (dhcp_release(server_ip))
			printf("Dhcp release failed.\n");
		halt();
	}
	printf("The bootfile was %d bytes long.\n", size);

	// Use command line from params when present (added to the default).
	param = netboot_params_val(NetbootParamIdKernelArgs);
	if (param->data && param->size > 0 && *(char *)param->data != '\0') {
		cmd_line[sizeof(def_cmd_line) - 1] = ' ';
		strncpy(&cmd_line[sizeof(def_cmd_line)], param->data,
			sizeof(cmd_line) - sizeof(def_cmd_line));
		printf("Command line set from firmware parameters.\n");
	// Otherwise, try to fetch it dynamically as a TFTP file.
	} else if (!(tftp_read(cmd_line, tftp_ip, "cmdline." CONFIG_BOARD,
			       &size, sizeof(cmd_line) - 1))) {
		while (cmd_line[size - 1] <= ' ')  // strip trailing whitespace
			if (!--size) break;	   // and control chars (\n, \r)
		cmd_line[size] = '\0';
		while (size--)			   // replace inline control
			if (cmd_line[size] < ' ')  // chars with spaces
				cmd_line[size] = ' ';
		printf("Command line loaded dynamically from TFTP server.\n");
	// If the file doesn't exist, finally fall back to built-in default.
	} else {
		printf("No command line from TFTP, falling back to default.\n");
	}
	cmd_line[sizeof(cmd_line) - 1] = '\0';

	// We're done on the network, so release our IP.
	if (dhcp_release(server_ip)) {
		printf("Dhcp release failed.\n");
		halt();
	}

	// Add tftp server IP into command line.
	static const char def_tftp_cmdline[] = " tftpserverip=xxx.xxx.xxx.xxx";
	const int tftp_cmdline_def_size = sizeof(def_tftp_cmdline) - 1;
	int cmd_line_size = strlen(cmd_line);
	if (cmd_line_size + tftp_cmdline_def_size >= sizeof(cmd_line)) {
		printf("Out of space adding TFTP server IP to the command line.\n");
		return 1;
	}
	sprintf(&cmd_line[cmd_line_size], " tftpserverip=%d.%d.%d.%d",
		uip_ipaddr1(tftp_ip), uip_ipaddr2(tftp_ip),
		uip_ipaddr3(tftp_ip), uip_ipaddr4(tftp_ip));
	printf("The command line is: %s\n", cmd_line);

	// Boot.
	boot(payload, cmd_line, NULL, NULL);

	// We should never get here.
	printf("Got to the end!\n");
	halt();
	return 0;
}
Beispiel #18
0
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
		   unsigned long r6, unsigned long r7)
{
	const u32 *na, *ns, *reg, *timebase;
	u64 memsize64;
	int node, size, i;
	void *the_dtb = _dtb_start;

	/* See if we were passed a DTB in the regs.  If so, use that instead */
	if (fdt_check_header((void *)r3) == 0)
		the_dtb = (void *)r3;

	/* Make sure FDT blob is sane */
	if (fdt_check_header(the_dtb) != 0)
		fatal("Invalid device tree blob\n");

	/* Find the #address-cells and #size-cells properties */
	node = fdt_path_offset(the_dtb, "/");
	if (node < 0)
		fatal("Cannot find root node\n");
	na = fdt_getprop(the_dtb, node, "#address-cells", &size);
	if (!na || (size != 4))
		fatal("Cannot find #address-cells property");
	ns = fdt_getprop(the_dtb, node, "#size-cells", &size);
	if (!ns || (size != 4))
		fatal("Cannot find #size-cells property");

	/* Find the memory range */
	node = fdt_node_offset_by_prop_value(the_dtb, -1, "device_type",
					     "memory", sizeof("memory"));
	if (node < 0)
		fatal("Cannot find memory node\n");
	reg = fdt_getprop(the_dtb, node, "reg", &size);
	if (size < (*na+*ns) * sizeof(u32))
		fatal("cannot get memory range\n");

	/* Only interested in memory based at 0 */
	for (i = 0; i < *na; i++)
		if (*reg++ != 0)
			fatal("Memory range is not based at address 0\n");

	/* get the memsize and trucate it to under 4G on 32 bit machines */
	memsize64 = 0;
	for (i = 0; i < *ns; i++)
		memsize64 = (memsize64 << 32) | *reg++;
	if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL)
		memsize64 = 0xffffffff;

	/* finally, setup the timebase */
	node = fdt_node_offset_by_prop_value(the_dtb, -1, "device_type",
					     "cpu", sizeof("cpu"));
	if (!node)
		fatal("Cannot find cpu node\n");
	timebase = fdt_getprop(the_dtb, node, "timebase-frequency", &size);
	if (timebase && (size == 4))
		timebase_period_ns = 1000000000 / *timebase;

	/* Now we have the memory size; initialize the heap */
	simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64);

	/* prepare the device tree and find the console */
	fdt_init(the_dtb);

	if (platform_specific_init)
		platform_specific_init();

	serial_console_init();
}
Beispiel #19
0
int main(void)
{	
	//uint8_t status;
	
	#if SAMG55
	/* Initialize the SAM system. */
	sysclk_init();
	board_init();
	#elif SAM0
	system_init();
	#endif

	//button_init();
	
	platform_driver_init();
	acquire_sleep_lock();
	
	/* Initialize serial console */
	serial_console_init();

	/* Initialize button */
	//button_init(button_cb);

	/* Initialize the hardware timer */
	hw_timer_init();

	/* Register the callback */
	hw_timer_register_callback(timer_callback_handler);

	/* initialize the BLE chip  and Set the device mac address */
	ble_device_init(NULL);
	
	/* Initialize the battery service */
	//bat_init_service(&bas_service_handler, &battery_level);	

	/* Define the primary service in the GATT server database */
	/*if((status = bat_primary_service_define(&bas_service_handler))!= AT_BLE_SUCCESS)
	{
		DBG_LOG("defining battery service failed %d", status);
	}*/
	
	//battery_set_advertisement_data();
	
	/* Register callbacks for gap related events */ 
	/*ble_mgr_events_callback_handler(REGISTER_CALL_BACK,
									BLE_GAP_EVENT_TYPE,
									battery_app_gap_cb);*/
									
	/* Register callbacks for gatt server related events */
	/*ble_mgr_events_callback_handler(REGISTER_CALL_BACK,
									BLE_GATT_SERVER_EVENT_TYPE,
									battery_app_gatt_server_cb);*/
	
	pxp_monitor_init(NULL);

	DBG_LOG("Initializing Perception Central Application");

	/* Initialize the pxp service */
	pxp_app_init();
	
	register_hw_timer_start_func_cb((hw_timer_start_func_cb_t)hw_timer_start);
	register_hw_timer_stop_func_cb(hw_timer_stop);
	//register_peripheral_state_cb(peripheral_advertising_cb);

	while (1) {
		/* BLE Event Task */
		ble_event_task(BLE_EVENT_TIMEOUT);
		
		/*if (button_pressed)
		{
			uint8_t idx;
			uint8_t connected_to_central = false;
			for (idx = 0; idx < BLE_MAX_DEVICE_CONNECTED; idx++ )
			{
				if(ble_check_iscentral(ble_dev_info[idx].conn_info.handle))
				{
					at_ble_disconnect(ble_dev_info[idx].conn_info.handle, AT_BLE_TERMINATED_BY_USER);
					connected_to_central = true;
					break;
				}
			}
			if (connected_to_central == false)
			{
				at_ble_scan_stop();
				pxp_monitor_start_scan();
			}
			button_pressed = false;
						
		}*/
		
		//battery_simulation_task(NULL);

		/* Application Task */
		if (app_timer_done) {
			if (pxp_connect_request_flag == PXP_DEV_CONNECTING) {
				at_ble_disconnected_t pxp_connect_request_fail;
				pxp_connect_request_fail.reason
					= AT_BLE_TERMINATED_BY_USER;
				pxp_connect_request_fail.handle = ble_dev_info[0].conn_info.handle;
				pxp_connect_request_flag = PXP_DEV_UNCONNECTED;
				if (at_ble_connect_cancel() == AT_BLE_SUCCESS) {
					DBG_LOG("Connection Timeout");
					pxp_disconnect_event_handler(
							&pxp_connect_request_fail);
				} else {
					DBG_LOG(
							"Unable to connect with device");
				}
			} /*else if (pxp_connect_request_flag == PXP_DEV_SERVICE_FOUND) {
				rssi_update(ble_dev_info[0].conn_info.handle);
				hw_timer_start(PXP_RSSI_UPDATE_INTERVAL);
			}*/ /*else if (pxp_connect_request_flag == PXP_DEV_UNCONNECTED) {
				if(	peripheral_state == PERIPHERAL_ENCRYPTION_STATE 
					||peripheral_state == PERIPHERAL_PAIRED_STATE) {
					hw_timer_start(BATTERY_UPDATE_INTERVAL);
					DBG_LOG("BATTERY_UPDATE_INTERVAL TIMER");
				}
			}*/

			app_timer_done = false;
		}
	}
}
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
		   unsigned long r6, unsigned long r7)
{
	const u32 *na, *ns, *reg, *timebase;
	u64 memsize64;
	int node, size, i;

	/*                            */
	if (fdt_check_header(_dtb_start) != 0)
		fatal("Invalid device tree blob\n");

	/*                                                    */
	node = fdt_path_offset(_dtb_start, "/");
	if (node < 0)
		fatal("Cannot find root node\n");
	na = fdt_getprop(_dtb_start, node, "#address-cells", &size);
	if (!na || (size != 4))
		fatal("Cannot find #address-cells property");
	ns = fdt_getprop(_dtb_start, node, "#size-cells", &size);
	if (!ns || (size != 4))
		fatal("Cannot find #size-cells property");

	/*                       */
	node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
					     "memory", sizeof("memory"));
	if (node < 0)
		fatal("Cannot find memory node\n");
	reg = fdt_getprop(_dtb_start, node, "reg", &size);
	if (size < (*na+*ns) * sizeof(u32))
		fatal("cannot get memory range\n");

	/*                                      */
	for (i = 0; i < *na; i++)
		if (*reg++ != 0)
			fatal("Memory range is not based at address 0\n");

	/*                                                               */
	memsize64 = 0;
	for (i = 0; i < *ns; i++)
		memsize64 = (memsize64 << 32) | *reg++;
	if (sizeof(void *) == 4 && memsize64 >= 0x100000000ULL)
		memsize64 = 0xffffffff;

	/*                             */
	node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
					     "cpu", sizeof("cpu"));
	if (!node)
		fatal("Cannot find cpu node\n");
	timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size);
	if (timebase && (size == 4))
		timebase_period_ns = 1000000000 / *timebase;

	/*                                                  */
	simple_alloc_init(_end, memsize64 - (unsigned long)_end, 32, 64);

	/*                                              */
	fdt_init(_dtb_start);

	if (platform_specific_init)
		platform_specific_init();

	serial_console_init();
}
Beispiel #21
0
/**
 * Entry point called from boot.S for bootstrap processor.
 */
void arch_init(uint32_t     board_id,
               struct atag *atag_base,
               lvaddr_t     elf_file,
               lvaddr_t     alloc_top)
{
    //
    // Assumptions:
    //
    // - MMU and caches are enabled. No lockdowns in caches or TLB.
    // - Kernel has own section starting at KERNEL_OFFSET.
    // - Kernel section includes the highmem relocated exception vector table.
    //


    struct atag * ae = NULL;

    exceptions_init();

    ae = atag_find(atag_base, ATAG_MEM);
    paging_map_memory(0, ae->u.mem.start, ae->u.mem.bytes);

    ae = atag_find(atag_base, ATAG_CMDLINE);
    if (ae != NULL)
    {
        parse_commandline(ae->u.cmdline.cmdline, cmdargs);
        tick_hz = CONSTRAIN(tick_hz, 10, 1000);
    }

    if (board_id == hal_get_board_id())
    {
        errval_t errval;

        serial_console_init(true);

        // do not remove/change this printf: needed by regression harness
        printf("Barrelfish CPU driver starting on ARMv5 Board id 0x%08"PRIx32"\n",
               board_id);
        printf("The address of paging_map_kernel_section is %p\n", 
               paging_map_kernel_section);
        errval = serial_debug_init();
        if (err_is_fail(errval))
        {
            printf("Failed to initialize debug port: %d", serial_debug_port);
        }

        debug(SUBSYS_STARTUP, "alloc_top %08"PRIxLVADDR" %08"PRIxLVADDR"\n",
               alloc_top, alloc_top - KERNEL_OFFSET);
        debug(SUBSYS_STARTUP, "elf_file %08"PRIxLVADDR"\n", elf_file);

        my_core_id = hal_get_cpu_id();
        extern struct kcb bspkcb;
        memset(&bspkcb, 0, sizeof(bspkcb));
        kcb_current = &bspkcb;
        
        pic_init();
        pit_init(tick_hz);
        tsc_init();

        ae = atag_find(atag_base, ATAG_MEM);
                
        // Add unused physical memory to memory map

        phys_mmap_t phys_mmap;

        // Kernel effectively consumes [0...alloc_top]
        // Add region above alloc_top with care to skip exception vector
        // page.
        if (alloc_top < ETABLE_ADDR) {
            phys_mmap_add(&phys_mmap,
                          alloc_top - KERNEL_OFFSET,
                          ETABLE_ADDR - KERNEL_OFFSET);
        }

        phys_mmap_add(&phys_mmap,
                      ETABLE_ADDR - KERNEL_OFFSET + BASE_PAGE_SIZE,
                      ae->u.mem.start + ae->u.mem.bytes);

        ae = atag_find(atag_base, ATAG_VIDEOLFB);
        if (NULL != ae)
        {
            // Remove frame buffer (if present).
            phys_mmap_remove(&phys_mmap,
                             ae->u.videolfb.lfb_base,
                             ae->u.videolfb.lfb_base + ae->u.videolfb.lfb_size);
            assert(!"Not supported");
        }

        ae = atag_find(atag_base, ATAG_INITRD2);
        if (NULL != ae)
        {
            phys_mmap_remove(&phys_mmap,
                             ae->u.initrd2.start,
                             ae->u.initrd2.start + ae->u.initrd2.bytes);

            arm_kernel_startup(&phys_mmap,
                               ae->u.initrd2.start,
                               ae->u.initrd2.bytes);
        }
        else {
            panic("initrd not found\n");
        }
    }
    else {
        panic("Mis-matched board id: [current %"PRIu32", kernel %"PRIu32"]",
              board_id, hal_get_board_id());
    }
}