ams: update for 12.0.2

This commit is contained in:
Michael Scire
2021-05-12 08:46:41 -07:00
parent b846628362
commit bb4c7a390b
12 changed files with 34 additions and 12 deletions

View File

@@ -89,7 +89,7 @@ namespace ams::mitm::socket::resolver {
LogDebug("[%016lx]: GetHostByNameRequest(%s)\n", this->client_info.program_id.value, hostname);
R_UNLESS(hostname != nullptr, sm::ResultShouldForwardToSession());
R_UNLESS(hostname != nullptr, sm::mitm::ResultShouldForwardToSession());
ams::socket::InAddrT redirect_addr = {};
R_UNLESS(GetRedirectedHostByName(std::addressof(redirect_addr), hostname), sm::mitm::ResultShouldForwardToSession());
@@ -109,7 +109,7 @@ namespace ams::mitm::socket::resolver {
LogDebug("[%016lx]: GetAddrInfoRequest(%s, %s)\n", this->client_info.program_id.value, reinterpret_cast<const char *>(node.GetPointer()), reinterpret_cast<const char *>(srv.GetPointer()));
R_UNLESS(hostname != nullptr, sm::ResultShouldForwardToSession());
R_UNLESS(hostname != nullptr, sm::mitm::ResultShouldForwardToSession());
ams::socket::InAddrT redirect_addr = {};
R_UNLESS(GetRedirectedHostByName(std::addressof(redirect_addr), hostname), sm::mitm::ResultShouldForwardToSession());
@@ -146,7 +146,7 @@ namespace ams::mitm::socket::resolver {
LogDebug("[%016lx]: GetHostByNameRequestWithOptions(%s)\n", this->client_info.program_id.value, hostname);
R_UNLESS(hostname != nullptr, sm::ResultShouldForwardToSession());
R_UNLESS(hostname != nullptr, sm::mitm::ResultShouldForwardToSession());
ams::socket::InAddrT redirect_addr = {};
R_UNLESS(GetRedirectedHostByName(std::addressof(redirect_addr), hostname), sm::mitm::ResultShouldForwardToSession());
@@ -166,7 +166,7 @@ namespace ams::mitm::socket::resolver {
LogDebug("[%016lx]: GetAddrInfoRequestWithOptions(%s, %s)\n", this->client_info.program_id.value, hostname, reinterpret_cast<const char *>(srv.GetPointer()));
R_UNLESS(hostname != nullptr, sm::ResultShouldForwardToSession());
R_UNLESS(hostname != nullptr, sm::mitm::ResultShouldForwardToSession());
ams::socket::InAddrT redirect_addr = {};
R_UNLESS(GetRedirectedHostByName(std::addressof(redirect_addr), hostname), sm::mitm::ResultShouldForwardToSession());

View File

@@ -38,6 +38,12 @@ namespace ams::boot {
}
Result Initialize(bool set_input_current_limit) {
/* Configure PINMUX_AUX_CAM_FLASH_EN as tristate + passthrough. */
{
const uintptr_t apb_regs = dd::QueryIoMapping(0x70000000ul, os::MemoryPageSize);
reg::ClearBits(apb_regs + PINMUX_AUX_CAM_FLASH_EN, reg::EncodeMask(PINMUX_REG_BITS_MASK(AUX_TRISTATE)));
}
/* Set input current limit to 500 ma. */
if (set_input_current_limit) {
R_TRY(powctl::SetChargerInputCurrentLimit(this->charger_session, 500));