Ignore:
Timestamp:
2016-12-27T13:34:08Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9185e42
Parents:
0d9b4a8 (diff), 73d8600 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/sun4u

This merge brings support for serial console on the QEMU sun4u machine
and by extension on any system that provides at least one device driver
for a serial port device in the 'serial' location service category and
points the 'console' boot argument to it.

The 'console' boot argument is used to differentiate character devices
that are used as a console from other character devices that may be used
for other purposes (e.g. SLIP or keyboard).

Support for real-world sun4u machines is temporarily broken. The legacy
ns16550 input port driver has been discontinued. Real-world Ultra 5,
which is fairly close to the QEMU machine should be easy to revive. In
order to support the sun4u QEMU machine, a new sun4u platform driver was
added. The isa driver was modified to be usable also for the EBUS bus.

On sparc64 the boot argument is passed in the boot-args boot prom
environment variable. On ia32 and amd64, the boot argument can be set in
grub.cfg as an argument to the multiboot command. The backslashes need
to be properly escaped. Other platforms don't have support for boot
arguments yet.

Because the user input/output subsystem is apparently not ready to drive
the serial console next to the ordinary console or the GUI, the serial
console mode is mutually exclusive with the normal
keyboard/ega/fb/compositor mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/multiboot/multiboot.c

    r0d9b4a8 rbfa4ffa  
    100100}
    101101
     102static void multiboot_cmdline(char *cmdline)
     103{
     104        /*
     105         * GRUB passes the command line in an escaped form.
     106         */
     107        for (size_t i = 0, j = 0;
     108            cmdline[i] && j < CONFIG_BOOT_ARGUMENTS_BUFLEN;
     109            i++, j++) {
     110                if (cmdline[i] == '\\') {
     111                        switch (cmdline[i + 1]) {
     112                        case '\\':
     113                        case '\'':
     114                        case '\"':
     115                                i++;
     116                                break;
     117                        }
     118                }
     119                bargs[j] = cmdline[i];
     120        }
     121}
     122
    102123static void multiboot_modules(uint32_t count, multiboot_module_t *mods)
    103124{
     
    153174        if (signature != MULTIBOOT_LOADER_MAGIC)
    154175                return;
    155        
     176
     177        /* Copy command line. */
     178        if ((info->flags & MULTIBOOT_INFO_FLAGS_CMDLINE) != 0)
     179                multiboot_cmdline((char *) MULTIBOOT_PTR(info->cmd_line));
     180
    156181        /* Copy modules information. */
    157182        if ((info->flags & MULTIBOOT_INFO_FLAGS_MODS) != 0)
Note: See TracChangeset for help on using the changeset viewer.