Age | Commit message (Collapse) | Author | Files | Lines |
|
Preparation for better xhci support: allows to notify host controllers
instead of going through a free+alloc cycle.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add a qemu_preinit() call to csm initialization,
so PF_QEMU gets set when running on qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Not needed any more, the new qemu_detect() function
does the job instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
This patch adds support for detecting whenever SeaBIOS runs on qemu
or not. This is done by looking at the northbridge (pci device 00:00.0)
and check the subsystem id. Most pci devices emulated by qemu -- the
two northbridges i440fx and q35 included -- have a subsystem id of
"1af4:1100".
In case the subsystem ID matches set PF_QEMU, log a message (including
the northbridge found while being at it) and also check for kvm.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The segoff_s definition is used by a number of header files that would
not otherwise need farptr.h, so move it to a more central location.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Also, sort the order of include files in the c files.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Triggerable by creating a virtual machine with
*lots* of ahci controllers and disks.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Move many C files from the src/ directory to the new src/fw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move many C files from the src/ directory to the new src/hw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Internal "low memory" allocations are currently placed in the UMB
region (0xc0000-0xf0000). However, there have been reports of some
real machines that do not support DMA to this area of memory. So, add
a compile time config option (off by default) to support placing all
internal low-memory allocations at the end of the 640K real-memory
area (0x90000-0xa0000).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use size prefixes on assembler instructions.
Split the relocation smm handler into a separate section from the main
runtime smm handler.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Qemu commit 9ee59f3 removed the bochs bios apm interface emulation at
port 0x8900. That broke poweroff via APM. Fix it by powering off the
machine using the acpi pm control register.
Old code is left in, so seabios wil try both poweroff methods. Cleaning
that eventually up is left for another patch, after checking it isn't
needed. Qemu never implemented "Standby" and "Suspend", only
"Shutdown", so it looks like there might be non-qemu use cases (bochs
probably).
Easiest way to test this is the syslinux poweroff module; modern linux
distros usually have CONFIG_APM turned off.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Allow configuration of the boot menu prompt and boot menu key (via the
romfile interface). Some machines don't have an F12 key, so make this
configurable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The file walking code was incorrectly using the uncompressed file size
when searching for the next file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
It looks like when mathcp_setup() got moved from interface_init() to
platform_hardware_setup() in 3a735baa the corresponding change was not
made to the CSM code. Update it now.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
It looks like MSDOS 6 wants the UMB area to be read-only in order for
it to use it. FreeDOS doesn't care, but it always maps a page from
high mem when it does use the area. So, add an option to control
whether unused UMB ram is marked read-only and default it to read-only
as that seems to be more compatible.
This also fixes an off-by-one bug in the shadow range checking code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
These two functions both need to add in extra high bits to their
timers, and this code is the bulk of these functions. Factor out the
duplicate code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Split timer_setup() - put the tsc calibration code in its own
function.
Group all the timer setup functions together.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Rename the check_tsc() function to timer_check(). The CPU TSC is
often not the basis of the timer, so use a more appropriate name.
Convert all callers that were using u64 for the timers to use u32.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Rename functions to be more consistent and so they are not confused
with the normal timer functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The time-stamp-counter has a higher accuracy than is needed in
SeaBIOS. Down shift it to ensure it safely fits in a 32bit variable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The TICKS_PER_DAY setting is a bios standard and needs to be 1573040
for compatibility. However, there are actually ~1573042.24 ticks in a
day. So, only use TICKS_PER_DAY when working with the BDA
timer_counter - not when calculating any internal times.
The PIT hz is actually 143181800 / 12 (~1193181.667). This can be
accurately encoded as PMTIMER hz / 3. Because the PIT hz is usually
multiplied and divided by other numbers, we can use the PMTIMER hz and
defer the division by 3 to improve accuracy.
When doing division for delay time calculations, always round up the
division so the delay is never less than the requested time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Add ticks_to_ms() and ticks_from_ms() helpers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The following commits updated the FADT flags for PIIX4:
commit c7be281b3be0f2013aa4b5d5f400981a1adb6e63
Drop FIX_RTC flag from FADT.
commit a4e2b9adbba95c2d783761e84444bbb3c8d6107b
enable USE_PLATFORM_CLOCK bit in FADT flags
Q35 support was originally written before these commits in seabios, PIIX
got updated, Q35 didn't. QEMU uses the same clock for both so there's
no reason for these bits to differ. Sync them up.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Preface PIC functions with a pic_ to provide a more consistent
naming.
Convert the irqmask code to a more consistent
pic_irqmask_read/write/mask form.
Move code from pic.h to pic.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|