Skip to content

Commit

Permalink
protocols/hw: Remove the old PmResetRequest
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Bonke <[email protected]>
  • Loading branch information
Dennisbonke committed Oct 3, 2024
1 parent 04b2735 commit d8948ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
19 changes: 1 addition & 18 deletions kernel/thor/system/acpi/pm-interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,7 @@ struct PmInterfaceBusObject : private KernelBusObject {
if (preamble.error())
co_return Error::protocolViolation;

if(preamble.id() == bragi::message_id<managarm::hw::PmResetRequest>) {
auto req = bragi::parse_head_only<managarm::hw::PmResetRequest>(reqBuffer, *kernelAlloc);

if (!req) {
infoLogger() << "thor: Closing lane due to illegal HW request." << frg::endlog;
co_return Error::protocolViolation;
}

auto ret = uacpi_reboot();
if(uacpi_unlikely_error(ret))
infoLogger() << "thor: ACPI reset failed: " << uacpi_status_to_string(ret) << frg::endlog;

#ifdef __x86_64__
issuePs2Reset();
infoLogger() << "thor: Reset using PS/2 controller failed" << frg::endlog;
#endif
panicLogger() << "thor: We do not know how to reset" << frg::endlog;
} else if(preamble.id() == bragi::message_id<managarm::hw::RebootRequest>) {
if(preamble.id() == bragi::message_id<managarm::hw::RebootRequest>) {
auto req = bragi::parse_head_only<managarm::hw::RebootRequest>(reqBuffer, *kernelAlloc);

if(!req) {
Expand Down
10 changes: 3 additions & 7 deletions protocols/hw/hw.bragi
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ message AccessFbMemoryRequest 11 {
head(128):
}

message PmResetRequest 12 {
message RebootRequest 12 {
head(128):
Errors error;
int64 cmd;
}

message SvrResponse 13 {
Expand All @@ -121,9 +123,3 @@ tail:
tag(8) uint32 fb_type;
}
}

message RebootRequest 17 {
head(128):
Errors error;
int64 cmd;
}

0 comments on commit d8948ba

Please sign in to comment.