sparc: workaround for Netra T1 105
The address-size property is missing, but we don't really need it. Change-Id: Iff3de89c811d16a263eadf796a0e6eb157dbe18b Reviewed-on: https://review.haiku-os.org/c/haiku/+/2356 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
6d929a001e
commit
5424c3a22e
@ -80,14 +80,19 @@ find_physical_memory_ranges(size_t &total)
|
||||
// #address-cells and #size-cells matches the number of 32-bit 'cells'
|
||||
// representing the length of the base address and size fields
|
||||
intptr_t root = of_finddevice("/");
|
||||
int32 regAddressCells = of_address_cells(root);
|
||||
int32 regSizeCells = of_size_cells(root);
|
||||
if (regAddressCells == OF_FAILED || regSizeCells == OF_FAILED) {
|
||||
dprintf("finding base/size length counts failed, assume 32-bit.\n");
|
||||
regAddressCells = 1;
|
||||
if (regSizeCells == OF_FAILED) {
|
||||
dprintf("finding size of memory cells failed, assume 32-bit.\n");
|
||||
regSizeCells = 1;
|
||||
}
|
||||
|
||||
int32 regAddressCells = of_address_cells(root);
|
||||
if (regAddressCells == OF_FAILED) {
|
||||
// Sun Netra T1-105 is missing this, but we can guess that if the size
|
||||
// is 64bit, the address also likely is.
|
||||
regAddressCells = regSizeCells;
|
||||
}
|
||||
|
||||
if (regAddressCells != 2 || regSizeCells != 2) {
|
||||
panic("%s: Unsupported OpenFirmware cell count detected.\n"
|
||||
"Address Cells: %" B_PRId32 "; Size Cells: %" B_PRId32
|
||||
|
Loading…
Reference in New Issue
Block a user