1
0

Move atags support to be ARM arch-specific

This commit is contained in:
2012-12-24 12:40:30 -05:00
parent ed52a8af5c
commit 62755b8f38
5 changed files with 24 additions and 17 deletions

View File

@ -18,7 +18,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <atags.h>
#include <console.h>
#include <framebuffer.h>
#include <kmalloc.h>
@ -94,11 +93,9 @@ void serial_console_init() {
//once, and only here
void serial_init();
void kmalloc_init();
int detect_memory();
int main(void) {
char *lower, *upper;
struct atag *atags;
//setup MMU
mmu_reinit();
@ -114,19 +111,11 @@ int main(void) {
//setup memory subsystems
mm_init();
kmalloc_init();
if (atags_first_mem_region(&atags)) {
print("Error: atags must contain at least one memory region\n");
if (detect_memory()) {
print("Error: Failed to detect memory.\n");
return -1;
}
do {
lower = (char *)atags->data.mem.start;
upper = lower + atags->data.mem.size - 1;
print("atags: physical memory at %x-%x\n", lower, upper);
declare_memory_region(lower, upper);
} while (!atags_next_mem_region(&atags));
init_initcalls();
video_console_init();