Lines Matching +full:parallel +full:- +full:memories
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2 ** -*- mode: asm -*-
4 ** head.S -- This file contains the initial boot code for the
20 ** ++ Bjoern & Roman: ATARI-68040 support for the Medusa
23 ** Magnum- and FX-alternate ram
26 ** for linux-2.1.115
45 * . Enable cache memories
49 * 1) Remove register dependency through-out the file.
57 * write-ups on the structure of the file, and the features of the
61 * ------------------
70 * actual per-machine specific code very simple.
73 * (the same for all machines) and mapping machine-specific I/O
83 * others will plug-in support for specific machines.
88 * -------
102 * ------------------------
104 * -----------------------
106 * ------------------------
129 * ----------
141 * ---------
149 * ------------
152 * #ifdef / #endif clauses so it doesn't have to ship in known-good
163 * -------------------
169 * --------------
175 * -------------
189 * -------
236 * coded value. (But, you will notice the code is run-time
245 * USE_MFP: Use the ST-MFP port (Modem1) for serial debug.
256 #include <asm/bootinfo-amiga.h>
257 #include <asm/bootinfo-atari.h>
258 #include <asm/bootinfo-hp300.h>
259 #include <asm/bootinfo-mac.h>
260 #include <asm/bootinfo-q40.h>
261 #include <asm/bootinfo-virt.h>
262 #include <asm/bootinfo-vme.h>
266 #include <asm/asm-offsets.h>
332 CC6_HALF_D = 0x08000000 /* half-cache mode for data cache (68060) */
338 CC6_HALF_I = 0x00002000 /* half-cache mode for instruction cache (68060) */
377 /* The __INITDATA stuff is a no-op when ftrace or kgdb are turned on */
384 * - func_start marks the beginning of the routine which setups the frame
387 * - func_return marks the end of the routine and simply calls the prepared
389 * - func_define generates another macro to automatically put arguments
406 linkw %a6,#-\stack
407 moveml \saveregs,%sp@-
408 .set stackstart,-\stack
427 move_stack "(\nr-1)",\arg2,\arg3,\arg4
428 movel \arg1,%sp@-
550 /* On the HP300 we use the on-board LEDs for debug output before
552 _off_ - on the 340 bit 7 is towards the back panel of the machine. */
723 * d1 := cacheable write-through
724 * NOTE: The 68040 manual strongly recommends non-cached for MMU tables,
725 * but we have been using write-through since at least 2.0.29 so I
731 * problems, then supervisor memory accesses need to be write-through
830 movel %d2,%sp@-
832 .word 0x70 /* trap 0x70 - .BRD_ID */
984 0xffxxxxxx -> 0x00xxxxxx). For this, an additional pointer table is
985 needed. I/O ranges are marked non-cachable.
988 (i.e. 0xffxxxxxx -> 0xffxxxxxx), because some I/O registers are
995 /* I/O base addr for non-Medusa, non-Hades: 0x00000000 */
1007 /* Map everything non-cacheable, though not all parts really
1029 * add transparent mapping for 0xff00 0000 - 0xffff ffff
1030 * non-cached serialized etc..
1032 * 0xfe000000-0xfeffffff is for screen and ROM
1049 * by mapping 32MB (on 020/030) or 16 MB (on 040) from 0xf0xxxxxx -> 0x00xxxxxx).
1081 * so we can access on-board i/o areas.
1104 * PROM is 0xff800000->0xffbfffff and SRAM is
1105 * 0xffe00000->0xffe1ffff.
1123 * so we can access on-board i/o areas.
1179 * Mac Note: screen address of logical 0xF000.0000 -> <screen physical>
1204 * from 8k -> 4k pages as we go.
1216 andl #PTR_TABLE_SIZE-1, %d0
1222 andl #PAGE_TABLE_SIZE-1, %d0
1229 movel #((0x200000 >> 13)-1), %d1
1273 * tables should be non-cacheable on a '040 and write-through on a
1275 * experience, showed that write-through also works on a '040.
1326 * the kernel of which there are two sub-possibilities:
1348 * you designed today, but I'm sure it wasn't good."). -- rst]
1361 * is made in page 0 (an as of yet unused location -- except for the
1529 * Returns: d0: size (-1 if not found)
1530 * a0: data pointer (end-of-records if not found)
1546 3: moveq #-1,%d0
1559 * a hierarchical translation mechanism where the high-order
1595 * bits 31..26 - index into the Root Table
1596 * bits 25..18 - index into the Pointer Table
1597 * bits 17..12 - index into the Page Table
1598 * bits 11..0 - offset into a particular 4K page
1631 #define MMU_PRINT_INVALID -1
1637 func_start mmu_print,%a0-%a6/%d0-%d7
1753 moveml %d0-%d1,%sp@-
1759 moveml %sp@+,%d0-%d1
1819 putZc('w','c') /* write through or copy-back */
1824 putZc('s',' ') /* serialized non-cacheable, or non-cacheable */
1830 putZc('C','I') /* write through or copy-back */
1910 moveml %d0-%d1,%sp@-
1915 moveml %sp@+,%d0-%d1
1919 moveml %a0/%d7,%sp@-
1937 moveml %d0-%d7/%a0,%sp@-
1949 puts "->"
1966 moveml %sp@+,%d0-%d7/%a0
2029 moveq #-1,%d0
2104 * routines in the case of a run-time error. For example,
2107 * NOTE-2
2112 func_start mmu_map,%d0-%d4/%a0-%a4
2124 andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0
2136 andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0
2181 andl #PTR_TABLE_SIZE-1,%d0
2189 andl #PAGE_TABLE_SIZE-1,%d0
2206 lea %a3@(-1),%a0
2223 andl #(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1)&(-ROOT_TABLE_SIZE),%d0
2228 lea %a3@(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1),%a1
2257 andl #PTR_TABLE_SIZE-1,%d0
2279 lea %a3@(-1),%a0
2319 andl #PTR_TABLE_SIZE-1,%d0
2327 andl #PAGE_TABLE_SIZE-1,%d0
2379 andw #-ROOT_TABLE_SIZE,%d0
2387 andl #PTR_TABLE_SIZE-1,%d0
2409 andw #-PTR_TABLE_SIZE,%d0
2417 andl #PAGE_TABLE_SIZE-1,%d0
2424 andw #-PAGESIZE,%d0
2433 func_start mmu_engage,%d0-%d2/%a0-%a3
2435 moveq #ROOT_TABLE_SIZE-1,%d0
2449 movew #PAGESIZE-1,%d0
2547 addw #PAGESIZE-1,%a0
2549 andw #-PAGESIZE,%d0
2573 movew #PAGESIZE/4-1,%d0
2643 andw #-PTR_TABLE_SIZE,%d0
2679 andw #-(PAGESIZE/PAGE_TABLE_SIZE),%d0
2684 moveq #PAGESIZE/PAGE_TABLE_SIZE/4-1,%d0
2697 andw #-PAGE_TABLE_SIZE,%d0
2727 movew #PAGESIZE/4-1,%d0
2741 * Atarians have a choice between the parallel port, the serial port
2762 .byte -1
2786 .byte -1
2852 movel #-ZTWOBASE,%a0@
2853 bclr #SERIAL_DTR,SERIAL_CNTRL-ZTWOBASE
2855 movew %a0@,CUSTOMBASE+C_SERPER-ZTWOBASE
2856 | movew #61,CUSTOMBASE+C_SERPER-ZTWOBASE
2954 - check for '%LX$' signature in SRAM */
2956 move.l #0xff020010,%a1@ /* must be inited - also used by debug=mem */
3086 * the SRAM, which is non-standard.
3088 moveml %d0-%d7/%a2-%a6,%sp@-
3090 jeq 1f | No tag - use the Bug
3126 moveb %d0,%sp@-
3130 moveml %sp@+,%d0-%d7/%a2-%a6
3149 movel %d0,-(%sp)
3236 func_start putn,%d0-%d2
3248 addb #'A'-('9'+1),%d2
3273 moveml %d0/%d1/%a0,%sp@-
3274 movew %sr,%sp@-
3327 func_start console_init,%a0-%a4/%d0-%d7
3345 movel %pc@(L(mac_dimensions)),%d3 /* -> low byte */
3347 swap %d4 /* -> high byte */
3355 moveq #-1,%d0 /* Mac_black */
3373 #else /* no compiled-in font */
3393 * Note - we can use either an
3421 func_start console_put_penguin,%a0-%a1/%d0-%d7
3462 func_start console_scroll,%a0-%a4/%d0-%d7
3513 moveq #-1,%d0
3529 func_start console_putc,%a0/%a1/%d0-%d7
3575 * rendered on the screen. Register usage is -
3646 func_start console_plot_pixel,%a0-%a1/%d0-%d4
3671 eorb #7,%d4 /* reverse the x-coordinate w/ screen-bit # */
3688 eorb #3,%d4 /* reverse the x-coordinate w/ screen-bit # */
3866 .long -1