Changeset 8d8eeb9 in mainline


Ignore:
Timestamp:
2011-08-15T13:47:45Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3751a08
Parents:
c6f08726 (diff), 699f3bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/ia64-revival.

Location:
boot
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/Makefile.inc

    rc6f08726 r8d8eeb9  
    4545        arch/$(BARCH)/src/asm.S \
    4646        arch/$(BARCH)/src/main.c \
     47        arch/$(BARCH)/src/sal.c \
     48        arch/$(BARCH)/src/sal_asm.S \
     49        arch/$(BARCH)/src/pal.c \
     50        arch/$(BARCH)/src/pal_asm.S \
    4751        arch/$(BARCH)/src/putchar.c \
    4852        $(COMPS_C) \
     53        genarch/src/efi.c \
    4954        genarch/src/division.c \
    5055        generic/src/balloc.c \
  • boot/arch/ia64/src/main.c

    rc6f08726 r8d8eeb9  
    3535#include <arch/_components.h>
    3636#include <genarch/efi.h>
     37#include <arch/sal.h>
     38#include <arch/pal.h>
    3739#include <halt.h>
    3840#include <printf.h>
     
    117119}
    118120
    119 static void read_sal_configuration(void)
    120 {
    121         if (!bootpar) {
     121static void read_pal_configuration(void)
     122{
     123        if (bootpar) {
     124                bootinfo.freq_scale = pal_proc_freq_ratio();
     125        } else {
    122126                /* Configure default values for simulators. */
    123127                bootinfo.freq_scale = DEFAULT_FREQ_SCALE;
    124                 bootinfo.sys_freq = DEFAULT_SYS_FREQ;
     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();
    125143        } else {
    126                 /* TODO: read the real values from SAL */
    127                 bootinfo.freq_scale = DEFAULT_FREQ_SCALE;
     144                /* Configure default values for simulators. */
    128145                bootinfo.sys_freq = DEFAULT_SYS_FREQ;
    129146        }
     
    189206        read_efi_memmap();
    190207        read_sal_configuration();
     208        read_pal_configuration();
    191209       
    192210        printf("Booting the kernel ...\n");
  • boot/genarch/include/efi.h

    rc6f08726 r8d8eeb9  
    3030#define BOOT_EFI_H_
    3131
     32#include <arch/types.h>
     33
     34typedef struct {
     35        uint64_t signature;
     36        uint32_t revision;
     37        uint32_t header_size;
     38        uint32_t crc32;
     39        uint32_t reserved;
     40} efi_table_header_t;
     41
     42#define SAL_SYSTEM_TABLE_GUID \
     43        { \
     44                { \
     45                        0x32, 0x2d, 0x9d, 0xeb, 0x88, 0x2d, 0xd3, 0x11, \
     46                        0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
     47                } \
     48        }
     49
     50typedef union {
     51        uint8_t bytes[16];
     52        struct {
     53                uint64_t low;
     54                uint64_t high;
     55        };
     56} efi_guid_t;
     57
     58typedef struct {
     59        efi_guid_t guid;
     60        void *table;
     61} efi_configuration_table_t;
     62
     63typedef struct {
     64        efi_table_header_t hdr;
     65        char *fw_vendor;
     66        uint32_t fw_revision;
     67        void *cons_in_handle;
     68        void *cons_in;
     69        void *cons_out_handle;
     70        void *cons_out;
     71        void *cons_err_handle;
     72        void *cons_err;
     73        void *runtime_services;
     74        void *boot_services;
     75        sysarg_t conf_table_entries;
     76        efi_configuration_table_t *conf_table;
     77} efi_system_table_t;
     78
    3279typedef enum {
    3380        EFI_RESERVED,
     
    57104#define EFI_PAGE_SIZE   4096
    58105
     106extern void *efi_vendor_table_find(efi_system_table_t *, efi_guid_t);
     107
    59108#endif
Note: See TracChangeset for help on using the changeset viewer.