Revert "Improve BSD compatiblity"

This reverts commit 31156d1a23.
This commit is contained in:
Uwe Seimet 2023-11-12 11:44:55 +01:00
parent 31156d1a23
commit c342c01da9
1 changed files with 17 additions and 0 deletions

View File

@ -144,6 +144,23 @@ uint32_t SBC_Version::GetPeripheralAddress(void)
return address;
}
#elif defined __NetBSD__
uint32_t SBC_Version::GetPeripheralAddress(void)
{
char buf[1024];
size_t len = sizeof(buf);
uint32_t address;
if (sysctlbyname("hw.model", buf, &len, NULL, 0) || strstr(buf, "ARM1176JZ-S") != buf) {
// Failed to get CPU model || Not BCM2835
// use the address of BCM283[67]
address = 0x3f000000;
} else {
// Use BCM2835 address
address = 0x20000000;
}
return address;
}
#else
uint32_t SBC_Version::GetPeripheralAddress(void)
{