Changeset 577fe9b6 in mainline for boot/arch/ia64/src/main.c


Ignore:
Timestamp:
2011-08-07T22:09:26Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
699f3bc
Parents:
26fb118a
Message:

Support for calling SAL procedures from the loader.

  • Added sal_call() to perform and wrap around calls to SAL.
  • Added sal_base_clock_frequency() to read the system base frequency.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/src/main.c

    r26fb118a r577fe9b6  
    118118}
    119119
    120 static void read_sal_configuration(void)
    121 {
    122         if (bootpar && bootpar->efi_system_table) {
    123                 /* TODO: read the real values from SAL */
     120static void read_pal_configuration(void)
     121{
     122        if (bootpar) {
     123                /* TODO: read the real value from PAL */
    124124                bootinfo.freq_scale = DEFAULT_FREQ_SCALE;
    125                 bootinfo.sys_freq = DEFAULT_SYS_FREQ;
    126                
    127                 efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID;
    128                 sal_system_table_header_t *sal_st;
    129                
    130                 sal_st = efi_vendor_table_find(
    131                     (efi_system_table_t *) bootpar->efi_system_table, sal_guid);
    132 
    133                 sal_system_table_parse(sal_st);
    134125        } else {
    135126                /* Configure default values for simulators. */
    136127                bootinfo.freq_scale = DEFAULT_FREQ_SCALE;
     128        }
     129}
     130
     131static void read_sal_configuration(void)
     132{
     133        if (bootpar && bootpar->efi_system_table) {
     134                efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID;
     135                sal_system_table_header_t *sal_st;
     136               
     137                sal_st = efi_vendor_table_find(
     138                    (efi_system_table_t *) bootpar->efi_system_table, sal_guid);
     139
     140                sal_system_table_parse(sal_st);
     141               
     142                bootinfo.sys_freq = sal_base_clock_frequency();
     143        } else {
     144                /* Configure default values for simulators. */
    137145                bootinfo.sys_freq = DEFAULT_SYS_FREQ;
    138146        }
     
    198206        read_efi_memmap();
    199207        read_sal_configuration();
     208        read_pal_configuration();
    200209       
    201210        printf("Booting the kernel ...\n");
Note: See TracChangeset for help on using the changeset viewer.