summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Provide a minimal Console Terminal Block in the HWRPB.HEADmasterJason Thorpe2021-06-144-3/+90
| | | | | | | | | | | | | | | | | | | | | | Provide a minimal Console Terminal Block in the HWRPB so that operating systems that depend on it can correctly initialize the console device. This is suffucient, at least, for the BSD operating systems, but may not be sufficient for Digital UNIX. In addition to defining and filling out the structures, there are a couple of other key changes: - Redefine the a2 register passed by Qemu at start-up to also include some configuration flags, in addition to the CPU count, and define a flag to mirror the "-nographics" option. - We need to initialize the HWRPB *after* initializing VGA, so that we'll know if a VGA device is present and in which slot for filling out the CTB. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210613210934.21143-2-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Fixes for secondary CPU start-up.Jason Thorpe2021-06-062-13/+25
| | | | | | | | | | | | | | | | | | | | | Changes to make secondary CPU start-up work on NetBSD, which depends on some specific behavior in the architecture specification: - Change the internal swppal() function to take the new VPTPTR and Procedure Value as explicit arguments. Adapt do_start() to the new the new swppal() signature. - In do_start_wait(), extract the new VPTPTR and PV from the relevant HWRPB fields, which will have been initialized by the OS, and pass them to swppal(). - In the SWPPAL PAL call, get the value to stuff into PV (r27) from a4 (r20), and add a comment describing why this implementation detail is allowed by the architecture specification. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-9-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Provide interrupt mapping information in PCI config registers.Jason Thorpe2021-06-052-1/+28
| | | | | | | | | | | | | Use system-specific information to program the interrupt line register with the interrupt mappings, which is what the SRM console does on real hardware; some operating systems (e.g. NetBSD) use this information rather than having interrupt mappings tables for every possible system variation. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-7-thorpej@me.com> [rth: Use inline not macro; fold -1 -> 0xff map into interface.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Fix incorrect initialization of PCI BARsJason Thorpe2021-06-051-2/+2
| | | | | | | | | | Only program a BAR as a 64-bit MEM BAR if it really is a 64-bit MEM BAR. Fixes an issue with the CMD646 IDE controller under NetBSD. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-6-thorpej@me.com> [rth: Combine the two tests.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Make some PCI macros available to other files. NFC.Jason Thorpe2021-06-052-4/+5
| | | | | | | | Move PCI_DEVFN(), PCI_BUS(), PCI_SLOT(), and PCI_FUNC() to pci.h. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-5-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Tidy comment re CY82C693UB vs PIIXJason Thorpe2021-06-051-1/+1
| | | | | | Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-4-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Fix initialization of the hwrpb.hwrpb.cpuid field.Jason Thorpe2021-06-051-5/+20
| | | | | | | | | | | | Initialize the hwrpb.hwrpb.cpuid field with the primary CPU ID, not the processor type, as per the architecture specification. Some operating systems check and assert this. Improve a couple of comments. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-4-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Fix delivery of unaligned access exceptions.Jason Thorpe2021-06-051-1/+1
| | | | | | | | | | In the unaligned access exception vector, actually pass the return PC in the exception frame. This is required in order for unaligned access fixup handlers in the operating system to work. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-3-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Make qemu-palcode build environment standalone. NFC.Jason Thorpe2021-06-055-12/+28
| | | | | | | | | | Don't include system headers. Instead, provide standalone definitions and declarations of types needed and functions used by the PALcode that are compatible with the standard Alpha / GCC ABI. Signed-off-by: Jason Thorpe <thorpej@me.com> Message-Id: <20210603035317.6814-2-thorpej@me.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* Report machine checks to the kernelRichard Henderson2019-03-252-82/+95
| | | | | | | Use a minimally populated logout frame. This is good enough to handle probing of devices using the kernel's mcheck_expected. Signed-off-by: Richard Henderson <rth@twiddle.net>
* Do not increment PC for OPCDECRichard Henderson2019-01-081-2/+1
| | | | | | | This will already have been done by QEMU. Fixes: https://bugs.launchpad.net/bugs/1810545 Signed-off-by: Richard Henderson <rth@twiddle.net>
* Reinstate do_console if kernel not providedRichard Henderson2016-11-131-1/+1
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* Tidy clipper Sys_SetupRichard Henderson2016-11-131-12/+10
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* Add smp supportRichard Henderson2016-11-134-45/+88
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* Add Cserve_Get_VM_TimeRichard Henderson2013-07-162-2/+8
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* Build with -O2 and -g1.Richard Henderson2013-07-081-2/+2
|
* Don't initialize COM2.Richard Henderson2013-07-081-1/+1
| | | | | At least not until we implement MCHK handling. The current QEMU will (properly) MCHK when accessing a non-existant device.
* Optimize memory layout.Richard Henderson2013-07-083-5/+11
| | | | Minimizing the amount of padding between page-aligned data structures.
* Declare vgahw_init where init.c can find it.Richard Henderson2013-07-081-0/+1
|
* Omit video_save_pointer_table as unused.Richard Henderson2013-07-081-1/+1
|
* Fix use of undefined PACKED macro.Richard Henderson2013-07-081-2/+2
|
* Make vga fonts constRichard Henderson2013-07-082-8/+8
|
* Properly detect the presence of a vga device.Richard Henderson2011-06-035-1/+2633
|
* Initialize a VGA controler.Richard Henderson2011-06-029-10/+1446
| | | | Doesn't actually check to see that one exists yet...
* Begin initiallizing the VGA card.Richard Henderson2011-05-095-3/+788
|
* Add in/out functions for 16 and 32-bit quantities.Richard Henderson2011-05-091-0/+20
|
* Hack: Move pci BAR ranges.Richard Henderson2011-05-091-2/+2
| | | | | | The Linux kernel will re-allocate all of these, tickling what appears to be a bug in QEMU. Work around this by moving the ranges allocated by the console so that the new ranges don't overlap.
* Don't use alarms for ndelay.Richard Henderson2011-05-061-5/+5
|
* Initial PCI setup.Richard Henderson2011-05-066-2/+782
|
* Inline i/o routines.Richard Henderson2011-05-063-30/+34
|
* Handle padding in printf numerical output.Richard Henderson2011-05-063-26/+119
|
* Use level-triggered ISA interrupts.Richard Henderson2011-05-062-0/+13
|
* Add ps2 keyboard initialization.Richard Henderson2011-05-067-1/+749
| | | | | Which also requires that we properly initialize the i8259 (ISA) interrupt controller.
* Beginnings of the SRM console prompt.Richard Henderson2011-05-056-13/+373
|
* Read the correct register for typhoon device interrupt ready.Richard Henderson2011-05-031-2/+2
|
* Implement the console callback interface.Richard Henderson2011-05-028-30/+362
| | | | At least enough for GETC and PUTS.
* clipper: Report ISA interrupts properly.Richard Henderson2011-05-023-19/+56
|
* Fix SMP stack initialization.Richard Henderson2011-05-011-1/+2
|
* Add copyright information.Richard Henderson2011-05-0115-273/+795
|
* Rearrange Cserve. Add QMU clock/alarm related entry points.Richard Henderson2011-04-282-16/+46
|
* Set max_asn properly for the cpu.Richard Henderson2011-04-271-34/+24
|
* Re-org for Clipper system.Richard Henderson2011-04-2713-310/+637
|
* Fix error in SWPCTX code.Richard Henderson2011-04-251-2/+2
|
* Use fixed frequency for rpcc.Richard Henderson2011-04-241-3/+1
|
* Implement CallPal_Cserve.Richard Henderson2011-04-223-6/+68
| | | | | This is just good enough to handle the cserve_ena/dis used by the Linux kernel for managing interrupts.
* Implement WTINT.Richard Henderson2011-04-221-6/+5
|
* Use qemu_sysval and qemu_usp, newly exported from QEMU.Richard Henderson2011-04-181-35/+33
|
* Build palcode-sx164 instead of palcode.Richard Henderson2011-04-182-5/+4
|
* Optimize for size, and pca56.Richard Henderson2011-04-161-1/+3
|
* Use explicit division avoidance in print_decimal.Richard Henderson2011-04-161-2/+10
|