summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-06-14Provide a minimal Console Terminal Block in the HWRPB.HEADmasterJason Thorpe4-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>
2021-06-06Fixes for secondary CPU start-up.Jason Thorpe2-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>
2021-06-05Provide interrupt mapping information in PCI config registers.Jason Thorpe2-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>
2021-06-05Fix incorrect initialization of PCI BARsJason Thorpe1-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>
2021-06-05Make some PCI macros available to other files. NFC.Jason Thorpe2-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>
2021-06-05Tidy comment re CY82C693UB vs PIIXJason Thorpe1-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>
2021-06-05Fix initialization of the hwrpb.hwrpb.cpuid field.Jason Thorpe1-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>
2021-06-05Fix delivery of unaligned access exceptions.Jason Thorpe1-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>
2021-06-05Make qemu-palcode build environment standalone. NFC.Jason Thorpe5-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>
2019-03-25Report machine checks to the kernelRichard Henderson2-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>
2019-01-08Do not increment PC for OPCDECRichard Henderson1-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>
2016-11-13Reinstate do_console if kernel not providedRichard Henderson1-1/+1
Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-11-13Tidy clipper Sys_SetupRichard Henderson1-12/+10
Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-11-13Add smp supportRichard Henderson4-45/+88
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-16Add Cserve_Get_VM_TimeRichard Henderson2-2/+8
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-08Build with -O2 and -g1.Richard Henderson1-2/+2
2013-07-08Don't initialize COM2.Richard Henderson1-1/+1
At least not until we implement MCHK handling. The current QEMU will (properly) MCHK when accessing a non-existant device.
2013-07-08Optimize memory layout.Richard Henderson3-5/+11
Minimizing the amount of padding between page-aligned data structures.
2013-07-08Declare vgahw_init where init.c can find it.Richard Henderson1-0/+1
2013-07-08Omit video_save_pointer_table as unused.Richard Henderson1-1/+1
2013-07-08Fix use of undefined PACKED macro.Richard Henderson1-2/+2
2013-07-08Make vga fonts constRichard Henderson2-8/+8
2011-06-03Properly detect the presence of a vga device.Richard Henderson5-1/+2633
2011-06-02Initialize a VGA controler.Richard Henderson9-10/+1446
Doesn't actually check to see that one exists yet...
2011-05-09Begin initiallizing the VGA card.Richard Henderson5-3/+788
2011-05-09Add in/out functions for 16 and 32-bit quantities.Richard Henderson1-0/+20
2011-05-09Hack: Move pci BAR ranges.Richard Henderson1-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.
2011-05-06Don't use alarms for ndelay.Richard Henderson1-5/+5
2011-05-06Initial PCI setup.Richard Henderson6-2/+782
2011-05-06Inline i/o routines.Richard Henderson3-30/+34
2011-05-06Handle padding in printf numerical output.Richard Henderson3-26/+119
2011-05-06Use level-triggered ISA interrupts.Richard Henderson2-0/+13
2011-05-06Add ps2 keyboard initialization.Richard Henderson7-1/+749
Which also requires that we properly initialize the i8259 (ISA) interrupt controller.
2011-05-05Beginnings of the SRM console prompt.Richard Henderson6-13/+373
2011-05-03Read the correct register for typhoon device interrupt ready.Richard Henderson1-2/+2
2011-05-02Implement the console callback interface.Richard Henderson8-30/+362
At least enough for GETC and PUTS.
2011-05-02clipper: Report ISA interrupts properly.Richard Henderson3-19/+56
2011-05-01Fix SMP stack initialization.Richard Henderson1-1/+2
2011-05-01Add copyright information.Richard Henderson15-273/+795
2011-04-28Rearrange Cserve. Add QMU clock/alarm related entry points.Richard Henderson2-16/+46
2011-04-27Set max_asn properly for the cpu.Richard Henderson1-34/+24
2011-04-27Re-org for Clipper system.Richard Henderson13-310/+637
2011-04-25Fix error in SWPCTX code.Richard Henderson1-2/+2
2011-04-24Use fixed frequency for rpcc.Richard Henderson1-3/+1
2011-04-22Implement CallPal_Cserve.Richard Henderson3-6/+68
This is just good enough to handle the cserve_ena/dis used by the Linux kernel for managing interrupts.
2011-04-22Implement WTINT.Richard Henderson1-6/+5
2011-04-18Use qemu_sysval and qemu_usp, newly exported from QEMU.Richard Henderson1-35/+33
2011-04-18Build palcode-sx164 instead of palcode.Richard Henderson2-5/+4
2011-04-16Optimize for size, and pca56.Richard Henderson1-1/+3
2011-04-16Use explicit division avoidance in print_decimal.Richard Henderson1-2/+10