Remove amd64_ platform prefix

This commit is contained in:
2026-02-20 15:33:16 +01:00
parent 4472ad5bb3
commit c68b00f2ea
28 changed files with 236 additions and 246 deletions

View File

@@ -134,11 +134,11 @@ static int32_t ps2kb_keycode (void) {
static uint8_t* charcode[4] = {normalmap, shiftmap, ctlmap, ctlmap};
uint32_t st, data, c;
st = amd64_io_inb (KB_CTL_STATUS);
st = inb (KB_CTL_STATUS);
if (!(st & KB_DATA_IN_BUF)) {
return -1;
}
data = amd64_io_inb (KB_DATA);
data = inb (KB_DATA);
if (data == 0xe0) {
shift |= KB_E0ESC;
@@ -237,22 +237,22 @@ int ps2kb_read_key (struct device* device, struct proc* proc, struct reschedule_
bool ps2kb_init (struct device* device, void* arg) {
(void)device, (void)arg;
amd64_ioapic_route_irq (PS2KB, 1, 0, thiscpu->lapic_id);
ioapic_route_irq (PS2KB, 1, 0, thiscpu->lapic_id);
irq_attach (&ps2kb_irq, NULL, PS2KB);
ringbuffer_init (&ps2kb_ringbuffer, PS2KB_RINGBUFFER_MAX, sizeof (uint8_t));
while (amd64_io_inb (KB_CTL_STATUS) & KB_DATA_IN_BUF)
amd64_io_inb (KB_DATA);
while (inb (KB_CTL_STATUS) & KB_DATA_IN_BUF)
inb (KB_DATA);
amd64_io_outb (KB_CTL_STATUS, 0x20);
outb (KB_CTL_STATUS, 0x20);
uint8_t cb = amd64_io_inb (KB_DATA);
uint8_t cb = inb (KB_DATA);
cb |= 0x01;
cb |= 0x40;
amd64_io_outb (KB_CTL_STATUS, 0x60);
amd64_io_outb (KB_DATA, cb);
outb (KB_CTL_STATUS, 0x60);
outb (KB_DATA, cb);
return true;
}