Commit Graph

13 Commits

Author SHA1 Message Date
Chao Li e99ce97648 Add the 64-bit and 32-bit CC flag
Added a new CC flag into build32 and build64 Makefiles to distinguish
whether compiling to 32-bit or 64-bit code.

[Lionel Debroux: rebased on the memrw functions refactor.]

Signed-off-by: Chao Li <lichao@loongson.cn>
2024-07-22 22:50:15 +02:00
martinwhitaker 20fca09752
Add boot options to perform display rotation and set preferred screen resolution (#383)
* Add boot option to rotate screen display through 90 degrees.

Some machines have a detachable display that can be used in either
portrait or landscape orientations, and require software to rotate
the displayed image accordingly. There is no way to detect the
current orientation through the BIOS, so provide a boot option to
control this. Hopefully we only need to support one (+90 degree)
angle.

Note that the rotate option only works in graphical mode. When booted
by a legacy BIOS using text mode, we have to rely on the BIOS to do
what's necessary.

* Extend boot command line options for display screen control.

Replace "rotate" option with "screen.rhs-up" and "screen.lhs-up" to
allow rotation in either direction. Add a "screen.mode=<w>x<h>"
option to set a preferred width <w> and height <h> for the UEFI
frame buffer. Also allow "screen.mode=bios" to use the default
UEFI frame buffer resolution.

* Add more debug output for EFI frame buffer mode.

* Replicate command line parsing of screen options in efisetup.c.

Trying to do it only once in screen.c didn't work, because static
variables initialied to zero are placed in the bss section, and we
don't zero the bss section until after efisetup() is executed.

The resulting code is in fact smaller, because the compiler can
optimise better when everything is local.

* Add a boot command line option for efisetup debug.

* Improve EFI debug test screen pattern.

* Document the new screen and efidebug boot command line options.

* Fix typo in README.
2024-03-04 14:49:13 +01:00
martinwhitaker 327495ec61
Allow use on headless EFI systems. (#242)
A headless EFI system may have no GOP devices. In this case, disable
output to the physical display, but continue to write to the shadow
buffer. This allows operation via a serial console.
2023-01-23 15:50:52 +01:00
Martin Whitaker 2cd060b22c Fix warning about mismatched comparison operands in 32-bit build. 2022-04-13 14:20:46 +01:00
Martin Whitaker 9f92ecf761 Fix the remapping of the screen frame buffer.
The size of the region to be mapped is determined by the buffer stride,
not the pixel width.
2022-04-11 21:46:49 +01:00
Sam Demeulemeester 2e048a7c61
Add support for Serial/TTY (#32)
* Add preliminary support for TTY Serial/UART (#15)

* Use shadow_buffer instead of VGA buffer to get a framebuffer-agnostic TTY supprot

* Added menu browsing & inputs from Serial TTY (#15)

* Add fix for degree symbol on TTY. Correct serial.c & serial.h file created with CRLF (#15)

* Move tty_error_redraw() to insure correct redraw when a error occurs

* Many reindent / cleanup

* Various optimization from @martinwhitaker comments
2022-04-04 18:31:54 +02:00
Martin Whitaker 5211b67e6c Add option to map_region to indicate we only use the region during startup.
This will avoid unnecessary remapping of the ACPI tables if they are
located in the third GB of memory.
2022-02-28 22:05:21 +00:00
Martin Whitaker a65d6a795d Rename map_device to map_region to better describe its use. 2022-02-28 22:05:21 +00:00
Martin Whitaker 6b570cd779 Reduce the maximum mapped size of the linear frame buffer.
This is needed for subsequent changes. If we do ever get presented with
a frame buffer larger than 8192x8192 pixels, we'll need to think again
about how to manage it.
2022-02-28 22:05:21 +00:00
Martin Whitaker 9785d8f8b9 Map USB controller registers into the reserved area of virtual memory.
This ensures they are accessible when the test is running, and if they
are physically mapped above 4GB.
2021-12-23 17:45:26 +00:00
Martin Whitaker 725435d5c7 Add support for 24bpp frame buffer. 2020-07-09 15:51:04 +01:00
Martin Whitaker 9492c086fe Move boot_params definitions into separate header file. 2020-06-29 12:09:13 +01:00
Martin Whitaker fbd3376668 Initial commit. 2020-05-24 21:30:55 +01:00