History log of /fuchsia/zircon/kernel/platform/pc/keyboard.cpp
Revision Date Author Comments
# c9507447 07-Aug-2018 Nick Maniscalco <maniscalco@google.com>

[x64] Use new microarch function to reboot haswell and above

This change fixes a bug where some NUCs would hang during panic rather
than reboot. See ZX-2464 for details.

Refactor reboot() into new reboot_system() microarch function. On
Haswell and above, it reboots the system via the System Reset
Register. On other micro architectures it simply returns.

Update pc_keyboard_reboot() to wait at most 500ms for the controller
to become writiable. Previously, it could wait forever which resulted
in hangs on some NUCs.

Test: Verified "k crash" (panic) properly reboots NUC (Kaby Lake),
Eve (Kaby Lake), and Qemu.

ZX-2464 #done

Change-Id: Iefefb6f7f79a45cd8eee358ec64c517437eaecf0


# 9f95363b 05-Feb-2018 Mark Seaborn <mseaborn@google.com>

[kernel][interrupts] Replace "enum handler_return" type with void

Following recent changes for using preempt_disable, all of the
in-kernel interrupt handlers now always return INT_NO_RESCHEDULE. We
can therefore remove their return values. We can use "void" instead
of "enum handler_return".

The bulk changes are:

* Search-and-replace "enum handler_return" -> "void".
* Manually change "return INT_NO_RESCHEDULE;" -> "return;", or remove
when at the end of a function.
* Manually change "return foo();" -> "foo();" when return type is
void (just a cleanup -- the code compiles without this change).

The non-bulk changes include:

* Remove the definition of enum handler_return.
* Update the interrupt entry points: faults.cpp and exceptions_c.cpp.
* Update a few places where handler_return values were propagated,
such as "handler->handler()" calls, removing "ret =".

Note that platform_fiq() (changed here) is called from ARM assembly.

ZX-1490

Change-Id: I70b57c610ded0facb93c09ac8ffc81cf23a985fc


# 1e354201 25-Jan-2018 Mark Seaborn <mseaborn@google.com>

[kernel] Revert "[kernel][interrupts] Add assertion to every interrupt-handling function"

This reverts commit cae96aef07ff38db6e1ad7f05444758531c3e764.

That change caused a kernel assertion failure via the following path:

sys_mmap_device_io()
-> IoBitmap::SetIoBitmap()
-> mp_sync_exec()
-> mp_mbx_generic_irq()

ZX-1490

Change-Id: Ic2362d000be7b4e021c6942cc6d0f9550dd15649


# cae96aef 24-Jan-2018 Mark Seaborn <mseaborn@google.com>

[kernel][interrupts] Add assertion to every interrupt-handling function

This is in preparation for removing the "enum handler_return" type.
When we replace that with "void", there will be nothing in the
function signatures to mark out these functions that are only called
in interrupt-handling context.

To make up for that, add the assertion
"DEBUG_ASSERT(arch_in_int_handler())" at the start of every function
that currently returns a "handler_return".

ZX-1490

Change-Id: I30deda7192eed9f5a5276ec6259cce78277e87ea


# 1f4f0b2e 22-Jan-2018 Mark Seaborn <mseaborn@google.com>

[kernel][cbuf] Make use of preempt_disable with cbuf_write_char()

It is now safe to pass reschedule=true to event_signal() in the
contexts where cbuf_write_char() is called, so change
cbuf_write_char() to do that and remove its "bool reschedule"
argument. This means these code paths no longer need to return
INT_RESCHEDULE.

ZX-1490

Change-Id: I00b0099211fb01c2cdc01733809dff94d20c75fd


# bdb23a71 05-Jan-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][platform] run clang-fmt on all of kernel/platform

Change-Id: I8dcc6ca434f0c77e4fa7c23c202772abf03e1f1d


# 30cf5781 11-Dec-2017 Mike Voydanoff <voydanoff@google.com>

[kernel][interrupt] return error from register_int_handler()

register_int_handler() will return ZX_ERR_INVALID_ARGS instead of panicing
if the interrupt vector is invalid and will now also return ZX_ERR_ALREADY_BOUND
if the caller attempts to set a handler for an interrupt vector that already
has a handler.

This allows us to remove an unnecessary WAVL tree from InterruptEventDispatcher.

Also, zx_interrupt_create() will return an error if it attempts to bind to an
interrupt vector that is now being used by a kernel driver.

Add interrupt_has_handler() to determine if we have a handler for an interrupt vector
to use for this instead.

Also added a missing sanity check to PciInterruptDispatcher.

ZX-1369 #done

Change-Id: I107634c66b57cd5a7adfd6780d0afa24dfda449b


# 5d9c4f03 25-Apr-2017 Todd Eisenberger <teisenbe@google.com>

[kernel][pc] Finish C++ conversion

Change-Id: Iea6ff5e497597c1b0cd3a914e1a3cdd5b641cf58


# 21a15d0d 25-Apr-2017 Todd Eisenberger <teisenbe@google.com>

[kernel][pc] Rename all C files to CPP

This is a straight rename and breaks the build. The next patch in
this series makes everything build.

Change-Id: I067e3fe1e3a49d2ca217f48b72fd1e768c3332d7