Hi all:

I'm rewriting my SMP code, to improve the design and ease the revision.

Currently, I'm working in rewrite the search of processors (and IOAPIC) in
ACPI tables,
Most of work was done:

- I've mapped all unreachable address in the kernel pagetable. This allows
to execute the function in a later step of gnumach booting, after paging
configuration.

- Added to this, I have refactorized the code to remove most global
variables.

The code works properly, and all cpus and IOAPIC are found successfully.
You can see an execution demonstration in this video.
https://www.youtube.com/watch?v=huticmoqPpQ&feature=youtu.be

Before to send the code as a patch, I want to know your opinion about this.
My questions are:

*1. Naming:* are the functions and files' names appropriate?
*2. Structures: *I have some structures declared as globals: an array which
stores the relationship between CPU's APIC ID and Kernel ID, a variable
which stores the number of cpus existent in the machine... Do you prefer
store this data in some structures? Do you prefer store this data in other
file? ...
*3. File location: *are the files in a appropiate location?

The code can be seen in these files:

- *acpi_parse_apic.c* : main code. Find the MADT (APIC) table in ACPI
tables, and parse It to find Local APIC (for cpus) and IOAPIC (for I/O)
https://github.com/AlmuHS/GNUMach_SMP/blob/smp-new/i386/i386at/acpi_parse_apic.c

- *acpi_parse_apic.h: *Headers of *acpi_parse_apic.c, *with the structures
of the tables readed during the search of MADT.
https://github.com/AlmuHS/GNUMach_SMP/blob/smp-new/i386/i386at/acpi_parse_apic.h


- *apic.h*: header with the structures of Local APIC and IOAPIC, recovered
and updated from original Mach code.
https://github.com/AlmuHS/GNUMach_SMP/blob/smp-new/imps/apic.h

- Caller o*f acpi_find_cpus(): *Code which calls to *acpi_finc_cpus(), *to
start the search of cpus and IOAPIC
https://github.com/AlmuHS/GNUMach_SMP/blob/smp-new/i386/i386at/model_dep.c#L174

I wait your opinions about this
Can you help me in this?

P.S.: Don't be cruel. I'm very noob yet ;)

Reply via email to