Kernel: Add ps2=<scancode set> command line argument
This allows forcing specific scancode set on broken PS/2 emulations
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Kernel::Input
|
||||
class PS2Controller
|
||||
{
|
||||
public:
|
||||
static BAN::ErrorOr<void> initialize();
|
||||
static BAN::ErrorOr<void> initialize(uint8_t scancode_set);
|
||||
static PS2Controller& get();
|
||||
|
||||
bool append_command_queue(PS2Device*, uint8_t command, uint8_t response_size);
|
||||
@@ -26,8 +26,8 @@ namespace Kernel::Input
|
||||
|
||||
private:
|
||||
PS2Controller() = default;
|
||||
BAN::ErrorOr<void> initialize_impl();
|
||||
BAN::ErrorOr<void> initialize_device(uint8_t);
|
||||
BAN::ErrorOr<void> initialize_impl(uint8_t scancode_set);
|
||||
BAN::ErrorOr<void> initialize_device(uint8_t, uint8_t scancode_set);
|
||||
|
||||
BAN::ErrorOr<uint8_t> read_byte();
|
||||
BAN::ErrorOr<void> send_byte(uint16_t port, uint8_t byte);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Kernel::Input
|
||||
};
|
||||
|
||||
public:
|
||||
static BAN::ErrorOr<BAN::RefPtr<PS2Keyboard>> create(PS2Controller&);
|
||||
static BAN::ErrorOr<BAN::RefPtr<PS2Keyboard>> create(PS2Controller&, uint8_t scancode_set);
|
||||
virtual void send_initialize() override;
|
||||
|
||||
virtual void command_timedout(uint8_t* command_data, uint8_t command_size) final override;
|
||||
@@ -27,13 +27,14 @@ namespace Kernel::Input
|
||||
virtual void update() final override { m_controller.update_command_queue(); }
|
||||
|
||||
private:
|
||||
PS2Keyboard(PS2Controller& controller);
|
||||
PS2Keyboard(PS2Controller& controller, bool basic);
|
||||
|
||||
void update_leds();
|
||||
|
||||
private:
|
||||
BAN::Array<uint8_t, 3> m_byte_buffer;
|
||||
uint8_t m_byte_index { 0 };
|
||||
bool m_basic { false };
|
||||
|
||||
uint8_t m_scancode_set { 0xFF };
|
||||
uint16_t m_modifiers { 0 };
|
||||
|
||||
Reference in New Issue
Block a user