aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-07-27SPARC32: switch TCX driver over to FCodeMark Cave-Ayland6-3/+48
Currently we cannot read the FCode from the card, so for the moment simply execute the bytecode directly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1193 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27config: add new fcode tag and support for building Fcode into dictionariesMark Cave-Ayland5-6/+90
Here we introduce a new <fcode> tag which will tokenise the specified source file into Fcode using the toke utility. Similarly add a new type attribute to the dictionary <object> tag which when set to "fcode" will add the fcode binary as a dependency for the specified target dictionary. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1192 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27switch-arch: make the fcode-utils tokeniser "toke" mandatory for the buildMark Cave-Ayland1-0/+12
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1191 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27SPARC: remove cls() from the console startupMark Cave-Ayland5-37/+0
The video_cls() function is no longer needed, since the fb8-install routines now handle the video initialisation instead. Remove the serial_cls() functions to make SPARC consistent with PPC and aid debugging. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1190 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27bootstrap.fs: add debug-type and debug-cr wordsMark Cave-Ayland1-0/+2
These words always output to the debug (serial) port even if video mode is enabled. This makes debugging the video routines much easier when starting QEMU with the -serial stdio option. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1189 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27console: remove libopenbios/console.hMark Cave-Ayland4-12/+0
After all of the shuffling, this file is no longer required. Remove it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1188 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: remove init_video() functionMark Cave-Ayland4-43/+15
Finally we now have a set of common video routines in video_common.c with per bus initialisers for SBus and PCI. Hence we can remove the now obsolete init_video() function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1187 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: fix 32-bit display modes on 64-bit architecturesMark Cave-Ayland1-8/+8
Switch from using unsigned long to uint32_t in the 32-bit primitives and unsigned short to uint16_t in the 16-bit primitives. While not a complete fix (endian-swapping, 24-bit mode) it does fix 32-bit display depth on 64-bit architectures such as SPARC64. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1186 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27sbus.c: fix TCX24 initialisationMark Cave-Ayland1-0/+12
Even though we boot in 24-bit enabled mode, OpenBIOS only uses the 8-bit framebuffer. Hence we need to override the depth/linebytes obtained from QEMU to force the graphics subsystem into 8-bit mode, which was what seems to have been happening before this patch series. Note: it seems strange that we have to update the package linebytes property too, however Debian etch freezes if we don't set it to match the 8-bit framebuffer even though it correctly switches to 24-bit mode. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1185 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: move colour palette code into individual devicesMark Cave-Ayland8-27/+101
Instead if having a large #ifdef .. #endif section in video_set_color(), move the device-specific hardware setters into each display device package. To do this, we keep track of the display ihandle in the video structure and use it to invoke the low-level hardware setter routine (and optional palette refresh) if required. Also since the display-ih isn't called until is-install, defer the colour palette initialisation from init_video() to is-install. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1184 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: remove the video_get_res() functionMark Cave-Ayland3-17/+2
Now that we've unified the video variables between C and Forth, there is no need to have a dedicated C function to return the current dimensions. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1183 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: split video setup routines into setup_video()Mark Cave-Ayland8-84/+114
Leave per-device work in init_video() for the moment. As part of this commit we fix up switch-arch so that CONFIG_QEMU works for SPARC32 - if we are given the framebuffer information via the QEMU firmware interface we use it. Otherwise fall back to the values of the VGA_DEFAULT_* constants. This commit requires a corresponding patch for QEMU as currently the framebuffer width/height are not passed via the firmware interface for SPARC32. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1182 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: unify the video_info structure with ForthMark Cave-Ayland4-62/+74
At the moment there are two sets of video parameters being used: those internal to Forth and those internal to C. Unify these two structures by redefining video_info to contain pointers to relevant values, and then changing init_video() to set the pointers to the relevant values in the Forth dictionary. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1181 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: Move osi_fb_info_t struct contents directly into the ↵Mark Cave-Ayland3-55/+53
video_info struct Despite the name, osi_fb_info_t doesn't seem to be used by MOL and is just a general holder for video parameters. So let's move everything into a single struct to make future dereferencing easier. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1180 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: rename get_color() and set_color() functionsMark Cave-Ayland3-13/+13
These are now called video_get_color() and video_set_color() respectively. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1179 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: remove video_scroll1() and draw_pixel() as they are no ↵Mark Cave-Ayland2-43/+0
longer needed Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1178 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: now fill_rect() is no longer called directly, merge it into ↵Mark Cave-Ayland2-15/+8
the video_fill_rect() Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1177 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: move startup_splash() and refresh_palette() to ↵Mark Cave-Ayland4-70/+75
packages/molvideo.c These routines are MOL-specific and currently not required anywhere else. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1176 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: remove manual screen clear since fb8-erase-screen does this nowMark Cave-Ayland1-1/+0
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1175 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27packages: rename video.c to molvideo.c ready for MOL-specific video routinesMark Cave-Ayland2-9/+16
While we are here, remove the INSTALL_OPEN flag since this is now handled by is-install (removing the "open is not unique" warning on the serial console during startup). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1174 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27libopenbios: remove the C terminal emulator file console_common.cMark Cave-Ayland3-419/+0
With the advent of the Forth terminal it is no longer required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1173 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27video_common.c: remove video_open() and video_write() methodsMark Cave-Ayland1-28/+0
These were only included to allow switching between the C terminal and the Forth terminal during development. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1172 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-11PPC: Add kernel header style typedefsAlexander Graf1-0/+8
When compiling OpenBIOS on openSUSE 12.3 ppc64 I end up getting real host headers included that make use of the __uxx and __sxx types. Define those too in our asm copy of the types.h file, as that one overrides the host's types.h that we would've used otherwise. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1171 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-11Macio: Fetch nvram offset from fw_cfg if availableAlexander Graf2-7/+28
We want the hypervisor to tell us where NVRAM lies so that we do not have to rely on hardcoded addresses for it. Introduce a new fw_cfg interface that allows us to receive it at runtime. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1170 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-30Mac-io: Set device revisionAlexander Graf1-0/+1
Mac OS X 10.5 requires device-rev to be set for mac-io. Make it happy. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1169 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-30Mac99: Expose as MacRISC2 platformAlexander Graf1-0/+3
The PowerMac2,1 is a MacRISC2 system. Expose it as compatible. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1168 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-28load: fix generation of /chosen bootpath propertyMark Cave-Ayland3-42/+87
It seems that some OS require the bootpath property to be the full, unaliased path to the selected boot device, so use get-instance-path to ensure that this is the case. There is a slight issue here when auto-probing a partition, since the package arguments won't contain the chosen partition id which semms to be mandatory for bootpath. In order to resolve this, scan for a special selected-partition-args property in the instance chain before generating the bootpath, and if it exists use that for the device package arguments instead. Using this mechanism, we can set this property once we have auto-probed a partition in mac-parts.c so bootpath is generated correctly. Finally it is possible to remove the current hack of overwriting bootpath when calling open-dev on a mac-parts partition, which would confuse some bootloaders if they read bootpath after opening a new device. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1167 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-28property.fs: fix off-by-one error in decode-stringMark Cave-Ayland1-1/+1
The sequence 's" test" encode-string decode-string' suffered from an off-by-one error whereby the trailing '\0' would still be left at the end of the decoded string. This fixes the extra "space" appearing at the end of property names, e.g. such as in the output of "show-devs". Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1166 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-28PPC: Fix quik bootloader on New World MacsMark Cave-Ayland1-2/+6
Currently quik assumes a fixed load-base of 0x3f4000, and only worked on Old World Macs because of a special exception in bootcode_load.c. Since quik seems to be the only user of %BOOT known to date, widen the check to all Apple machines as per conversation with Alex. PReP machines will continue to use the standard value of load-base as normal. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1165 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-26Revert "Cuda: Add device_type property"Alexander Graf1-1/+0
Oops, this shouldn't have gone into the repository. Sorry :(. This reverts commit 10a47b9ad8b95c7c06405163867ea3ad54f9441e. git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1164 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-26Cuda: Add device_type propertyAlexander Graf1-0/+1
Mac OS X wants to have a device_type property in the via-cuda node to find and identify it properly. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1163 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-25hfsplus: Fix disk support for disks > 4GBAlexander Graf1-1/+1
The HFS+ driver was truncating the end of the disk to 32bit implicitly by multiplying a 32bit value with another 32bit value. Cast the first one to 64bit, making the result 64bit wide as well. This fixes booting from big disks for me. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1162 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-25Mac99: Add power-mgt node to via-cudaAlexander Graf2-29/+15
Instead of spawning a half-broken via-pmu device tree node, let's create a power-mgt node below out already existing via-cuda node instead. This patch is inspired by a patch from Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1161 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-25mac99: Add uni-n and pmu nodesAlexander Graf1-0/+52
With these device nodes the Mac OS X 10.4 kernel detects our Mac99 machine type. It still hangs shortly after though. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1160 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-25g3beige: Enable second ATA port on MacIOAlexander Graf1-1/+1
The macio on our g3beige (heathrow) machine has 2 ATA links. Enable the second one. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1159 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-22fwcfg: Rename CPUFREQ to CLOCKFREQAlexander Graf2-2/+2
The CPUFREQ fwcfg variable was a misnomer that never got into QEMU in that form. What we really implemented was a variable that exposes the "clock-frequency" property, so name it accordingly. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1158 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-22Unix build: Add is_machine helpersAlexander Graf1-0/+20
When building the unix target on PPC, our #ifdef'ery thinks we can properly use the is_machine helpers and act accordingly to implement hacks. Expose these helpers in the unix target as well, just always define them as false. That way we safe compilation without adding too much logic to deal with unimportant corner cases. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1157 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09video: switch VGA and TCX drivers over to Forth console using is-install.Mark Cave-Ayland3-13/+7
Here we install the Forth terminal console instead of the C console for the VGA and TCX drivers. Note that this patch also disables video output for SPARC32 when CONFIG_DEBUG_CONSOLE_VIDEO is enabled, since these routines write directly to the screen instead of using the Forth bindings causing some display issues. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1156 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: add implementation of fb8-insert-characters and ↵Mark Cave-Ayland1-2/+39
fb8-delete-characters. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1155 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: add implementation of fb8-insert-lines.Mark Cave-Ayland1-0/+8
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1154 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09terminal.fs: Fix CSI n;mH and CSI n;mf control sequences.Mark Cave-Ayland1-9/+31
Fix an off-by-one error in the lines/columns calculations and also ensure that we correctly interpret control sequences when not all of the optional parameters are present. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1153 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09terminal.fs: handle all cursor positioning within the terminal package.Mark Cave-Ayland2-17/+18
Currently the column positioning is handled by the framebuffer code in display.fs where it shouldn't really be. This also fixes a crash bug when window-top is set and a line wraps onto the line beneath it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1152 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: Add vertical font-spacing as per the existing C console ↵Mark Cave-Ayland1-3/+9
implementation. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1151 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: optimise scrolling by copying/deleting multiple scanlines at once.Mark Cave-Ayland1-22/+19
Change fb8-copy-line and fb8-clear-line so that they can operate on multiple lines at once, renaming to fb8-copy-lines and fb8-clear-lines respectively. Integrate these new functions into fb8-delete-lines so that they are used when scrolling the display. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1150 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09video_common.c: create low-level video_fill_rect() function.Mark Cave-Ayland4-16/+20
Switch fb8-erase-screen in display.fs over to use it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1149 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: Fix fb8 routines to work with bit depths > 8.Mark Cave-Ayland1-6/+7
The IEEE1275 specification suggests that the fb8-* routines can be coerced into working for framebuffers with greater bit depths. Make sure that we also support this. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1148 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09video_common.c: create low-level video_invert_rect() function.Mark Cave-Ayland3-20/+70
Switch display.fs over to use it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1147 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09video_common.c: create low-level video_mask_blit() function.Mark Cave-Ayland3-39/+62
Switch display.fs over to use it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1146 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09display.fs: pass the colour depth and line bytes to the Forth terminal routines.Mark Cave-Ayland2-0/+7
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1145 f158a5a8-5612-0410-a976-696ce0be7e32
2013-06-09video: Create tcx.fs and vga.fs to simulate Fcode video initialisation code.Mark Cave-Ayland6-15/+88
The IEEE1275 is-install routine needs to call a basic initialisation routine for each driver as typically supplied as an Fcode ROM. Provide a suitable set of basic initialisers for a QEMU host. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1144 f158a5a8-5612-0410-a976-696ce0be7e32