mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
hw: provide CPU count to core by bootstrap
The count is supposed to provide the actual available CPUs, which may not be equal to NR_OF_CPUS. Issue #2929
This commit is contained in:
parent
538d91ecf2
commit
bf340eee91
@ -198,7 +198,7 @@ Platform::Platform()
|
||||
(addr_t)&core_pd->array,
|
||||
core_pd->mappings, boot_modules,
|
||||
board.core_mmio, board.acpi_rsdp,
|
||||
board.framebuffer);
|
||||
board.framebuffer, board.cpus);
|
||||
|
||||
/* add all left RAM to bootinfo */
|
||||
ram_alloc.for_each_free_region([&] (Memory_region const & r) {
|
||||
|
@ -47,6 +47,7 @@ class Bootstrap::Platform
|
||||
Mmio_space const core_mmio;
|
||||
Hw::Acpi_rsdp acpi_rsdp { };
|
||||
Hw::Framebuffer framebuffer { };
|
||||
unsigned cpus { NR_OF_CPUS };
|
||||
|
||||
Board();
|
||||
};
|
||||
|
@ -144,7 +144,7 @@ class Genode::Platform : public Genode::Platform_generic
|
||||
bool supports_direct_unmap() const { return 1; }
|
||||
|
||||
Affinity::Space affinity_space() const {
|
||||
return Affinity::Space(NR_OF_CPUS); }
|
||||
return Affinity::Space(_boot_info().cpus); }
|
||||
|
||||
/*
|
||||
* The system-wide maximum number of capabilities is constrained
|
||||
|
@ -32,6 +32,7 @@ struct Hw::Boot_info
|
||||
Memory_region_array ram_regions { };
|
||||
Acpi_rsdp const acpi_rsdp;
|
||||
Framebuffer const framebuffer;
|
||||
unsigned const cpus;
|
||||
|
||||
Boot_info(addr_t const table,
|
||||
addr_t const table_alloc,
|
||||
@ -39,10 +40,12 @@ struct Hw::Boot_info
|
||||
Mapping const boot_modules,
|
||||
Mmio_space const mmio_space,
|
||||
Acpi_rsdp const &acpi_rsdp,
|
||||
Framebuffer const &fb)
|
||||
Framebuffer const &fb,
|
||||
unsigned const &cpus)
|
||||
: table(table), table_allocator(table_alloc),
|
||||
elf_mappings(elf_mappings), boot_modules(boot_modules),
|
||||
mmio_space(mmio_space), acpi_rsdp(acpi_rsdp), framebuffer(fb) {}
|
||||
mmio_space(mmio_space), acpi_rsdp(acpi_rsdp), framebuffer(fb),
|
||||
cpus(cpus) {}
|
||||
};
|
||||
|
||||
#endif /* _SRC__LIB__HW__BOOT_INFO_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user