Lines Matching +full:display +full:- +full:height +full:- +full:chars
1 /* -*- mode: asm -*-
3 ** head.S -- This file contains the initial boot code for the
19 ** ++ Bjoern & Roman: ATARI-68040 support for the Medusa
22 ** Magnum- and FX-alternate ram
25 ** for linux-2.1.115
53 * 1) Remove register dependency through-out the file.
61 * write-ups on the structure of the file, and the features of the
65 * ------------------
74 * actual per-machine specific code very simple.
77 * (the same for all machines) and mapping machine-specific I/O
87 * others will plug-in support for specific machines.
92 * -------
106 * ------------------------
108 * -----------------------
110 * ------------------------
133 * ----------
145 * ---------
153 * ------------
156 * #ifdef / #endif clauses so it doesn't have to ship in known-good
158 * (in height/width and bit depth) and then use that information for
167 * -------------------
173 * --------------
179 * -------------
193 * -------
221 * MMU_PRINT: There is a routine built into head.S that can display the
240 * coded value. (But, you will notice the code is run-time
249 * USE_MFP: Use the ST-MFP port (Modem1) for serial debug.
260 #include <asm/bootinfo-amiga.h>
261 #include <asm/bootinfo-atari.h>
262 #include <asm/bootinfo-hp300.h>
263 #include <asm/bootinfo-mac.h>
264 #include <asm/bootinfo-q40.h>
265 #include <asm/bootinfo-virt.h>
266 #include <asm/bootinfo-vme.h>
270 #include <asm/asm-offsets.h>
336 CC6_HALF_D = 0x08000000 /* half-cache mode for data cache (68060) */
342 CC6_HALF_I = 0x00002000 /* half-cache mode for instruction cache (68060) */
381 /* The __INITDATA stuff is a no-op when ftrace or kgdb are turned on */
388 * - func_start marks the beginning of the routine which setups the frame
391 * - func_return marks the end of the routine and simply calls the prepared
393 * - func_define generates another macro to automatically put arguments
410 linkw %a6,#-\stack
411 moveml \saveregs,%sp@-
412 .set stackstart,-\stack
431 move_stack "(\nr-1)",\arg2,\arg3,\arg4
432 movel \arg1,%sp@-
554 /* On the HP300 we use the on-board LEDs for debug output before
556 _off_ - on the 340 bit 7 is towards the back panel of the machine. */
623 * For Macintosh, we need to determine the display parameters early (at least
727 * d1 := cacheable write-through
728 * NOTE: The 68040 manual strongly recommends non-cached for MMU tables,
729 * but we have been using write-through since at least 2.0.29 so I
735 * problems, then supervisor memory accesses need to be write-through
834 movel %d2,%sp@-
836 .word 0x70 /* trap 0x70 - .BRD_ID */
988 0xffxxxxxx -> 0x00xxxxxx). For this, an additional pointer table is
989 needed. I/O ranges are marked non-cachable.
992 (i.e. 0xffxxxxxx -> 0xffxxxxxx), because some I/O registers are
999 /* I/O base addr for non-Medusa, non-Hades: 0x00000000 */
1011 /* Map everything non-cacheable, though not all parts really
1033 * add transparent mapping for 0xff00 0000 - 0xffff ffff
1034 * non-cached serialized etc..
1036 * 0xfe000000-0xfeffffff is for screen and ROM
1053 * by mapping 32MB (on 020/030) or 16 MB (on 040) from 0xf0xxxxxx -> 0x00xxxxxx).
1085 * so we can access on-board i/o areas.
1108 * PROM is 0xff800000->0xffbfffff and SRAM is
1109 * 0xffe00000->0xffe1ffff.
1127 * so we can access on-board i/o areas.
1183 * Mac Note: screen address of logical 0xF000.0000 -> <screen physical>
1208 * from 8k -> 4k pages as we go.
1220 andl #PTR_TABLE_SIZE-1, %d0
1226 andl #PAGE_TABLE_SIZE-1, %d0
1233 movel #((0x200000 >> 13)-1), %d1
1277 * tables should be non-cacheable on a '040 and write-through on a
1279 * experience, showed that write-through also works on a '040.
1330 * the kernel of which there are two sub-possibilities:
1352 * you designed today, but I'm sure it wasn't good."). -- rst]
1365 * is made in page 0 (an as of yet unused location -- except for the
1533 * Returns: d0: size (-1 if not found)
1534 * a0: data pointer (end-of-records if not found)
1550 3: moveq #-1,%d0
1563 * a hierarchical translation mechanism where the high-order
1599 * bits 31..26 - index into the Root Table
1600 * bits 25..18 - index into the Pointer Table
1601 * bits 17..12 - index into the Page Table
1602 * bits 11..0 - offset into a particular 4K page
1635 #define MMU_PRINT_INVALID -1
1641 func_start mmu_print,%a0-%a6/%d0-%d7
1757 moveml %d0-%d1,%sp@-
1763 moveml %sp@+,%d0-%d1
1823 putZc('w','c') /* write through or copy-back */
1828 putZc('s',' ') /* serialized non-cacheable, or non-cacheable */
1834 putZc('C','I') /* write through or copy-back */
1914 moveml %d0-%d1,%sp@-
1919 moveml %sp@+,%d0-%d1
1923 moveml %a0/%d7,%sp@-
1941 moveml %d0-%d7/%a0,%sp@-
1953 puts "->"
1970 moveml %sp@+,%d0-%d7/%a0
2033 moveq #-1,%d0
2108 * routines in the case of a run-time error. For example,
2111 * NOTE-2
2116 func_start mmu_map,%d0-%d4/%a0-%a4
2128 andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0
2140 andl #-(PAGESIZE*PAGE_TABLE_SIZE),%d0
2185 andl #PTR_TABLE_SIZE-1,%d0
2193 andl #PAGE_TABLE_SIZE-1,%d0
2210 lea %a3@(-1),%a0
2227 andl #(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1)&(-ROOT_TABLE_SIZE),%d0
2232 lea %a3@(PTR_TABLE_SIZE*PAGE_TABLE_SIZE*PAGESIZE-1),%a1
2261 andl #PTR_TABLE_SIZE-1,%d0
2283 lea %a3@(-1),%a0
2323 andl #PTR_TABLE_SIZE-1,%d0
2331 andl #PAGE_TABLE_SIZE-1,%d0
2383 andw #-ROOT_TABLE_SIZE,%d0
2391 andl #PTR_TABLE_SIZE-1,%d0
2413 andw #-PTR_TABLE_SIZE,%d0
2421 andl #PAGE_TABLE_SIZE-1,%d0
2428 andw #-PAGESIZE,%d0
2437 func_start mmu_engage,%d0-%d2/%a0-%a3
2439 moveq #ROOT_TABLE_SIZE-1,%d0
2453 movew #PAGESIZE-1,%d0
2551 addw #PAGESIZE-1,%a0
2553 andw #-PAGESIZE,%d0
2577 movew #PAGESIZE/4-1,%d0
2647 andw #-PTR_TABLE_SIZE,%d0
2683 andw #-(PAGESIZE/PAGE_TABLE_SIZE),%d0
2688 moveq #PAGESIZE/PAGE_TABLE_SIZE/4-1,%d0
2701 andw #-PAGE_TABLE_SIZE,%d0
2731 movew #PAGESIZE/4-1,%d0
2766 .byte -1
2790 .byte -1
2856 movel #-ZTWOBASE,%a0@
2857 bclr #SERIAL_DTR,SERIAL_CNTRL-ZTWOBASE
2859 movew %a0@,CUSTOMBASE+C_SERPER-ZTWOBASE
2860 | movew #61,CUSTOMBASE+C_SERPER-ZTWOBASE
2958 - check for '%LX$' signature in SRAM */
2960 move.l #0xff020010,%a1@ /* must be inited - also used by debug=mem */
3090 * the SRAM, which is non-standard.
3092 moveml %d0-%d7/%a2-%a6,%sp@-
3094 jeq 1f | No tag - use the Bug
3130 moveb %d0,%sp@-
3134 moveml %sp@+,%d0-%d7/%a2-%a6
3153 movel %d0,-(%sp)
3240 func_start putn,%d0-%d2
3252 addb #'A'-('9'+1),%d2
3277 moveml %d0/%d1/%a0,%sp@-
3278 movew %sr,%sp@-
3331 func_start console_init,%a0-%a4/%d0-%d7
3338 * d4 = pixel height of screen
3349 movel %pc@(L(mac_dimensions)),%d3 /* -> low byte */
3351 swap %d4 /* -> high byte */
3353 andl #0xffff,%d4 /* d4 = screen height in pixels */
3359 moveq #-1,%d0 /* Mac_black */
3377 #else /* no compiled-in font */
3397 * Note - we can use either an
3403 divul %a0@(FONT_DESC_WIDTH),%d0 /* d0 = max num chars per row */
3405 movel %d4,%d1 /* screen height in pixels */
3425 func_start console_put_penguin,%a0-%a1/%d0-%d7
3466 func_start console_scroll,%a0-%a4/%d0-%d7
3486 andl #0xffff,%d4 /* d4 = screen height in pixels */
3513 mulul %a0@(FONT_DESC_HEIGHT),%d6 /* scan line bytes x font height */
3517 moveq #-1,%d0
3533 func_start console_putc,%a0/%a1/%d0-%d7
3579 * rendered on the screen. Register usage is -
3614 * d7 = count down for the font's pixel count in height
3619 movel %a0@(FONT_DESC_HEIGHT),%d7 /* Load fbcon_font_desc.height into d7 */
3650 func_start console_plot_pixel,%a0-%a1/%d0-%d4
3675 eorb #7,%d4 /* reverse the x-coordinate w/ screen-bit # */
3692 eorb #3,%d4 /* reverse the x-coordinate w/ screen-bit # */
3870 .long -1