hrev44175 adds 1 changeset to branch 'master' old head: 3d4f1347fed8e5ac52102ce7a04d5bd8861fa6d8 new head: 386671b4d0397c0d2778832f96a1eff7c7c924d5 ---------------------------------------------------------------------------- 386671b: U-Boot: Guard ARM-specific stuff * those must be cleaned up and moved away * allows building U-Boot loader for ppc [ François Revol <revol@xxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44175 Commit: 386671b4d0397c0d2778832f96a1eff7c7c924d5 URL: http://cgit.haiku-os.org/haiku/commit/?id=386671b Author: François Revol <revol@xxxxxxx> Date: Thu May 17 17:08:19 2012 UTC ---------------------------------------------------------------------------- 2 files changed, 25 insertions(+), 3 deletions(-) src/system/boot/platform/u-boot/mmu.cpp | 15 +++++++++++++++ src/system/boot/platform/u-boot/video.cpp | 13 ++++++++++--- ---------------------------------------------------------------------------- diff --git a/src/system/boot/platform/u-boot/mmu.cpp b/src/system/boot/platform/u-boot/mmu.cpp index 15e5193..96afc2d 100644 --- a/src/system/boot/platform/u-boot/mmu.cpp +++ b/src/system/boot/platform/u-boot/mmu.cpp @@ -14,7 +14,9 @@ #include <boot/stage2.h> #include <arch/cpu.h> #include <arch_kernel.h> +#ifdef __ARM__ #include <arm_mmu.h> +#endif #include <kernel.h> #include <board_config.h> @@ -37,6 +39,7 @@ // You also need to define ENABLE_SERIAL in serial.cpp // for output to work. +#ifdef __ARM__ /* TODO: @@ -620,6 +623,8 @@ mmu_init(void) gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size)); } +#endif + // #pragma mark - @@ -628,19 +633,25 @@ extern "C" status_t platform_allocate_region(void **_address, size_t size, uint8 protection, bool /*exactAddress*/) { +#ifdef __ARM__ void *address = mmu_allocate(*_address, size); if (address == NULL) return B_NO_MEMORY; *_address = address; return B_OK; +#else + return B_ERROR; +#endif } extern "C" status_t platform_free_region(void *address, size_t size) { +#ifdef __ARM__ mmu_free(address, size); +#endif return B_OK; } @@ -657,6 +668,7 @@ platform_release_heap(struct stage2_args *args, void *base) status_t platform_init_heap(struct stage2_args *args, void **_base, void **_top) { +#ifdef __ARM__ void *heap = (void *)get_next_physical_address(args->heap_size); if (heap == NULL) return B_NO_MEMORY; @@ -664,4 +676,7 @@ platform_init_heap(struct stage2_args *args, void **_base, void **_top) *_base = heap; *_top = (void *)((int8 *)heap + args->heap_size); return B_OK; +#else + return B_ERROR; +#endif } diff --git a/src/system/boot/platform/u-boot/video.cpp b/src/system/boot/platform/u-boot/video.cpp index 4db887d..4d775e4 100644 --- a/src/system/boot/platform/u-boot/video.cpp +++ b/src/system/boot/platform/u-boot/video.cpp @@ -5,7 +5,10 @@ #include "video.h" +//XXX +#ifdef __ARM__ #include "arch_video.h" +#endif #include <arch/cpu.h> #include <boot/stage2.h> @@ -92,14 +95,16 @@ platform_switch_to_logo(void) status_t err; +#ifdef __ARM__ err = arch_set_default_video_mode(); dprintf("set video mode: 0x%08x\n", err); if (err < B_OK) return; +#endif err = video_display_splash((addr_t)gFrameBufferBase); dprintf("video_display_splash: 0x%08x\n", err); - #warning ARM:TODO + #warning U-Boot:TODO } @@ -107,7 +112,7 @@ extern "C" void platform_switch_to_text_mode(void) { TRACE(("%s()\n", __FUNCTION__)); - #warning ARM:TODO + #warning U-Boot:TODO } @@ -115,8 +120,10 @@ extern "C" status_t platform_init_video(void) { TRACE(("%s()\n", __FUNCTION__)); - #warning ARM:TODO + #warning U-Boot:TODO +#ifdef __ARM__ arch_probe_video_mode(); +#endif //XXX for testing //platform_switch_to_logo(); //return arch_probe_video_mode();