Index: boot/arch/sparc32/include/ambapp.h
===================================================================
--- boot/arch/sparc32/include/ambapp.h	(revision 80d9d8391bc56eab2b15e4a28cb1562b86e17ea6)
+++ boot/arch/sparc32/include/ambapp.h	(revision bbb9454561ed446417b4a514ee1e3f9254c5cb9e)
@@ -127,9 +127,34 @@
 } __attribute__((packed)) ambapp_entry_t;
 
+typedef struct {
+	unsigned int ram_read_ws: 1;
+	unsigned int ram_write_ws: 1;
+	unsigned int ram_width: 2;
+	unsigned int rmw: 1;
+	unsigned int rbrdy: 1;
+	unsigned int : 1;
+	unsigned int bank_size: 4;
+	unsigned int si: 1;
+	unsigned int se: 1;
+	unsigned int : 1;
+	unsigned int ms: 1;
+	unsigned int : 1;
+	unsigned int d64: 1;
+	unsigned int sdram_cmd: 2;
+	unsigned int sdram_colsz: 2;
+	unsigned int sdram_banksz: 3;
+	unsigned int tcas: 1;
+	unsigned int trfc: 3;
+	unsigned int trp: 1;
+	unsigned int sdrf: 1;
+} __attribute__((packed)) mctrl_mcfg2_t;
+
 amba_device_t amba_devices[AMBAPP_MAX_DEVICES];
 int amba_devices_found;
+bool amba_fake;
 uintptr_t amba_uart_base;
 
 void ambapp_scan(void);
+bool ambapp_fake(void);
 void ambapp_qemu_fake_scan(void);
 void ambapp_print_devices(void);
Index: boot/arch/sparc32/src/ambapp.c
===================================================================
--- boot/arch/sparc32/src/ambapp.c	(revision 80d9d8391bc56eab2b15e4a28cb1562b86e17ea6)
+++ boot/arch/sparc32/src/ambapp.c	(revision bbb9454561ed446417b4a514ee1e3f9254c5cb9e)
@@ -54,4 +54,6 @@
 void ambapp_scan()
 {
+	amba_fake = false;
+
 	/* Scan for AHB masters & slaves */
 	ambapp_scan_area(AMBAPP_AHBMASTER_AREA, 64);
@@ -64,5 +66,6 @@
 
 	/* If we found nothing, fake device entries */
-	ambapp_qemu_fake_scan();
+	if (amba_devices_found == 0)
+		ambapp_qemu_fake_scan();
 }
 
@@ -80,5 +83,5 @@
 		amba_device_t *device = &amba_devices[amba_devices_found];
 		device->vendor_id = (amba_vendor_id_t)entry->vendor_id;
-		device->device_id = (amba_device_id_t)entry->device_id;
+	device->device_id = (amba_device_id_t)entry->device_id;
 		device->version = entry->version;
 		device->irq = entry->irq;
@@ -121,5 +124,11 @@
 	amba_devices[2].bars[0].size = 0x100;
 
+	amba_fake = true;
 	amba_devices_found = 3;
+}
+
+bool ambapp_fake()
+{
+	return amba_fake;
 }
 
@@ -130,5 +139,9 @@
 	for (int i = 0; i < amba_devices_found; i++) {
 		amba_device_t *dev = &amba_devices[i];
-		printf("<%1x:%03x> at 0x%08x, irq %d\n", dev->vendor_id, dev->device_id, dev->bars[0].start, dev->irq);
+		printf("<%1x:%03x> at 0x%08x ", dev->vendor_id, dev->device_id, dev->bars[0].start);
+		if (dev->irq == -1)
+			printf("\n");
+		else
+			printf("irq %d\n", dev->irq);
 	}
 }
Index: boot/arch/sparc32/src/main.c
===================================================================
--- boot/arch/sparc32/src/main.c	(revision 80d9d8391bc56eab2b15e4a28cb1562b86e17ea6)
+++ boot/arch/sparc32/src/main.c	(revision bbb9454561ed446417b4a514ee1e3f9254c5cb9e)
@@ -62,5 +62,25 @@
 	amba_device_t *uart = ambapp_lookup_first(GAISLER, GAISLER_APBUART);
 	amba_uart_base = uart->bars[0].start;
+	bootinfo.uart_base = amba_uart_base;
+	bootinfo.uart_irq = uart->irq;
 
+	/* Look up for IRQMP */
+	amba_device_t *irqmp = ambapp_lookup_first(GAISLER, GAISLER_IRQMP);
+	bootinfo.intc_base = irqmp->bars[0].start;
+
+	/* Look up for timer */
+	amba_device_t *timer = ambapp_lookup_first(GAISLER, GAISLER_GPTIMER);
+	bootinfo.timer_base = timer->bars[0].start;
+	bootinfo.timer_irq = timer->irq;
+	
+	/* Lookp up for memory controller and obtain memory size */
+	if (ambapp_fake()) {
+		bootinfo.memsize = 64 * 1024 * 1024; // 64MB
+	} else {
+		amba_device_t *mctrl = ambapp_lookup_first(ESA, ESA_MCTRL);
+		volatile mctrl_mcfg2_t *mcfg2 = (volatile mctrl_mcfg2_t *)(mctrl->bars[0].start + 0x4);
+		bootinfo.memsize = (1 << (13 + mcfg2->bank_size));
+	}
+	
 	/* Standard output is now initialized */
 	version_print();
@@ -73,4 +93,6 @@
 
 	ambapp_print_devices();
+
+	printf("Memory size: %dMB\n", bootinfo.memsize >> 20);
 
 	mmu_init();
