File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77obj-y += api.o api_display.o api_net.o api_storage.o
88obj-$(CONFIG_ARM) += api_platform-arm.o
99obj-$(CONFIG_PPC) += api_platform-powerpc.o
10+ obj-$(CONFIG_MIPS) += api_platform-mips.o
Original file line number Diff line number Diff line change 1+ /*
2+ * (C) Copyright 2007 Stanislav Galabov <sgalabov@gmail.com>
3+ *
4+ * SPDX-License-Identifier: GPL-2.0+
5+ *
6+ * This file contains routines that fetch data from bd_info sources
7+ */
8+
9+ #include <config.h>
10+ #include <linux/types.h>
11+ #include <api_public.h>
12+
13+ #include <asm/u-boot.h>
14+ #include <asm/global_data.h>
15+
16+ #include "api_private.h"
17+
18+ DECLARE_GLOBAL_DATA_PTR ;
19+
20+ /*
21+ * Important notice: handling of individual fields MUST be kept in sync with
22+ * include/asm-generic/u-boot.h, so any changes
23+ * need to reflect their current state and layout of structures involved!
24+ */
25+ int platform_sys_info (struct sys_info * si )
26+ {
27+
28+ platform_set_mr (si , gd -> bd -> bi_memstart ,
29+ gd -> bd -> bi_memsize , MR_ATTR_DRAM );
30+
31+ return 1 ;
32+ }
Original file line number Diff line number Diff line change 1010ifeq ($(ARCH ) ,arm)
1111LOAD_ADDR = 0x1000000
1212endif
13+ ifeq ($(ARCH ) ,mips)
14+ LOAD_ADDR = 0x80200000
15+ endif
1316
1417# Resulting ELF and binary exectuables will be named demo and demo.bin
1518extra-y = demo
Original file line number Diff line number Diff line change @@ -40,6 +40,30 @@ syscall:
4040 ldr ip, =syscall_ptr
4141 ldr pc, [ip]
4242
43+ #elif defined(CONFIG_MIPS)
44+ .text
45+ .globl __start
46+ .ent __start
47+ __start:
48+ sw $sp, search_hint
49+ b main
50+ .end __start
51+
52+ .globl syscall
53+ .ent syscall
54+ syscall:
55+ sw $ra, return_addr
56+ lw $t9, syscall_ptr
57+ jalr $t9
58+ nop
59+ lw $ra, return_addr
60+ jr $ra
61+ nop
62+ .end syscall
63+
64+ return_addr:
65+ .align 4
66+ .long 0
4367#else
4468#error No support for this arch!
4569#endif
You can’t perform that action at this time.
0 commit comments